Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: "406 not acceptable" errors with LWP::UserAgent::get

by jimhenry (Novice)
on Aug 18, 2020 at 20:18 UTC ( #11120883=note: print w/replies, xml ) Need Help??


in reply to Re^2: "406 not acceptable" errors with LWP::UserAgent::get
in thread "406 not acceptable" errors with LWP::UserAgent::get

Thanks for the replies. I tried setting the agent to the user-agent string used by my current version of Firefox and had no trouble. (I'm still not sure why I was getting a 406 error for this podcast instead of a 403 Forbidden error, which I was getting on a number of podcasts with the default agent of "libwww-perl".)
  • Comment on Re^3: "406 not acceptable" errors with LWP::UserAgent::get

Replies are listed 'Best First'.
Re^4: "406 not acceptable" errors with LWP::UserAgent::get
by Your Mother (Bishop) on Aug 18, 2020 at 23:57 UTC

    You can of course do whatever you want but I encourage you to use a unique agent name and version for your script; maybe even a less whimsical one than my original suggestion. :P I meant to expand on this and forgot. It’s more transparent—I’d argue more honest—better metrics for the host, and being a good netizen, from an API standpoint, is better for everyone and, I believe, reflects well on Perl compared to some other more, uh, mercenary communities. Update: response codes are at the discretion of the host code and webserver. They are frequently not particularly sensible.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11120883]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2020-11-27 07:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?