What the Anonymous Monk is referring to is doing this in your code:
use LWP;
require LWP::Protocol::http10;
LWP::Protocol::implementor('http', 'LWP::Protocol::http10');
my $ua = LWP::UserAgent->new();
$ua->get('http://server.local/foo');
This code would connect to server.local using HTTP/1.0 instead of HTTP/1.1.
But instead of using LWP::Protocol::http10 as your Protocol implementor, copy LWP::Protocol::http10 code to a new module, perhaps call it MyLWP::Protocol::brokenhttp and change the code in there to use your custom HTTP version and GET format
Update: This was slightly covered already, but something like: find the LWP/Protocol/http10.pm file in your perl library, copy it to your local lib path as MyLWP/Protocol/brokenhttp.pm then edit it, then use that name as the last option to the implementor function.
| [reply] [d/l] [select] |
| [reply] |
in LWP::Protocol::http10, why aren't you looking?
| [reply] |
| [reply] |
LWP::Protocol::http10 has no protocol() method. Nor does LWP::Protocol have one. Don't me smarmy.
I said look for ->protocol, not a protocol method.
I combed the source code of all those modules before I even posted.
Combed? Try Ctrl+F
Implementor is poorly documented and LWP::Protocol::http10 is not documented at all.
Can you explain how?
So don't act like "I should just know."
Huh?
| [reply] |