From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Clinton Ebadi Newsgroups: gmane.lisp.guile.devel Subject: guile-www patches Date: Thu, 11 Jul 2002 11:58:13 -0400 Sender: guile-devel-admin@gnu.org Message-ID: <200207111158.13245.unknown_lamer@unknownlamer.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_1PD3MCYF18RCTV88SCCX" X-Trace: main.gmane.org 1026403123 1077 127.0.0.1 (11 Jul 2002 15:58:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 11 Jul 2002 15:58:43 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17SgL5-0000HG-00 for ; Thu, 11 Jul 2002 17:58:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17SgKV-0005ch-00; Thu, 11 Jul 2002 11:58:07 -0400 Original-Received: from whale.nocdns.com ([209.151.66.88]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17SgJf-0005bU-00 for ; Thu, 11 Jul 2002 11:57:15 -0400 Original-Received: from pool-151-196-171-109.balt.east.verizon.net ([151.196.171.109] helo=vsynth ident=mail) by whale.nocdns.com with asmtp (Exim 3.35 #1) id 17SgJf-0006Zu-00 for guile-devel@gnu.org; Thu, 11 Jul 2002 11:57:16 -0400 Original-Received: from clinton by vsynth with local (Exim 3.35 #1 (Debian)) id 17SgKb-0003WH-00 for ; Thu, 11 Jul 2002 11:58:13 -0400 Original-To: guile-devel@gnu.org User-Agent: KMail/1.4.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - whale.nocdns.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [0 0] X-AntiAbuse: Sender Address Domain - vsynth.aletia.com Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:785 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:785 --------------Boundary-00=_1PD3MCYF18RCTV88SCCX Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have two patches for http.scm and cgi.scm. I changed make-shared-substr= ing=20 into substring because make-shared-substring is deprecated, fixed the use= of=20 bound? in cgi.scm (instead I have to optional values default to #f), and = made=20 cgi.scm use #:key instead of #&key. --=20 http://unknownlamer.org Facts do not cease to exist because they are ignored. -- Aldous Huxley Flag Burner. --------------Boundary-00=_1PD3MCYF18RCTV88SCCX Content-Type: text/x-diff; charset="us-ascii"; name="cgi_patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="cgi_patch" --- cgi.scm.orig=09Thu Jul 11 11:49:11 2002 +++ cgi.scm=09Fri Jul 5 19:17:46 2002 @@ -52,7 +52,7 @@ ;; (cgi:upload name) ;; (cgi:cookies name) ;; (cgi:cookie name) -;; (cgi:make-cookie value #&key path domain expires secure) +;; (cgi:make-cookie value #:key path domain expires secure) =20 ;;; Code: =20 @@ -124,7 +124,7 @@ ;; path associated with the cookie. ;; (cgi:cookies NAME) ;; Fetch the first cookie value associated with NAME. -;; (cgi:make-cookie NAME VALUE #&key path domain expires secure) +;; (cgi:make-cookie NAME VALUE #:key path domain expires secure) ;; Create a cookie suitable for inclusion into an HTTP response ;; header. Recognize optional parameters path, doman, expires, ;; (which should be strings) and secure (which is boolean). @@ -173,17 +173,18 @@ (and cookie-values (car cookie-values)))) =20 (define-public cgi:make-cookie - (lambda* (name value #&key path domain expires secure) + (lambda* (name value #:key (path #f) (domain #f)=20 +=09=09 (expires #f) (secure #f)) (format #f "Set-Cookie: ~A=3D~A~A~A~A~A" name value - (if (bound? path) + (if path (format #f "; path=3D~A" path) "") - (if (bound? domain) + (if domain (format #f "; domain=3D~A" domain) "") - (if (bound? expires) + (if expires (format #f "; expires=3D~A" expires) "") - (if (and (bound? secure) secure) - "; secure" "")))) + (if secure +=09=09 "; secure" "")))) =20 =20 =0C @@ -203,10 +204,11 @@ ;; Values are URL-encoded, so url:decode must be called on each one. (define (get-name pair) (let ((p (string-index pair #\=3D))) - (and p (make-shared-substring pair 0 p)))) + (and p (substring pair 0 p)))) (define (get-value pair) (let ((p (string-index pair #\=3D))) - (and p (url:decode (make-shared-substring pair (+ p 1)))))) + (and p (url:decode (substring pair (+ p 1)))))) + (for-each (lambda (pair) =09 (let* ((name (get-name pair)) =09=09 (value (get-value pair)) @@ -376,8 +378,7 @@ (str str)) (let ((pos (string-rindex str ch))) (if pos -=09 (loop (cons (make-shared-substring str (+ 1 pos)) fields) -=09=09(make-shared-substring str 0 pos)) -=09 (cons str fields))))) + =09 (loop (cons (substring str (+ 1 pos)) fields) + =09=09(substring str 0 pos)))))) =20 ;;; www/cgi.scm ends here --------------Boundary-00=_1PD3MCYF18RCTV88SCCX Content-Type: text/x-diff; charset="us-ascii"; name="http_patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="http_patch" --- http.scm.orig=09Thu Jul 11 11:49:28 2002 +++ http.scm=09Sat Apr 27 20:03:55 2002 @@ -135,9 +135,9 @@ (define (parse-status-line statline) (let* ((first (string-index statline #\space)) =09 (second (string-index statline #\space (1+ first)))) - (list (make-shared-substring statline 0 first) -=09 (make-shared-substring statline (1+ first) second) -=09 (make-shared-substring statline (1+ second))))) + (list (substring statline 0 first) + =09 (substring statline (1+ first) second) + =09 (substring statline (1+ second))))) =20 =0C ;;; HTTP connection management functions. @@ -317,6 +317,6 @@ =09 (set! end (1- end))) (if (< end st) =09"" -=09(make-shared-substring s st end)))) +=09(substring s st end)))) =20 ;;; www/http.scm ends here --------------Boundary-00=_1PD3MCYF18RCTV88SCCX-- _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel