AnyEvent::HTTP and "bad" cookies

Mons Anderson mons at cpan.org
Fri Jun 18 11:05:50 CEST 2010


Hello.

I've been talking about this previously personally to Marc.

For now I've made an investigation, while using AE::HTTP as a client to 
different services, that requred much work with cookies.

Current AE::HTTP's cookie parser implementation works wrong:
* when cookie contains flag, like HttpOnly;
* when cookie contains unquoted Expires=Fri, 31-Dec-2010 23:59:59 GMT;
  (at all I see very little count of services, that quote expires)

So, for a long time I've used my own cookie parser
(http://github.com/Mons/HTTP-Easy/blob/master/lib/HTTP/Easy/Cookies/PP.pm)

For now I want to propose to include such a cookie parsing into AE::HTTP 
itself, since in the world of bad servers, and clients, that accept bad 
responses we have a little need in strict parser, that ignores them.

Proposition patch for AE::HTTP-1.45 attached

-- 
Mons Anderson aka Vladimir Perepelitsa
<mons at cpan.org> / #99779956 / quanth at irc.freenode.net
-- 
Mons Anderson aka Vladimir Perepelitsa
<mons at cpan.org> / #99779956 / quanth at irc.freenode.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AnyEvent-HTTP-cookie.patch
Type: text/x-diff
Size: 5012 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/anyevent/attachments/20100618/f36b8209/attachment.patch>


More information about the anyevent mailing list