in reply to Setting cookies manually
Most of the settings I gathered from the source of HTTP::Cookies, because the documentation on set_cookie is a bit too sparse.
Anyway, setting discard to true seems to remove the cookie, setting path_spec seems to enable checking of the path, so I set it to 1 and the path to "/" to enable the cookies for the whole server, I set max_age to 0 (you might want to experiment with that), because we're talking about session cookies, and the version to 0 because I've never dealt with v2 cookies before. Default HTTP port is 80.
I end up with this:
$jar->set_cooke(0,"name","value","/","hostname",80,1,0,0,0);
For a more extended introduction to cookies, take a look at the docs for CGI::Cookie.
Good luck.
Joost.
|
|---|