One thing I find useful when comparing the behavior of my browser to the behavior of a LWP::UserAgent object is to configure the object so that it mimics a real browser, because some servers will respond differently depending on the type of browser they think they are dealing with, and can be particularly unhelpful if they think they're dealing with a robot. (Yes: anti-mecha discrimination is rampant.) Try something like:
See the agent parameter in the docs for LWP::UserAgent. (BTW, the code given above works as-is even if you are using LWP::Simple, as long as you import the package variable $ua from LWP::Simple.)$ua->agent( 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/2 +0050223 Firefox/1.0.1' );
To determine what string to use, for Firefox I use the very handy Live HTTP headers.
the lowliest monk
In reply to Re: LWP::UserAgent and no cookies in my response?
by tlm
in thread LWP::UserAgent and no cookies in my response?
by bageler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |