in reply to Re^2: WWW::Mechanize::Firefox save_url doesn't send cookies
in thread WWW::Mechanize::Firefox save_url doesn't send cookies

Great! Thanks for testing again and confirming that this works. I'll release a new version with the bugfix (and a privacy warning) some time in the next few days. The code will be changed to the following, to support earlier versions of Firefox 3 that don't have the flag yet:

obj_Persist.persistFlags = flags | nsIWBP.PERSIST_FLAGS_FROM_CACHE | nsIWBP["PERSIST_FLAGS_FORCE_ALL +OW_COOKIES"] ;

I just want to also ship a local test server to actually confirm locally that the appropriate cookies are sent.

Replies are listed 'Best First'.
Re^4: WWW::Mechanize::Firefox save_url doesn't send cookies
by tcordes (Novice) on Mar 09, 2011 at 19:31 UTC

    I double-checked the wireshark captures after the bugfix and it is sending (just) the proper cookies, and not any out-of-domain ones. So it seems to be working as you'd expect.

    PS: There's one other place in your .pm (save_content) where perhaps this PERSIST_FLAGS_FORCE_ALLOW_COOKIES should be added as well. Just search on the other instance of PERSIST_FLAGS_FROM_CACHE. I don't use that other function, so I haven't tested it.