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

Edi Weitz edi at agharta.de
Wed Feb 25 07:48:01 UTC 2009


On Wed, Feb 25, 2009 at 4:57 AM, Tomo Matsumoto <tomoyuki28jp at gmail.com> wrote:

> 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?

Thanks for the report.  I fixed it in the dev version:

  http://bknr.net/trac/changeset/4322

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

You're not using the latest version of Drakma (but it had the same problem).

Cheers,
Edi.




More information about the Drakma-devel mailing list