[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] http-client and set-cookie

From: Peter Bex
Subject: Re: [Chicken-users] http-client and set-cookie
Date: Sun, 26 Dec 2010 00:29:54 +0100
User-agent: Mutt/

On Sat, Dec 25, 2010 at 08:04:33PM -0300, Hugo Arregui wrote:
> Hi guys,
> I localized the problem, the request header contains:  (set-cookie
> #(("blogger_TID" . "XXX") ((httponly . #t))))
> and in http-client.scm:299 (process-set-cookie! proc), (get-param
> 'path c) returns #f
> I just check for #f first, and works fine.
> Now, my questions:
> -it's a bug? I really don't understand what get-param is.

It's a bug.  Path is an optional parameter for the set-cookie header.
get-param simply extracts that parameter from the header.  It looks like
I added code to default to the current URI's path, but I forgot to
actually use the derived path.

Please try the attached patch and let me know if it helps.

> -It's was hard to find the problem because the stack wasn't helpful, i
> have to debug by hand, adding prints on egg source and that kind of
> things. Is there a better way to do that?

The debug output is helpful, if you realize it's a continuation call
trace rather than a traditional "call stack".  I often find the default
length is a little short though.  You can increase that with -:aN where
N is the desired length.  I usually just pass -:a100 or something and
scroll through it.

"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: http-client.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]