httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: 2.2 mod_http_proxy and "partial" pages
Date Tue, 06 Dec 2005 19:41:13 GMT
--On December 6, 2005 2:19:58 PM -0500 Brian Akins <bakins@web.turner.com> 
wrote:

> Brian Akins wrote:
>> Justin Erenkrantz wrote:
>>
>>>
>>> After a bit more of thinking, the right thing to do would be to have
>>> mod_proxy force a dropped connection to the client.
>>
>>
>> So, do we just need to set r->connection->aborted = 1 and core will take
>>  care of it?  If so, a patch should be trivial.
>>
>
> After a quick glance through mod_http_proxy, this look to be correct:

Hmm.  Maybe I'm wrong.  That does appear how to set it.  Okie doke.

> --- mod_proxy_http.c.orig       2005-12-06 12:11:19.000000000 -0500
> +++ mod_proxy_http.c    2005-12-06 14:06:00.000000000 -0500
> @@ -1482,6 +1482,7 @@
>                       else if (rv != APR_SUCCESS) {
>                           ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
>                                         "proxy: error reading response");
> +                        c->aborted = 1;
>                           break;
>                       }
>                       /* next time try a non-blocking read */

I do think we need to fix mod_proxy_http to return an error.

Like so.  -- justin

Index: modules/proxy/mod_proxy_http.c
===================================================================
--- modules/proxy/mod_proxy_http.c      (revision 354485)
+++ modules/proxy/mod_proxy_http.c      (working copy)
@@ -1565,8 +1565,14 @@
            }
             return status;
         }
-    } else
-        return OK;
+    } else {
+        if (c->aborted) {
+            return DONE;
+        }
+        else {
+            return OK;
+        }
+    }
 }

 static

Mime
View raw message