]> granicus.if.org Git - apache/commitdiff
Make sure that we read the padding bytes in all cases. Also cut
authorGarrett Rooney <rooneg@apache.org>
Thu, 5 Jan 2006 05:24:43 +0000 (05:24 +0000)
committerGarrett Rooney <rooneg@apache.org>
Thu, 5 Jan 2006 05:24:43 +0000 (05:24 +0000)
down on some of the crazy verbose logging, since this seems to be
the problem we were trying to find.

* modules/proxy/mod_proxy_fcgi.c
  (dispatch): Remove really verbose logging, move reading of the
   padding bytes down to the end of the FCGI_STDOUT case.

Tested By: iholsman

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/fcgi-proxy-dev@366086 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_fcgi.c

index 82196ae1eee03e470906a25b72dc67f72d5a0328..4df01333b032608192f837b15c8096794e0b9686 100644 (file)
@@ -516,11 +516,6 @@ static apr_status_t dispatch(proxy_conn_rec *conn, request_rec *r,
 
             plen = fheader[6];
 
-            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                "type %d request-id %d clen: %" APR_SIZE_T_FMT " plen %d",
-                type, rid,
-                clen, plen 
-                );
 recv_again:
             if (clen > sizeof(readbuf) - 1) {
                 readbuflen = sizeof(readbuf) - 1;
@@ -537,9 +532,6 @@ recv_again:
                     break;
                 }
                 readbuf[readbuflen] = 0;
-                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                    "readbuf (%" APR_SIZE_T_FMT "): %s", 
-                    readbuflen, readbuf );
             }
 
             switch (type) {
@@ -586,15 +578,6 @@ recv_again:
                         clen -= readbuflen;
                         goto recv_again;
                     }
-
-                    if (plen) {
-                        readbuflen = plen;
-
-                        rv = apr_socket_recv(conn->sock, readbuf, &readbuflen);
-                        if (rv != APR_SUCCESS) {
-                            break;
-                        }
-                    }
                 } else {
                     b = apr_bucket_eos_create(c->bucket_alloc);
 
@@ -607,6 +590,15 @@ recv_again:
 
                     /* XXX Why don't we cleanup here?  (logic from AJP) */
                 }
+
+                if (plen) {
+                    readbuflen = plen;
+
+                    rv = apr_socket_recv(conn->sock, readbuf, &readbuflen);
+                    if (rv != APR_SUCCESS) {
+                        break;
+                    }
+                }
                 break;
 
             case FCGI_STDERR: