[Bug 768394] LWP::UserAgent cuts chunked response sent through HTTPS
bugzilla at redhat.com
bugzilla at redhat.com
Fri Jan 18 10:13:52 UTC 2013
Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=768394
--- Comment #18 from Claude Brown <claude at falam.net> ---
Yes, I think there may still be invalid assumptions about an entire chunk being
available in a single "sysread". And I think the "read until EOF" is broken
when the response has neither a "Content-Length" or a "Transfer-Encoded:
chunked" header.
But overall I think this version is better than the one that went before with
arbitrary "select(undef, undef, undef, 0.1)" timing hacks included.
I suspect a better approach would be to have several read operations (using
"select" for timeout control) that fill a buffer to a given condition:
- until a \n is in the buffer
- until a specific number of bytes are in the buffer
- until EOF is reached
Such buffering would protect against any possible arrangement of "sysread"
completion until the required data is available, or a timeout. And then all
returns are satisfied form the buffer.
But this was too big a change so I chickened out :(
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=zWrErWfaKY&a=cc_unsubscribe
More information about the perl-devel
mailing list