http://qs321.pair.com?node_id=1213593


in reply to How to remove HTTP Keep-Alive 300 header from LWP::UserAgent request

Since you've asked for keep-alives in the constructor: my $ua = LWP::UserAgent->new(keep_alive => 1, send_te => 0) ; then LWP will add both the Connection: keep-alive and the Keep-Alive: 300, as the standard specifies

According to the LWP::UserAgent docs, the argument to keep_alive is the maximum number of connections to cache, so if you do need keep-alives, then 1 is probably not the right number.