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.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"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
Index: http-client.scm
===================================================================
--- http-client.scm     (revision 22092)
+++ http-client.scm     (working copy)
@@ -298,7 +298,7 @@
     (for-each (lambda (c)
                 (and-let* (((get-param 'version c)) ; required for set-cookie2
                            (path (get-param 'path c (string-join (cdr 
(uri-path uri)) "/")))
-                           ((path-match? uri (get-param 'path c)))
+                           ((path-match? uri path))
                            (dn (get-param 'domain c (uri-host uri)))
                            ((or (string-ci=? dn ".local")
                                 (and (not (string-null? dn))
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to