[OT] LWP::UserAgent and the TE: header

Bradley Dean bjdean at bjdean.id.au
Fri Jun 20 12:19:32 BST 2008

On Fri, Jun 20, 2008 at 11:51:15AM +0100, Nicholas Clark wrote:
> Problem is that there is an option to turn it off in the Net::HTTP
> constructor:
> =item $s = Net::HTTP->new( %options )
> ...

I ran into a problem like this and discovered that you can pass options to
the Net::HTTP object using an internal variable in LWP::Protocol::http :

  my %OPTS = @LWP::Protocol::http::EXTRA_SOCK_OPTS;
  $OPTS{MaxLineLength} = 8192; # Or however large is needed...
  @LWP::Protocol::http::EXTRA_SOCK_OPTS = %OPTS;

(In this case the problem being solved was that LWP::UserAgent fails
sometimes on huge header lines which is an exception triggered by

I commented on this here:


Perhaps you can pass your option in the same way.


Bradley Dean
Software Engineer - http://bjdean.id.au/
Email: bjdean at bjdean.id.au Skype: skype at bjdean.id.au
Mobile(Aus): +61-413014395 Mobile(UK): +44-7846895073

More information about the london.pm mailing list