http://qs1969.pair.com?node_id=506957


in reply to LWP::UserAgent with HTTP::Cookies problems

Cookies are a pain to debug. It's helpful to see exactly what headers are being passed back and forth. There's a very cool tool called Charles that can help. It's a personal proxy server made for debugging things like this.

Tell your perl script to use it and record that request/response. Then tell your browser to use it and record that. Then compare the two. Chances are some difference between the headers or the request content will jump out at you.

As a separate note, are you sure the domain in your cookies is valid? I think cookie domains are supposed to start with a ".", like ".here.com". I'm not sure though. (That's something you could find out by proxying your browser.)

-Joe

  • Comment on Re: LWP::UserAgent with HTTP::Cookies problems

Replies are listed 'Best First'.
Re^2: LWP::UserAgent with HTTP::Cookies problems
by planetscape (Chancellor) on Nov 10, 2005 at 17:13 UTC

    Thanks for pointing out Charles - that may be useful in future. :-) Ooh, I shoulda mentioned Ethereal...

    planetscape
Re^2: LWP::UserAgent with HTTP::Cookies problems
by Alives (Initiate) on Nov 09, 2005 at 07:09 UTC
    thanks for the help. i ended up using mechanize. i really appreciate all this!!!