Re: [bugfix] chunked transfer http encoding

Gisle Aas <[email protected]> Fri, 14 Oct 2011 23:52:30 +0200
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
I have a hard time reading/applying this patch.  Can you provide a new one using the 'diff -u' command?

Can you also try to explain why think this is the right approach and why LWP ends up hanging.  Is it sysread that hangs?

Regards,
Gisle

On Oct 13, 2011, at 10:35 , Valentin Dudouyt wrote:

> LWP hangs when POSTing on server that uses chunked transfer-encoding.
> The solution is to prevent reading while file is not uploaded completely. Please, take a look on attachment (diff of lib/LWP/Protocol/http.pm).
> 
> Best Regards,
> Valentin.
> 269a270
>> 	my $strobe_read;
> 302c303
> < 	    if (defined($rbits) && $rbits =~ /[^\0]/) {
> ---
>> 	    if (defined($rbits) && $rbits =~ /[^\0]/ && !$strobe_read) {
> 334a336
>> 		$strobe_read = 1;