Re: bug: squid hangs during https POST

From: Noel Burton-Krahn <noel@dont-contact.us>
Date: 18 Oct 2001 20:46:39 -0000

Oops! Here's the real patch (with both pending_method() and X-Forwarded-URI and
pending_menthod()).

I tried to make the pending_method() test fit in with the logic in
comm_select(). pending_method() is tested only if the files read
status would be checked by poll() or select(). It shouldn't be
checked if the file is disabled.

--Noel

> Date: Thu, 18 Oct 2001 17:00:24 +0200
> From: Henrik Nordstrom <hno@marasystems.com>
> To: Adrian Chadd <adrian@creative.net.au>
> CC: Noel Burton-Krahn <noel@burton-krahn.com>,
> Henrik Nordstrom <hno@squid-cache.org>, devel@kronofusion.com,
> squid-bugs@squid-cache.org, squid-dev@squid-cache.org
> Subject: Re: bug: squid hangs during https POST
>
> Won't work very well. There may be data intentionally left in the buffer
> when throttling the upload.
>
> Basically the filedescriptor needs to be viewed as active by the select
> loop unless it is known that the buffers is empty.
>
> One quick way is to add a flag to the fde_table struct telling that the
> filedescriptor is active, and set this flag to 1 if there is data in the
> SSL buffer after SSL_Read. Then use this flag in the select loop to
> consider the fd as active regardless if select/poll returned it or not.
> The precense of such active (== flag set and not deferred)
> filedescriptors also need to zero out the select timeout.
>
> Regards
> Henrik
>
>
> Adrian Chadd wrote:
>
> > Right. I think for this, we need some kind of function to determine
> > whether there's any more data available for a given filedescriptor,
> > and this is called instead of the read handler.
> >
> > This way, this function can call the "real" read callback, check
> > if there's any data left in the buffer after the callback returns,
> > and then call the read handler (again!) until the buffer is empty.
> >
> > This should solve your problem. Implementation is left as an
> > exercise to the reader, but personally I'd look at having some form
> > of indirection set in the fde struct to call the callback,
> > and this indirection is "overridden" like how SSL does it through
> > FD_READ_METHOD, FD_WRITE_METHOD.
> >
> > Henrik, anyone, do you have any other bright ideas?
> >
> > Adrian
> >
> > --
> > Adrian Chadd "Auntie Em, Hate you. Hate Kansas.
> > <adrian@creative.net.au> Taking the dog."
> > -- Dorothy

Received on Thu Oct 18 2001 - 18:03:56 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:33 MST