On Wed, Mar 17, 2010 at 4:08 PM,  <[email protected]> wrote:
> Author: sf
> Date: Wed Mar 17 20:08:42 2010
> New Revision: 924455
>
> URL: http://svn.apache.org/viewvc?rev=924455&view=rev
> Log:
> If the client disconnects and the backend continues to send data fast, 
> forcibly
> close the backend connection.
>
> Modified:
>     httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c
>
> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c?rev=924455&r1=924454&r2=924455&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c (original)
> +++ httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c Wed Mar 17 20:08:42 
> 2010
> @@ -135,6 +135,8 @@ static int proxy_connect_transfer(reques
>          rv = ap_get_brigade(c_i->input_filters, bb, AP_MODE_READBYTES,
>                              APR_NONBLOCK_READ, CONN_BLKSZ);
>          if (rv == APR_SUCCESS) {
> +            if (c_o->aborted)
> +                return APR_EPIPE;
>              if (APR_BRIGADE_EMPTY(bb))
>                  break;
>  #ifdef DEBUGGING
> @@ -186,6 +188,7 @@ static int proxy_connect_handler(request
>      char buffer[HUGE_STRING_LEN];
>      apr_socket_t *client_socket = ap_get_module_config(c->conn_config, 
> &core_module);
>      int failed, rc;
> +    int client_error = 0;
>      apr_pollset_t *pollset;
>      apr_pollfd_t pollfd;
>      const apr_pollfd_t *signalled;
> @@ -440,6 +443,8 @@ static int proxy_connect_handler(request
>                           ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r,
>                                         "proxy: CONNECT: err/hup on 
> backconn");
>                  }
> +                if (rv != APR_SUCCESS)
> +                    client_error = 1;
>              }
>              else if (cur->desc.s == client_socket) {
>                  pollevent = cur->rtnevents;


Is this setting of client_error =1 wrong for a reason other than what
rpluem discussed at the time?

This is a backend socket error, and there is no assignment of
client_error in the branch that follows for the client socket.  It
looks reversed.

(I am looking at a 2.4 error in this area, but this is not the culprit)

Reply via email to