On Nov 18, 2007 11:30 AM, Peter Scott <[EMAIL PROTECTED]> wrote:
>
> Okay, I reproduced this and solved it.  First, I verified that I got a
> proper response from Safari.  Then I ran tcpdump to compare the request
> sent by Safari with the one sent by Mech.  (Regrettably, setting
> LWP::Debug +conns does not show traffic unless you take the obscure step
> of setting the environment variable PERL_LWP_USE_HTTP_10 to revert to HTTP
> 1.0, so I use tcpdump instead.)  Then I adjusted headers until I found one
> that worked.
>
> Add
>
>         $mech->add_header( Accept => '*/*' );
>
> before the fetch and the server will respond properly.  Don't know why
> it's behaving that way.

Unusual.
Does Mech by default not set an Accept line?
As I wrote earlier, I tried downloading the page with the standard
wget tool and the lynx text-based browser and neither managed to get
the page.
Do most servers simply not bother to check the Accept header?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to