in reply to Re: Re: Re: LWP::UserAgent Wrongly Uses HTTP/1.1
in thread LWP::UserAgent Wrongly Uses HTTP/1.1
Mmm. dunno. I've already spent far too much time researching your problem, when I have real work to do! :). I would guess no, it's not possible for the same script to, since it looks like http10.pm will only make HTTP/1.0 requests. Perhaps set/unset the ENV variable and spawn off scripts that make the requests?. Good luck!
Update
Perhaps AM's suggestion is a direction to try... here's some sort-of tested code to play with.
use LWP::UserAgent; require LWP::Protocol::http10; my $url = "http://localhost/"; my $ua = LWP::UserAgent->new(); my $req = HTTP::Request->new(GET => $url); # make HTTP/1.1 request LWP::Protocol::implementor('http', 'LWP::Protocol::http'); $ua->request($req); # make HTTP/1.0 request LWP::Protocol::implementor('http', 'LWP::Protocol::http10'); $ua->request($req);
|
|---|