httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1331414 - in /httpd/httpd/branches/2.4.x: STATUS server/util_script.c
Date Fri, 27 Apr 2012 13:07:45 GMT
Author: jim
Date: Fri Apr 27 13:07:45 2012
New Revision: 1331414

URL: http://svn.apache.org/viewvc?rev=1331414&view=rev
Log:
Merge r1311174 from trunk:

Fix error handling in ap_scan_script_header_err_brigade() if there
is no EOS bucket in the brigade:

Also don't loop if there is a timeout when discarding the script output.

Thanks to Edgar Frank for the analysis.

PR: 48272 (partial fix)

Submitted by: sf
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/server/util_script.c

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1331414&r1=1331413&r2=1331414&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Fri Apr 27 13:07:45 2012
@@ -95,14 +95,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
     2.4 patch: Trunk patch works
     +1: sf, jorton, jim
 
-  * core: Fix error handling in ap_scan_script_header_err_brigade() if there
-    is no EOS bucket in the brigade.
-    Also don't loop if there is a timeout when discarding the script output.
-    PR: 48272 (partial fix)
-    Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1311174
-    2.4 patch: Trunk patch works
-    +1: sf, jorton, jim
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.4.x/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util_script.c?rev=1331414&r1=1331413&r2=1331414&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util_script.c (original)
+++ httpd/httpd/branches/2.4.x/server/util_script.c Fri Apr 27 13:07:45 2012
@@ -553,7 +553,7 @@ AP_DECLARE(int) ap_scan_script_header_er
         if (!(l = strchr(w, ':'))) {
             if (!buffer) {
                 /* Soak up all the script output - may save an outright kill */
-                while ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data)) {
+                while ((*getsfunc)(w, MAX_STRING_LEN - 1, getsfunc_data) > 0) {
                     continue;
                 }
             }
@@ -672,7 +672,8 @@ static int getsfunc_BRIGADE(char *buf, i
     apr_status_t rv;
     int done = 0;
 
-    while ((dst < dst_end) && !done && !APR_BUCKET_IS_EOS(e)) {
+    while ((dst < dst_end) && !done && e != APR_BRIGADE_SENTINEL(bb)
+           && !APR_BUCKET_IS_EOS(e)) {
         const char *bucket_data;
         apr_size_t bucket_data_len;
         const char *src;
@@ -706,7 +707,7 @@ static int getsfunc_BRIGADE(char *buf, i
         e = next;
     }
     *dst = 0;
-    return 1;
+    return done;
 }
 
 AP_DECLARE(int) ap_scan_script_header_err_brigade(request_rec *r,



Mime
View raw message