Re: bug: squid hangs during https POST

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 18 Oct 2001 17:00:24 +0200

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 - 09:00:46 MDT

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