rse 98/06/13 05:06:02
Modified: src CHANGES src/modules/proxy proxy_ftp.c Log: Fix parsing of FTP `SIZE' responses in proxy module: The newline was not truncated which forced following HTTP headers to be data in the HTTP reponse. Although the reponse now is copied out from the response buffer because it is only temporary and overridden at other points. Original patch submitted by: Charles Fu <[EMAIL PROTECTED]> Corrected patch submitted by: Ralf S. Engelschall PR: 2412 Revision Changes Path 1.913 +6 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.912 retrieving revision 1.913 diff -u -r1.912 -r1.913 --- CHANGES 1998/06/13 11:24:07 1.912 +++ CHANGES 1998/06/13 12:05:58 1.913 @@ -1,5 +1,11 @@ Changes with Apache 1.3.1 + *) Fix parsing of FTP `SIZE' responses in proxy module: The newline was not + truncated which forced following HTTP headers to be data in the HTTP + reponse. Although the reponse now is copied out from the response buffer + because it is only temporary and overridden at other points. + [Ralf S. Engelschall, Charles Fu <[EMAIL PROTECTED]>] PR#2412 + *) Portability fix for APACI shadow tree support: Swap order of awk and sed in top-level configure script to avoid sed fails on some platforms (for instance SunOS 4.1.3 and NCR SysV) because of the non-newline-termined 1.62 +5 -1 apache-1.3/src/modules/proxy/proxy_ftp.c Index: proxy_ftp.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_ftp.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- proxy_ftp.c 1998/06/08 14:23:50 1.61 +++ proxy_ftp.c 1998/06/13 12:06:01 1.62 @@ -933,7 +933,11 @@ len = 0; } else if (i == 213) { /* Size command ok */ - size = resp; + for (j = 0; j < resplen && isdigit(resp[j]); j++) + ; + resp[j] = '\0'; + if (resp[0] != '\0') + size = ap_pstrdup(p, resp); } } }