On 09/08/2007 10:29 PM, [EMAIL PROTECTED] wrote: > Author: niq > Date: Sat Sep 8 13:29:14 2007 > New Revision: 573903 > > URL: http://svn.apache.org/viewvc?rev=573903&view=rev > Log: > mod_proxy: Don't lose bytes when a response line arrives in small chunks. > PR 40894 > > Modified: > httpd/httpd/trunk/CHANGES > httpd/httpd/trunk/modules/proxy/proxy_util.c > > > Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=573903&r1=573902&r2=573903&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original) > +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Sat Sep 8 13:29:14 2007 > @@ -994,12 +994,14 @@ > len = (bufflen-1)-(pos-buff); > } > if (len > 0) { > - pos = apr_cpystrn(pos, response, len); > + memcpy(pos, response, len); > + pos += len;
I am slightly confused here: IMHO apr_cpystrn does exactly what you do here (it terminates pos with \0 and sets the pointer of pos to the terminating \0) But it avoids reading over a possible terminating \0 in response which seems good to me. Regards RĂ¼diger
