dagolden / HTTP-CookieJar

A minimalist HTTP user agent cookie jar
2 stars 7 forks source link

Request for a better tutorial #3

Closed SomeAB closed 10 years ago

SomeAB commented 10 years ago

Hi,

I really liked your HTTP:CookieJar, but was having difficulty understanding your code. For example, you do mention, how to use secure attribute for the cookie, but I had problem initially to understand it.

Also, Add cookie.. is same as Set-Cookie? I'm still not able to use this because of my inability to understand the documentation.

Any update on this would be nice.

dagolden commented 10 years ago

What are you trying to do with it? And how familiar are you with RFC 6265?

David

SomeAB commented 10 years ago

Hi David

I reread the whole documentation again, correct me if I'm wrong, HTTP::CookieJar is only a container of sort for storing cookies in a script, and not for setting them?

I was trying to set cookies using it, so guess that wouldn't have worked in the first place right? I'm not very familiar with the RFC 6265, just know that it is the current standard for cookies.

dagolden commented 10 years ago

That's right. It's really most useful for an agent library, like HTTP::TIny, which needs to store cookies received during operations. If you use HTTP::Tiny and provide it a cookie jar object, then it will do the right thing with cookies, just like your browser would. LWP::UserAgent has a similar ability using a cookie jar managed by HTTP::Cookies.

You can also use an agent to set cookies explicitly, but, again, that's really something to read up on in user agent documentation.

I'll close this ticket as it sounds like your question is answered.

SomeAB commented 10 years ago

Thanks a lot David, my bad about the confusion in the first place. I ended up using CGI::Session again.

Any possibility, if you can give me a lead on how to add my own ID:Generator for CGI:Session? I have already wrote a package, but could use any hint about actually using it. As I figured, merely placing it in the the folder CGI/Session/ID didn't work. I would appreciate any help.

dagolden commented 10 years ago

No idea. Sorry. I haven't used CGI::Session before.

SomeAB commented 10 years ago

No worries. Thanks a lot for your time. Cheers!

On 15 January 2014 03:42, David Golden notifications@github.com wrote:

No idea. Sorry. I haven't used CGI::Session before.

— Reply to this email directly or view it on GitHubhttps://github.com/dagolden/http-cookiejar/issues/3#issuecomment-32313274 .

Ahmad Bilal