I waded through some of the LWP::UserAgent code to try and find your answer. I think I found it. Basically, I don't think you can get LWP to do this. The reason (from what I think I understood) is as follows.
LWP::UserAgent seems to only honor the method (i.e. http, https) and uri of the HTTP::Request that you give it. The protocol() method that you are trying to set on the Request (which is actually inherited from HTTP::Message) seems to only be used for setting the protocol of the peer (i.e. web-server) for the HTTP::Response that you get back.
What determines the protocol of the request (which is what you're interested in) is the http_version of the Net::HTTP::Methods object, which the LWP::Protocol::http::Socket (which is how the request is actually sent) inherits from. The crucial bit of code is found in LWP/Protocol/http.pm, in the _new_socket() method, where the socket is created. The call to new() would need to have an argument HTTPVersion => '1.0', which Net::HTTP->new() (Net::HTTP is a sub-class of IO::Socket::INET, FYI) would use to set the request HTTP version to 1.0.
Whew. Hope that made some sense.
In reply to Re: LWP::UserAgent Wrongly Uses HTTP/1.1
by edan
in thread LWP::UserAgent Wrongly Uses HTTP/1.1
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |