* Fix for guile-www/cgi.scm (cgi:make-cookie)
@ 2003-08-28 14:53 Thamer Al-Harbash
2003-08-29 10:44 ` Thien-Thi Nguyen
2003-08-31 18:39 ` Marius Vollmer
0 siblings, 2 replies; 6+ messages in thread
From: Thamer Al-Harbash @ 2003-08-28 14:53 UTC (permalink / raw)
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.
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix for guile-www/cgi.scm (cgi:make-cookie)
2003-08-28 14:53 Fix for guile-www/cgi.scm (cgi:make-cookie) Thamer Al-Harbash
@ 2003-08-29 10:44 ` Thien-Thi Nguyen
2003-08-29 13:00 ` Thamer Al-Harbash
2003-08-31 18:47 ` Marius Vollmer
2003-08-31 18:39 ` Marius Vollmer
1 sibling, 2 replies; 6+ messages in thread
From: Thien-Thi Nguyen @ 2003-08-29 10:44 UTC (permalink / raw)
Cc: bug-guile
From: Thamer Al-Harbash <tmh@whitefang.com>
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:
sounds like guile-1.6 breaks guile-www, not the other way around.
the solution to supporting both #&foo and #:foo style taken for
guile-1.4.x is to leave (ice-9 optargs) alone and introduce (ice-9
optargs-kw) which handles the #:foo style. perhaps this can be done for
guile-1.6 so that it supports interoperability w/ old code.
another idea if guile-1.6 has no desire to support #&foo, is to provide
(ice-9 optargs-kw) as a simple wrapper/alias for its changed (ice-9
optargs), at which point i would be happy to change guile-www to use
(ice-9 optargs-kw) since that would be available in guile-1.4.x and 1.6.
thi
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix for guile-www/cgi.scm (cgi:make-cookie)
2003-08-29 10:44 ` Thien-Thi Nguyen
@ 2003-08-29 13:00 ` Thamer Al-Harbash
2003-08-29 13:11 ` Thien-Thi Nguyen
2003-08-31 18:47 ` Marius Vollmer
1 sibling, 1 reply; 6+ messages in thread
From: Thamer Al-Harbash @ 2003-08-29 13:00 UTC (permalink / raw)
Cc: bug-guile
On Fri, 29 Aug 2003, Thien-Thi Nguyen wrote:
> another idea if guile-1.6 has no desire to support #&foo, is to provide
> (ice-9 optargs-kw) as a simple wrapper/alias for its changed (ice-9
> optargs), at which point i would be happy to change guile-www to use
> (ice-9 optargs-kw) since that would be available in guile-1.4.x and 1.6.
If this patch works fine with the optargs module why not use it
for the sake of simplicity? Does my patch break something?
--
Thamer Al-Harbash
GPG Key fingerprint: D7F3 1E3B F329 8DD5 FAE3 03B1 A663 E359 D686 AA1F
"HLAGHLHALUAG (KTHANX)"
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix for guile-www/cgi.scm (cgi:make-cookie)
2003-08-29 13:00 ` Thamer Al-Harbash
@ 2003-08-29 13:11 ` Thien-Thi Nguyen
0 siblings, 0 replies; 6+ messages in thread
From: Thien-Thi Nguyen @ 2003-08-29 13:11 UTC (permalink / raw)
Cc: bug-guile
From: Thamer Al-Harbash <tmh@whitefang.com>
Date: Fri, 29 Aug 2003 09:00:57 -0400 (EDT)
If this patch works fine with the optargs module why not use it
for the sake of simplicity? Does my patch break something?
the "optargs module" has an interface and a name. its interface was
changed for guile-1.6 while its name remained the same. this broke old
code (a mistake that is not too late to correct).
your patch would reinforce the confusion.
(btw, simplicity is a matter of how much you leave out of the
picture. ;-)
thi
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix for guile-www/cgi.scm (cgi:make-cookie)
2003-08-28 14:53 Fix for guile-www/cgi.scm (cgi:make-cookie) Thamer Al-Harbash
2003-08-29 10:44 ` Thien-Thi Nguyen
@ 2003-08-31 18:39 ` Marius Vollmer
1 sibling, 0 replies; 6+ messages in thread
From: Marius Vollmer @ 2003-08-31 18:39 UTC (permalink / raw)
Cc: bug-guile
Thamer Al-Harbash <tmh@whitefang.com> writes:
> Please accept my patch below which fixes the problem:
Applied. Thanks!
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fix for guile-www/cgi.scm (cgi:make-cookie)
2003-08-29 10:44 ` Thien-Thi Nguyen
2003-08-29 13:00 ` Thamer Al-Harbash
@ 2003-08-31 18:47 ` Marius Vollmer
1 sibling, 0 replies; 6+ messages in thread
From: Marius Vollmer @ 2003-08-31 18:47 UTC (permalink / raw)
Cc: bug-guile, tmh
Thien-Thi Nguyen <ttn@glug.org> writes:
> From: Thamer Al-Harbash <tmh@whitefang.com>
> 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:
>
> sounds like guile-1.6 breaks guile-www, not the other way around.
To clarify: 1.6 still supports the #& syntax but warns that it is
deprecated. The 'bound?' macro has been removed since it was a bug to
expose SCM_UNDEFINED as a Scheme value.
> another idea if guile-1.6 has no desire to support #&foo, is to provide
> (ice-9 optargs-kw) as a simple wrapper/alias for its changed (ice-9
> optargs), at which point i would be happy to change guile-www to use
> (ice-9 optargs-kw) since that would be available in guile-1.4.x and 1.6.
We should just move forward and fix existing code in this case, like
Thamer did.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-08-31 18:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-28 14:53 Fix for guile-www/cgi.scm (cgi:make-cookie) Thamer Al-Harbash
2003-08-29 10:44 ` Thien-Thi Nguyen
2003-08-29 13:00 ` Thamer Al-Harbash
2003-08-29 13:11 ` Thien-Thi Nguyen
2003-08-31 18:47 ` Marius Vollmer
2003-08-31 18:39 ` Marius Vollmer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).