Cookie handling on HTTP server side?
Zsbán Ambrus
ambrus at math.bme.hu
Thu Dec 29 17:50:52 CET 2011
Hello,
Do you know about some perl module that handles HTTP cookies on the
HTTP server side properly?
It's important that it can handle both old-style (Netscape) and
new-style (RFC 2965) cookies. I'd like something that can be combined
with any HTTP server or CGI or similar framework. This means you
should somehow be able to pass it all the Cookie and Cookie2 headers
from the request, even if there's more than one of some of those, and
it can give you a Set-Cookie and Set-Cookie2 headers that you put in
the response somehow.
Of the existing solutions, the CGI module doesn't handle parsing
new-style request cookie headers properly (and I have doubts about it
being correct in old-style cookies too). The LWP module (currently)
doesn't seem to have any function to parse the contents of Cookie*
headers, nor to format Set-Cookie* headers, so you can only use it on
client side.
I'm asking this question because jdporter asks (in the perlmonks
chatterbox) how he can do cookie handling when he uses HTTP::Daemon
(from LWP) as the HTTP server. I'm asking on this channel because
elmex has the AnyEvent::HTTP module.
Best wishes for new year,
Ambrus
More information about the anyevent
mailing list