[drakma-devel] drakma:get-cookies fails to parse cookies with commas in values

Andrei Stebakov lispercat at gmail.com
Wed Sep 16 20:59:59 UTC 2009


One of the web sites started to give me cookies with commas and
drakma:get-cookies just crashes on those requests.
I distilled my case into a small example like this:
(drakma::get-cookies
  '((:CONTENT-TYPE . "text/html; charset=utf-8")
    (:LOCATION . "http://www.test")
    (:SERVER . "Microsoft-IIS/7.0")
    (:CONTENT-LENGTH . "46")
    (:DATE . "Sat, 12 Sep 2009 14:58:04 GMT") (:CONNECTION . "close")
    (:SET-COOKIE
     . "domain=test.com; expires=Thu, 12-Sep-2109 14:58:04 GMT;
session=6,Direct,placeholder,test.com;")
    (:CACHE-CONTROL . "private"))
  (puri:parse-uri "http://www.test.com"))

It'll throw an exception trying to parse "session=6,Direct,placeholder,
test.com" pair and will complain about the commas.
I tried to capture the same page with FF Live Http Headers and it has no
problems with that.
Do you think we could change drakma to be able to digest it as well?

Thank you,
Andrei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/drakma-devel/attachments/20090916/f7fc3fb2/attachment.html>


More information about the Drakma-devel mailing list