[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-www cgi.scm http.scm main.scm url.scm
From: |
Thien-Thi Nguyen |
Subject: |
guile/guile-www cgi.scm http.scm main.scm url.scm |
Date: |
Thu, 15 Nov 2001 20:46:41 -0500 |
CVSROOT: /cvs
Module name: guile
Changes by: Thien-Thi Nguyen <address@hidden> 01/11/15 20:46:41
Modified files:
guile-www : cgi.scm http.scm main.scm url.scm
Log message:
Add commentary; nfc.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-www/cgi.scm.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-www/http.scm.diff?cvsroot=OldCVS&tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-www/main.scm.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-www/url.scm.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: guile/guile-www/cgi.scm
diff -u guile/guile-www/cgi.scm:1.3 guile/guile-www/cgi.scm:1.4
--- guile/guile-www/cgi.scm:1.3 Wed Dec 24 02:08:32 1997
+++ guile/guile-www/cgi.scm Thu Nov 15 20:46:41 2001
@@ -1,26 +1,58 @@
-;;;; cgi.scm: Common Gateway Interface support for WWW scripts.
+;;;; www/cgi.scm: Common Gateway Interface support for WWW scripts.
-(define-module (www cgi)
- :use-module (www url))
-
;;;; Copyright (C) 1997 Free Software Foundation, Inc.
-;;;;
+;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2, or (at your option)
;;;; any later version.
-;;;;
+;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;;; GNU General Public License for more details.
-;;;;
+;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this software; see the file COPYING. If not, write to
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
-;;;;
+;;;;
+;;; Commentary:
+
+;; This module exports the following variables and procedures:
+;; cgi-server-software-type
+;; cgi-server-software-version
+;; cgi-server-hostname
+;; cgi-gateway-interface
+;; cgi-server-protocol-name
+;; cgi-server-protocol-version
+;; cgi-server-port
+;; cgi-request-method
+;; cgi-path-info
+;; cgi-path-translated
+;; cgi-script-name
+;; cgi-query-string
+;; cgi-remote-host
+;; cgi-remote-addr
+;; cgi-authentication-type
+;; cgi-remote-user
+;; cgi-remote-ident
+;; cgi-content-type
+;; cgi-content-length
+;; cgi-http-accept-types
+;; cgi-http-user-agent
+;; (cgi:init)
+;; (cgi:values name)
+;; (cgi:value name)
+;; (cgi:names)
+;; (cgi:form-data?)
+
+;;; Code:
+
+(define-module (www cgi)
+ :use-module (www url))
+
(define form-variables '())
;;; CGI environment variables.
@@ -172,7 +204,7 @@
((or (>= i num) (eof-object? ch)) s)
(string-set! s i ch))))
-;; This is defined in #/ice-9/string-fun, but the interface is
+;; This is defined in (ice-9 string-fun), but the interface is
;; weird, the semantics perverse, and it doesn't work. We use
;; a working copy here.
(define (separate-fields-discarding-char ch str)
@@ -183,3 +215,5 @@
(loop (cons (make-shared-substring str (+ 1 pos)) fields)
(make-shared-substring str 0 pos))
(cons str fields)))))
+
+;;; www/cgi.scm ends here
Index: guile/guile-www/http.scm
diff -u guile/guile-www/http.scm:1.7 guile/guile-www/http.scm:1.8
--- guile/guile-www/http.scm:1.7 Sun Feb 4 13:11:24 2001
+++ guile/guile-www/http.scm Thu Nov 15 20:46:41 2001
@@ -1,27 +1,46 @@
-;;;; http.scm: HTTP client library for Guile.
-;;;;
-
-(define-module (www http)
- :use-module (www url)
- :use-module (ice-9 regex))
+;;;; www/http.scm: HTTP client library for Guile.
;;;; Copyright (C) 1997 Free Software Foundation, Inc.
-;;;;
+;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2, or (at your option)
;;;; any later version.
-;;;;
+;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;;; GNU General Public License for more details.
-;;;;
+;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this software; see the file COPYING. If not, write to
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
-;;;;
+;;;;
+
+;;; Commentary:
+
+;; This module exports the following variables and procedures:
+;; http:version
+;; http:user-agent
+;; (http:message-version msg)
+;; (http:message-status-code msg)
+;; (http:message-status-text msg)
+;; (http:message-status-ok? msg)
+;; (http:status-ok? status)
+;; (http:message-body msg)
+;; (http:message-headers msg)
+;; (http:message-header header msg)
+;; (http:get url)
+;; (http:open host . args)
+;; (http:request method url . args)
+
+;;; Code:
+
+(define-module (www http)
+ :use-module (www url)
+ :use-module (ice-9 regex))
+
;;; Compatibility
@@ -246,7 +265,7 @@
;; response-status-line))
;; Get message body: if Content-Length header was supplied, read
;; that many chars. Otherwise, read until EOF
-
+
(let ((content-length (http:fetch-header
"content-length"
response-headers)))
@@ -287,7 +306,7 @@
(apply display "\r\n" p))
;;; (sans-trailing-whitespace STR)
-;;; These are defined in module #/ice-9/string-fun, so this code
+;;; These are defined in module (ice-9 string-fun), so this code
;;; will prob. be discarded when the module system and boot-9
;;; settle down.
@@ -300,3 +319,5 @@
(if (< end st)
""
(make-shared-substring s st end))))
+
+;;; www/http.scm ends here
Index: guile/guile-www/main.scm
diff -u guile/guile-www/main.scm:1.2 guile/guile-www/main.scm:1.3
--- guile/guile-www/main.scm:1.2 Sun Jun 4 14:37:33 2000
+++ guile/guile-www/main.scm Thu Nov 15 20:46:41 2001
@@ -1,26 +1,35 @@
-;;;; www/main.scm: general WWW navigation aids.
+;;;; www/main.scm: General WWW navigation aids.
-(define-module (www main)
- :use-module (www http)
- :use-module (www url))
-
;;;; Copyright (C) 1997 Free Software Foundation, Inc.
-;;;;
+;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2, or (at your option)
;;;; any later version.
-;;;;
+;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;;; GNU General Public License for more details.
-;;;;
+;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this software; see the file COPYING. If not, write to
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
-;;;;
+;;;;
+
+;;; Commentary:
+
+;; This module exports the following procedures:
+;; (www:set-protocol-handler! proto handler)
+;; (www:get url-str)
+
+;;; Code:
+
+(define-module (www main)
+ :use-module (www http)
+ :use-module (www url))
+
(define dispatch-table
(acons 'http http:get '()))
@@ -47,3 +56,4 @@
(url:path url))
(error "unknown URL scheme" (url:scheme url))))))))
+;;; www/main.scm ends here
Index: guile/guile-www/url.scm
diff -u guile/guile-www/url.scm:1.3 guile/guile-www/url.scm:1.4
--- guile/guile-www/url.scm:1.3 Mon Oct 20 18:17:56 1997
+++ guile/guile-www/url.scm Thu Nov 15 20:46:41 2001
@@ -1,25 +1,44 @@
-;;;; url.scm: URL manipulation tools.
+;;;; www/url.scm: URL manipulation tools.
-(define-module (www url)
- :use-module (ice-9 regex))
-
;;;; Copyright (C) 1997 Free Software Foundation, Inc.
-;;;;
+;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2, or (at your option)
;;;; any later version.
-;;;;
+;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;;; GNU General Public License for more details.
-;;;;
+;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this software; see the file COPYING. If not, write to
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
-;;;;
+;;;;
+
+;;; Commentary:
+
+;; This module exports the following procedures:
+;; (url:scheme url)
+;; (url:address url)
+;; (url:unknown url)
+;; (url:user url)
+;; (url:host url)
+;; (url:port url)
+;; (url:path url)
+;; (url:make scheme . args)
+;; (url:make-http host port path)
+;; (url:make-ftp user host port path)
+;; (url:make-mailto address)
+;; (url:parse url)
+;; (url:unparse url)
+;; (url:decode str)
+;; (url:encode str reserved-chars)
+
+;;; Code:
+
;;;; TODO:
;;;; * support `user:password@' strings where appropriate in URLs.
@@ -28,6 +47,9 @@
;;;; * fill out url:encode, include facilities for URL-scheme-specific
;;;; encoding methods (e.g. a url-scheme-reserved-char-alist)
+(define-module (www url)
+ :use-module (ice-9 regex))
+
;; `url:scheme' is an unfortunate term, but it is the technical
;; name for that portion of the URL according to RFC 1738. Sigh.
@@ -150,3 +172,5 @@
(or (char-alphabetic? ch)
(char-numeric? ch)
(memv ch safe-chars)))
+
+;;; www/url.scm ends here
- guile/guile-www cgi.scm http.scm main.scm url.scm,
Thien-Thi Nguyen <=