]> granicus.if.org Git - apache/commitdiff
Merge r1603027, r1603029, r1603122 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 17 Jun 2014 12:04:23 +0000 (12:04 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 17 Jun 2014 12:04:23 +0000 (12:04 +0000)
Fix bug introduced in r1591508 which resulted in the final empty
FCGI_STDIN not being sent.  Interaction with latest uWSGI (and
probably other protocol implementations) breaks without this.

Reindent after small fix in r1603027

mod_proxy_fcgi: follow up to r1592032.

Also break the outer loop when "sending stdin" fails.

Submitted by: trawick, ylavic
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1603140 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/proxy/mod_proxy_fcgi.c

diff --git a/STATUS b/STATUS
index b40a4490b1e37e16a2ebd1bfd36d5454dec6e1a1..4406086b440332c065b7163fb1cd91e196ccc827 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -120,19 +120,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch:  http://people.apache.org/~jailletc36/backport8.patch
      +1: jailletc36, ylavic, jim
 
-   * mod_proxy_fcgi: Repair sending empty stdin after r1601749 (i.e., regression
-     in 2.4.x branch after 2.4.9), repair lost error condition
-     trunk: http://svn.apache.org/r1603027
-            http://svn.apache.org/r1603029
-            http://svn.apache.org/r1603122
-     2.4.x: http://people.apache.org/~trawick/r1603027_plus_r1603029_plus_r1603122.txt
-            (the patch file resolves a small intersection with r1592032)
-     +1: trawick, ylavic, jim
-     ylavic: what's the point with r1592032 (does not seem to be related, at
-     least fixing the above)?
-     trawick: the patch resolves a conflict when merging these revisions
-              if r1592032 is not yet in the 2.4.x branch
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 9513e9907486ed74ac5879c37bdc69320e178875..defbdaa0d7c0eef963d82d22925573e76d06d1f6 100644 (file)
@@ -485,20 +485,22 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                 to_send -= write_this_time;
                 iobuf_cursor += write_this_time;
             }
+            if (rv != APR_SUCCESS) {
+                break;
+            }
 
             if (last_stdin) {
                 pfd.reqevents = APR_POLLIN; /* Done with input data */
 
-                if (writebuflen) { /* empty AP_FCGI_STDIN not already sent? */
-                    ap_fcgi_fill_in_header(&header, AP_FCGI_STDIN, request_id,
-                                           0, 0);
-                    ap_fcgi_header_to_array(&header, farray);
+                /* signal EOF (empty FCGI_STDIN) */
+                ap_fcgi_fill_in_header(&header, AP_FCGI_STDIN, request_id,
+                                       0, 0);
+                ap_fcgi_header_to_array(&header, farray);
 
-                    vec[0].iov_base = (void *)farray;
-                    vec[0].iov_len = sizeof(farray);
+                vec[0].iov_base = (void *)farray;
+                vec[0].iov_len = sizeof(farray);
 
-                    rv = send_data(conn, vec, 1, &len, 1);
-                }
+                rv = send_data(conn, vec, 1, &len, 1);
             }
         }