develooper Front page | perl.perl5.porters | Postings from March 2007

[perl #41973] libwww http.pm bug + patch

Thread Next
From:
Gajdov Gabor
Date:
March 22, 2007 05:43
Subject:
[perl #41973] libwww http.pm bug + patch
Message ID:
rt-3.6.HEAD-1687-1174565678-1453.41973-75-0@perl.org
# New Ticket Created by  Gajdov Gabor 
# Please include the string:  [perl #41973]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41973 >


Dear Perl crew!

I hope, I'm writing to the correct e-mail address about libwww 
LWP::Protocol::http.pm bug.
I think we've found a bug in the http.pm module.

Situation:
We have to send xml documents in POST method to a server via an unknown 
reverse proxy.

Problem:
We found out that if the xml document is above an exact size (8k) we get 
back an "500 write failed" error message.
After a day of debugging my colleague found the problem:
The transaction may run on timeout after the header at the proxy side 
and reset the connection, so it doesn't receive the content.

Solution:
After applying the attached patch: in the request the CRLF after the 
header, will sent with the content, in this way the proxy will wait for 
the content and doesn't reset the connection. And the transaction works 
properly.

I hope you'll find it useful.
And sorry for my bad English.

Cheers,

Gabor Gajdov
Linux System Engineer
Hungary.Network Inc.


Thread Next


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