Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 18593
Status: rejected
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: japhy.734 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 5.803
Fixed in: (no value)



Subject: rpc.bloglines.com does not accept _trivial_http_get()'s User-Agent
See <http://www.perlmonks.org/?node_id=541973> for details. Briefly, there are some servers out there that, for some reason, don't like "lwp-trivial/VERSION" as the User-Agent. "lwp-simple/VERSION" works, "LWP::Simple/VERSION" works, "LWP::Trivial/VERSION" works, "lwp-trivial/VERSION" does NOT. This matters because a simple enough get() calls _trivial_http_get() which uses "lwp-trivial/VERSION" as the value for the User-Agent header. The other get* calls (get_old(), getprint(), and getstore()) use "LWP::UserAgent/VERSION" as their User-Agent, and the problem is averted. All it takes is a simple change: --- LWP-Simple.pm.orig 2006-04-07 17:40:43.000000000 -0400 +++ LWP-Simple.pm 2006-04-07 17:41:04.000000000 -0400 @@ -169,7 +169,7 @@ print $sock join("\015\012" => "GET $path HTTP/1.0", "Host: $netloc", - "User-Agent: lwp-trivial/$VERSION", + "User-Agent: LWP::Simple/$VERSION", "", ""); my $buf = "";
Must be their policy because of misuse by somebody using LWP::Simple. I don't think we want to fight them by changing our name. Just use the full interface so that you can set your agent name to be whatever you like if you encounter problems like this. Importing '$ua' from LWP::Simple will make it use the full implementation underneath so you can continue to use the simple interface.