I'm trying to send a large parameter (about 45000 characters) in a POST request, using LWP::UserAgent, but I get 400 Bad Request error. Sending the same request through a browser works fine.
Error message content:
<HTML>
<HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii">
</HEAD>
<BODY><h2>Bad Request - Request Too Long</h2>
<hr><p>HTTP Error 400. The size of the request headers
is too long.</p>
</BODY></HTML>
Settings I used, without success:
- call $browser->agent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0');
- overwrite MaxLineLength and MaxHeaderLines values in Net::HTTP
How can I make this work?