httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1650677 - in /httpd/httpd/branches/2.4.x: CHANGES STATUS modules/proxy/mod_proxy_fcgi.c
Date Fri, 09 Jan 2015 21:33:13 GMT
Author: jailletc36
Date: Fri Jan  9 21:33:12 2015
New Revision: 1650677

URL: http://svn.apache.org/r1650677
Log:
Merge r1640495, r1644031 from trunk

   * mod_proxy_fcgi: Ignore body data from backend for 304 responses. PR 57198.

Submitted by: jkaluza
Reviewed by: jkaluza, ylavic, covener
Backported by: jailletc36

Modified:
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_fcgi.c

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1650677&r1=1650676&r2=1650677&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Fri Jan  9 21:33:12 2015
@@ -22,6 +22,9 @@ Changes with Apache 2.4.11
      request headers earlier.  Adds "MergeTrailers" directive to restore
      legacy behavior.  [Edward Lu, Yann Ylavic, Joe Orton, Eric Covener]
 
+  *) mod_proxy_fcgi: Ignore body data from backend for 304 responses. PR 57198.
+     [Jan Kaluza]
+
   *) mod_ssl: Do not crash when looking up SSL related variables during
      expression evaluation on non SSL connections. PR 57070  [Ruediger Pluem]
 

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1650677&r1=1650676&r2=1650677&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Fri Jan  9 21:33:12 2015
@@ -104,12 +104,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_proxy_fcgi: Ignore body data from backend for 304 responses. PR 57198.
-     trunk patch: http://svn.apache.org/r1640495
-                  http://svn.apache.org/r1644031
-     2.4.x patch: trunk works
-     +1 jkaluza, ylavic, covener
-
    * mod_cgi: Log CGI script stderr to ScriptLog, use APLOGNO for
      log_scripterror errors.
      trunk patch: http://svn.apache.org/r1626978

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=1650677&r1=1650676&r2=1650677&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 Fri Jan  9 21:33:12 2015
@@ -367,7 +367,7 @@ static apr_status_t dispatch(proxy_conn_
                              const char **err)
 {
     apr_bucket_brigade *ib, *ob;
-    int seen_end_of_headers = 0, done = 0;
+    int seen_end_of_headers = 0, done = 0, ignore_body = 0;
     apr_status_t rv = APR_SUCCESS;
     int script_error_status = HTTP_OK;
     conn_rec *c = r->connection;
@@ -577,9 +577,16 @@ recv_again:
                                 APR_BRIGADE_INSERT_TAIL(ob, tmp_b);
                                 r->status = status;
                                 ap_pass_brigade(r->output_filters, ob);
-                                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01070)
-                                              "Error parsing script headers");
-                                rv = APR_EINVAL;
+                                if (status == HTTP_NOT_MODIFIED) {
+                                    /* The 304 response MUST NOT contain
+                                     * a message-body, ignore it. */
+                                    ignore_body = 1;
+                                }
+                                else {
+                                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01070)
+                                                    "Error parsing script headers");
+                                    rv = APR_EINVAL;
+                                }
                                 break;
                             }
 
@@ -598,7 +605,7 @@ recv_again:
                             }
 
                             if (script_error_status == HTTP_OK
-                                && !APR_BRIGADE_EMPTY(ob)) {
+                                && !APR_BRIGADE_EMPTY(ob) && !ignore_body)
{
                                 /* Send the part of the body that we read while
                                  * reading the headers.
                                  */
@@ -626,7 +633,7 @@ recv_again:
                          * but that could be a huge amount of data; so we pass
                          * along smaller chunks
                          */
-                        if (script_error_status == HTTP_OK) {
+                        if (script_error_status == HTTP_OK && !ignore_body) {
                             rv = ap_pass_brigade(r->output_filters, ob);
                             if (rv != APR_SUCCESS) {
                                 *err = "passing brigade to output filters";



Mime
View raw message