Commit 672c7f8e authored by Chuck Murcko's avatar Chuck Murcko
Browse files

Make the body read in proxy http handler nonblocking. There's no sense

in serializing 4-8 client connections into a single origin server
connection, as is the blocking behavior.

Added instrumentation that we don't want compiled in normally to assist in
debugging chunking problems. apr_get_brigade is apparently blocking during
chunked body fetch, or proxy_http_handler is getting deadlocked with
the dechunk filter. Show PID for prefork debugging. We'll figure out
getting TIDs later.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90127 13f79535-47bb-0310-9956-ffa450edef68
parent c1e30aad
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -796,7 +796,11 @@ int ap_proxy_http_handler(request_rec *r, proxy_server_conf *conf,
            	     "proxy: start body send");
    
            /* read the body, pass it to the output filters */
            while (ap_get_brigade(rp->input_filters, bb, AP_MODE_BLOCKING, &readbytes) == APR_SUCCESS) {
            while (ap_get_brigade(rp->input_filters, bb, AP_MODE_NONBLOCKING, &readbytes) == APR_SUCCESS) {
#if DEBUGGING
            ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
            	     "proxy (PID %d): readbytes: %#x", getpid(), readbytes);
#endif
                if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
            	ap_pass_brigade(r->output_filters, bb);
            	break;