httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plüm, Rüdiger, Vodafone Group <ruediger.pl...@vodafone.com>
Subject AW: socket timeouts
Date Thu, 21 Jan 2016 12:29:58 GMT
Sorry for being devils advocate, but I have no time to check in depth currently on my own.
So
two points worth checking:

If the consumer is not prepared to handle TIMEOUTS, how do we ensure that the possible remaining
content of inctx->bb

1. is not creating a memory leak.
2. is not delivered to the next consumer (some kind of request splitting).

As said no time to investigate deeper on my own. Maybe needless fears on my side.

Regards

Rüdiger

> -----Ursprüngliche Nachricht-----
> Von: Stefan Eissing [mailto:stefan.eissing@greenbytes.de]
> Gesendet: Donnerstag, 21. Januar 2016 11:52
> An: dev@httpd.apache.org
> Betreff: Re: socket timeouts
> 
> However seems to do it. Anyone for/against applying it?
> 
> ===================================================================
> --- modules/ssl/ssl_engine_io.c	(revision 1725894)
> +++ modules/ssl/ssl_engine_io.c	(working copy)
> @@ -506,6 +506,12 @@
>              return -1;
>          }
> 
> +        if (block == APR_BLOCK_READ
> +            && APR_STATUS_IS_TIMEUP(inctx->rc)
> +            && APR_BRIGADE_EMPTY(inctx->bb)) {
> +            /* don't give up, just return the timeout */
> +            return -1;
> +        }
>          if (inctx->rc != APR_SUCCESS) {
>              /* Unexpected errors discard the brigade */
> 
> > Am 20.01.2016 um 21:50 schrieb Yann Ylavic <ylavic.dev@gmail.com>:
> >
> > On Tue, Jan 19, 2016 at 4:52 PM, Stefan Eissing
> > <stefan.eissing@greenbytes.de> wrote:
> >>
> >> I experimented with setting socket timeouts to 1 second during
> >> HTTP/2's keepalive reading and closing the connection after n such
> >> TIMEUP returns. That works nicely on cleartext connections, but
> >> https:// return APR_EOF on reads after the first APR_ETIMEUP. Am I
> >> seeing ghosts or is that something in SSL that regards timed-out
> >> reads as basically broken?
> >
> > Maybe mod_ssl could preserve downstream status when it's already an
> error?
> >
> > Index: modules/ssl/ssl_engine_io.c
> > ===================================================================
> > --- modules/ssl/ssl_engine_io.c    (revision 1725250)
> > +++ modules/ssl/ssl_engine_io.c    (working copy)
> > @@ -679,7 +679,7 @@ static apr_status_t ssl_io_input_read(bio_filter_i
> >                 if (*len > 0) {
> >                     inctx->rc = APR_SUCCESS;
> >                 }
> > -                else {
> > +                else if (inctx->rc == APR_SUCCESS) {
> >                     inctx->rc = APR_EOF;
> >                 }
> >                 break;
> > --


Mime
View raw message