/[guile]/guile/guile-www/cgi.scm
ViewVC logotype

Diff of /guile/guile-www/cgi.scm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by ttn, Sat Apr 27 01:49:47 2002 UTC revision 1.7 by mvo, Sun Aug 31 18:36:34 2003 UTC
# Line 1  Line 1 
1  ;;; www/cgi.scm --- Common Gateway Interface support for WWW scripts  ;;; www/cgi.scm --- Common Gateway Interface support for WWW scripts
2    
3  ;;      Copyright (C) 1997,2001,2002 Free Software Foundation, Inc.  ;;      Copyright (C) 1997,2001,2002, 2003 Free Software Foundation, Inc.
4  ;;  ;;
5  ;; This program is free software; you can redistribute it and/or modify  ;; This program is free software; you can redistribute it and/or modify
6  ;; it under the terms of the GNU General Public License as published by  ;; it under the terms of the GNU General Public License as published by
# Line 124  Line 124 
124  ;;     path associated with the cookie.  ;;     path associated with the cookie.
125  ;; (cgi:cookies NAME)  ;; (cgi:cookies NAME)
126  ;;     Fetch the first cookie value associated with NAME.  ;;     Fetch the first cookie value associated with NAME.
127  ;; (cgi:make-cookie NAME VALUE #&key path domain expires secure)  ;; (cgi:make-cookie NAME VALUE #:key path domain expires secure)
128  ;;     Create a cookie suitable for inclusion into an HTTP response  ;;     Create a cookie suitable for inclusion into an HTTP response
129  ;;     header. Recognize optional parameters path, doman, expires,  ;;     header. Recognize optional parameters path, doman, expires,
130  ;;     (which should be strings) and secure (which is boolean).  ;;     (which should be strings) and secure (which is boolean).
# Line 173  Line 173 
173      (and cookie-values (car cookie-values))))      (and cookie-values (car cookie-values))))
174    
175  (define-public cgi:make-cookie  (define-public cgi:make-cookie
176    (lambda* (name value #&key path domain expires secure)    (lambda* (name value #:key path domain expires secure)
177             (format #f "Set-Cookie: ~A=~A~A~A~A~A"             (format #f "Set-Cookie: ~A=~A~A~A~A~A"
178                     name value                     name value
179                     (if (bound? path)                     (if path
180                         (format #f "; path=~A" path) "")                         (format #f "; path=~A" path) "")
181                     (if (bound? domain)                     (if domain
182                         (format #f "; domain=~A" domain) "")                         (format #f "; domain=~A" domain) "")
183                     (if (bound? expires)                     (if expires
184                         (format #f "; expires=~A" expires) "")                         (format #f "; expires=~A" expires) "")
185                     (if (and (bound? secure) secure)                     (if secure
186                         "; secure" ""))))                         "; secure" ""))))
187    
188    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26