Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: LWP::UserAgent doesn't send my HTTP::Cookies

by Anonymous Monk
on Jul 01, 2016 at 19:29 UTC ( [id://1167017]=note: print w/replies, xml ) Need Help??


in reply to Re: LWP::UserAgent doesn't send my HTTP::Cookies
in thread LWP::UserAgent doesn't send my HTTP::Cookies

What do you expect? Do you expect that $ua shoehorns its cookie-jar into the new HTTP::Request object? You are expecting too much magic, I guess ;-)

Yeah, $ua will absolutely take cookies from the cookiejar and add them to any requests, if they exist

  • Comment on Re^2: LWP::UserAgent doesn't send my HTTP::Cookies

Replies are listed 'Best First'.
Re^3: LWP::UserAgent doesn't send my HTTP::Cookies
by wazoox (Prior) on Jul 05, 2016 at 11:14 UTC
    That's why I mention that the cookie is displayed, therefore it exists :)

      Most likely you can easily swap out WWW::Mechanize for your hand-rolled version of the user agent. If it works with WWW::Mechanize, then something is weird in your cookie handling.

      You haven't shown whether the cookie has some path or something that would restrict it from being sent. See below for code by Anonymous Monk that outputs some more debug information.

        Yep, I'll try to write another helper script using WWW:Mechanize instead, to see if it fares any better. As for this one, well, the ugly hack version works so...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-26 07:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found