"email" <[EMAIL PROTECTED]> writes:

> I am using LWP to post a form with one pair name1, $value1 to a CGI 
> script. $value1 is very long (8222 bytes), but I can post successfully 
> to most servers.  However, it failed on IIS 5 and I receive the error:
> 500 Line too long (limit is 4096)

The "500 Line too long (limit is 4096)" is generated internally in
Net::HTTP when one of the header lines of the response are longer than
this.  What is the header value is the server sending back in this

> When I post the form data using a browser like Netscape, or IE, it 
> works, so I suspect there is something that I need to do for LWP to 
> work too.  Probably breaking $value1 into pieces, but I don't see how.  
> Specifying a Content_Length header does not help.  My code is something 
> like the following. Please let me know if you have any suggestion. 

Try to add this code to your client:

    push(@LWP::Protocol::http::EXTRA_SOCK_OPTS, MaxLineLength => 16*1024);

Reply via email to