Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

How to get various cookie's attributes? #11

Open
didip opened this issue Feb 3, 2016 · 4 comments
Open

How to get various cookie's attributes? #11

didip opened this issue Feb 3, 2016 · 4 comments

Comments

@didip
Copy link

didip commented Feb 3, 2016

E.g. Expires, Max-Age, Domain...

Basically, I need the opposite of local function bake(cookie). Parse the cookie string and returns me cookie object.

@calio
Copy link
Contributor

calio commented Mar 22, 2016

If I understand correctly, you want to parse "Set-Cookie" header and test attributes? Can you tell me more about the use case?

@didip
Copy link
Author

didip commented Mar 22, 2016

I guess I was thinking in terms of Tomcat's jsessionid or Rails cookie secret, where various metadata about the cookie and the content is serialized in the cookie securely.

I am not sure if that's beyond the scope of this library, if so, feel free to close this ticket.

@calio
Copy link
Contributor

calio commented Mar 24, 2016

If they have the same format as Set-Cookie, then I think it's still in the scope.

@didip
Copy link
Author

didip commented Mar 24, 2016

That would be great! The interface should mirror the bake() function.

Essentially, if there's an unbake() function, it will deserialize and return a table containing cookie metadata, e.g. max-age.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants