httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <ch...@hyperreal.com>
Subject cvs commit: apache/src/modules/proxy proxy_ftp.c
Date Thu, 20 Feb 1997 04:14:46 GMT
chuck       97/02/19 20:14:45

  Modified:    src/modules/proxy  proxy_ftp.c
  Log:
  1) remove setting of SO_DEBUG socket option to make Linux users happy.
  2) Make ftp_getrc() more lenient about multiline responses (specifically,
     230 responses which don't have continuation 230- on each line). These
     seem to be all NT FTP servers, and while they may be the mutant spawn of
     the devil, they appear to be legal by RFC 959.
  3) Add missing kill_timeout() after transfer to user completes. This coupled
     with 2) is very likely the cause of Rasmus' timeout problem.
  
  Revision  Changes    Path
  1.9       +6 -15     apache/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -C3 -r1.8 -r1.9
  *** proxy_ftp.c	1997/01/20 04:28:33	1.8
  --- proxy_ftp.c	1997/02/20 04:14:44	1.9
  ***************
  *** 185,197 ****
    /* check format */
        if (len < 5 || !isdigit(linebuff[0]) || !isdigit(linebuff[1]) ||
    	!isdigit(linebuff[2]) || (linebuff[3] != ' ' && linebuff[3] != '-'))
  ! 	return 0;
  !     status = 100 * linebuff[0] + 10 * linebuff[1] + linebuff[2] - 111 * '0';
        
        if (linebuff[len-1] != '\n')
        {
    	i = bskiplf(f);
  - 	if (i != 1) return i;
        }
    
    /* skip continuation lines */    
  --- 185,199 ----
    /* check format */
        if (len < 5 || !isdigit(linebuff[0]) || !isdigit(linebuff[1]) ||
    	!isdigit(linebuff[2]) || (linebuff[3] != ' ' && linebuff[3] != '-'))
  ! 	status = 0;
  !     else
  ! 	status = 100 * linebuff[0] + 10 * linebuff[1] + linebuff[2] - 111 * '0';
  ! 
  !     Explain1("FTP: ftp_getrc() status = %d", status);
        
        if (linebuff[len-1] != '\n')
        {
    	i = bskiplf(f);
        }
    
    /* skip continuation lines */    
  ***************
  *** 203,213 ****
    	{
    	    len = bgets(linebuff, 100, f);
    	    if (len == -1) return -1;
  - 	    if (len < 5) return 0;
    	    if (linebuff[len-1] != '\n')
    	    {
    		i = bskiplf(f);
  - 		if (i != 1) return i;
    	    }
    	} while (memcmp(linebuff, buff, 4) != 0);
        }
  --- 205,213 ----
  ***************
  *** 564,579 ****
        }
        note_cleanups_for_fd(pool, dsock);
    
  -     if (setsockopt(dsock, SOL_SOCKET, SO_DEBUG, (const char *)&one,
  -       sizeof (int)) == -1)
  -     {
  - 	proxy_log_uerror("setsockopt", NULL,
  - 	    "proxy: error setting PASV debug option", r->server);
  - 	pclosef(pool, dsock);
  - 	pclosef(pool, sock);
  - 	return SERVER_ERROR;
  -     }
  - 
        bputs("PASV\015\012", f);
        bflush(f);
        Explain0("FTP: PASV command issued");
  --- 564,569 ----
  ***************
  *** 867,872 ****
  --- 857,863 ----
            Explain1("FTP: returned status %d",i);
        }
    
  +     kill_timeout(r);
        proxy_cache_tidy(c);
    
    /* finish */
  
  
  

Mime
View raw message