develooper Front page | perl.libwww | Postings from October 2011

Re: [bugfix] chunked transfer http encoding

Thread Previous
From:
Gisle Aas
Date:
October 14, 2011 14:52
Subject:
Re: [bugfix] chunked transfer http encoding
Message ID:
220DD468-C829-4C71-9F4A-073EA4552151@activestate.com
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;


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About