]> granicus.if.org Git - apache/commitdiff
Make the body read in proxy http handler nonblocking. There's no sense
authorChuck Murcko <chuck@apache.org>
Sun, 12 Aug 2001 21:24:35 +0000 (21:24 +0000)
committerChuck Murcko <chuck@apache.org>
Sun, 12 Aug 2001 21:24:35 +0000 (21:24 +0000)
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

modules/proxy/proxy_http.c

index bc4edd3b506227b2dc7a4b7802b99cc94c381a54..9d461ed4ca086619b150b5fa33ed8596b04ea20d 100644 (file)
@@ -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;