httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1594537 - in /httpd/httpd/branches/2.4.x: ./ STATUS modules/proxy/mod_proxy_fcgi.c
Date Wed, 14 May 2014 10:45:20 GMT
Author: trawick
Date: Wed May 14 10:45:20 2014
New Revision: 1594537

URL: http://svn.apache.org/r1594537
Log:
Merge r1591472 from trunk:

mod_proxy_fcgi: remove wasted memset() calls and other historical bits

Submitted by: trawick
Reviewed by: jim, ylavic

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fcgi.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1591472

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1594537&r1=1594536&r2=1594537&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Wed May 14 10:45:20 2014
@@ -106,11 +106,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: http://people.apache.org/~covener/patches/httpd-2.4.x-aliasmatch_contextinfo.diff
      +1 covener, jim, ylavic
 
-   * mod_proxy_fcgi: remove wasted memset() calls and other historical bits
-     trunk patch: http://svn.apache.org/r1591472
-     2.4.x patch: trunk patch works
-     +1: trawick, jim, ylavic
-
    * mod_authn_socache: fix logging of bugus rv in r1576233 (now in 2.4.x)
      trunk patch: http://svn.apache.org/r1583007
      2.4.x patch: trunk patch works

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fcgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fcgi.c?rev=1594537&r1=1594536&r2=1594537&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fcgi.c Wed May 14 10:45:20 2014
@@ -483,19 +483,13 @@ static apr_status_t dispatch(proxy_conn_
         }
 
         if (pfd.rtnevents & APR_POLLIN) {
-            /* readbuf has one byte on the end that is always 0, so it's
-             * able to work with a strstr when we search for the end of
-             * the headers, even if we fill the entire length in the recv. */
-            char readbuf[AP_IOBUFSIZE + 1];
+            char readbuf[AP_IOBUFSIZE];
             apr_size_t readbuflen;
             apr_uint16_t clen, rid;
             apr_bucket *b;
             unsigned char plen;
             unsigned char type, version;
 
-            memset(readbuf, 0, sizeof(readbuf));
-            memset(farray, 0, sizeof(farray));
-
             /* First, we grab the header... */
             rv = get_data_full(conn, (char *) farray, AP_FCGI_HEADER_LEN);
             if (rv != APR_SUCCESS) {
@@ -528,8 +522,8 @@ static apr_status_t dispatch(proxy_conn_
             }
 
 recv_again:
-            if (clen > sizeof(readbuf) - 1) {
-                readbuflen = sizeof(readbuf) - 1;
+            if (clen > sizeof(readbuf)) {
+                readbuflen = sizeof(readbuf);
             } else {
                 readbuflen = clen;
             }
@@ -542,7 +536,6 @@ recv_again:
                 if (rv != APR_SUCCESS) {
                     break;
                 }
-                readbuf[readbuflen] = 0;
             }
 
             switch (type) {



Mime
View raw message