|There's more than one way to do things|
How to remove HTTP Keep-Alive 300 header from LWP::UserAgent requestby Veltro (Hermit)
|on Apr 24, 2018 at 13:23 UTC||Need Help??|
Veltro has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I'd like to remove the Keep-Alive 300 header from the request but I can't figure out how.
I am instantiating the LWP::UserAgent with the intention to use HTTP 1.1 and keeping the connection alive as follows:
my $ua = LWP::UserAgent->new(keep_alive => 1, send_te => 0) ;
send_te => 0 removes the TE header and the header information that I want to send contains tags like:
I have tried several methods creating the request but each and one of them sends the Keep-Alive 300 header.
my $response = $ua->get( $link, @ns_headers ) ;
my $response = $ua->request(GET $link) ; # This does not use @ns_headers
Tryig to get rid of it by specifying this in the @ns_headers does not work:
'KEEP-ALIVE' => undef,
Anyone knows how to do this? Thanks