[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix for guile-www/cgi.scm (cgi:make-cookie)
From: |
Thamer Al-Harbash |
Subject: |
Fix for guile-www/cgi.scm (cgi:make-cookie) |
Date: |
Thu, 28 Aug 2003 10:53:34 -0400 (EDT) |
This cgi::make-cookie breaks under guile-1.6 because it's using a
#&key and the (bound?) macro which seem to be no longer available
or depreciated. Please accept my patch below which fixes the
problem:
Index: cgi.scm
===================================================================
RCS file: /cvsroot/guile/guile/guile-www/cgi.scm,v
retrieving revision 1.6
diff -c -r1.6 cgi.scm
*** cgi.scm 27 Apr 2002 01:49:47 -0000 1.6
--- cgi.scm 28 Aug 2003 14:49:36 -0000
***************
*** 173,190 ****
(and cookie-values (car cookie-values))))
(define-public cgi:make-cookie
! (lambda* (name value #&key path domain expires secure)
(format #f "Set-Cookie: ~A=~A~A~A~A~A"
name value
! (if (bound? path)
(format #f "; path=~A" path) "")
! (if (bound? domain)
(format #f "; domain=~A" domain) "")
! (if (bound? expires)
(format #f "; expires=~A" expires) "")
! (if (and (bound? secure) secure)
"; secure" ""))))
-
;;; Internal functions.
--- 173,189 ----
(and cookie-values (car cookie-values))))
(define-public cgi:make-cookie
! (lambda* (name value #:key path domain expires secure)
(format #f "Set-Cookie: ~A=~A~A~A~A~A"
name value
! (if path
(format #f "; path=~A" path) "")
! (if domain
(format #f "; domain=~A" domain) "")
! (if expires
(format #f "; expires=~A" expires) "")
! (if secure
"; secure" ""))))
;;; Internal functions.
- Fix for guile-www/cgi.scm (cgi:make-cookie),
Thamer Al-Harbash <=