[drakma-devel] a bug in send-cookie-p function

Tomo Matsumoto tomoyuki28jp at gmail.com
Wed Feb 25 03:57:34 UTC 2009


Hello guys,

This is my first post here.
I think I found a bug in drakma.

When I send an http request to the root directory with cookie path set
to "/", drakma::send-cookie-p function returns nil. Therefore, drakma
don't send any cookie.
ex)
request-uri: "http://localhost/" or "http://localhost/?key=value"
cookie: #<COOKIE sid=xx; expires=Sun, 17-01-2038 19:14:07 GMT; path=/;
domain=localhost>

That is because the way of using puri's uri functions is wrong.
I think Edi expects following code returns "/", but it returns nil.
That's why drakma::send-cookie-p function returns nil.
(let* ((uri "http://localhost/")
       (uri (cond ((puri:uri-p uri) (puri:copy-uri uri))
              (t (puri:parse-uri uri)))))
  (puri:uri-path uri))

Do you think it's a bug in drakma?
Or has it been already fixed?

The versions of related packages.
SBCL 1.0.18.debian
drakma-0.11.5
puri-1.5.1

I am looking forward to hearing from you.

Thanks,
Tomo




More information about the Drakma-devel mailing list