Rename two internal operations in RFC 822 headers in the HTTP client,
authorTaylor R. Campbell <net/mumble/campbell>
Sat, 4 Nov 2006 20:16:47 +0000 (20:16 +0000)
committerTaylor R. Campbell <net/mumble/campbell>
Sat, 4 Nov 2006 20:16:47 +0000 (20:16 +0000)
and export them, so that users of the library can get at them.

This is a lame workaround for the problem that the RFC 822 support lies
in Edwin, rather than the run-time system.  At some point that should
be fixed properly, and the support updated to RFC 2822, but this works
for now.

v7/src/runtime/http-client.scm
v7/src/runtime/runtime.pkg

index 267cfa299eddf85b4e7bf71d056da8dc3745322d..0405135f936fd18bf1953d683c1ddfc5e7f5c760 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: http-client.scm,v 14.2 2006/08/02 18:18:10 cph Exp $
+$Id: http-client.scm,v 14.3 2006/11/04 20:16:47 riastradh Exp $
 
 Copyright 2006 Taylor R. Campbell
 
@@ -151,7 +151,7 @@ USA.
 (define (send-http-request connection method request-uri header-fields content)
   (write-http-request method
                       request-uri
-                      (rfc822:adjoin-header-fields
+                      (adjoin-http-header-fields
                        `((HOST ,(http-connection/host-string connection)))
                        header-fields
                        (if (string? content)
@@ -341,6 +341,9 @@ USA.
 ;;; RFC 822 support, and something ought to be done about RFC 2822.
 ;;; Some day.
 
+(define (valid-http-header-field? obj)
+  (rfc822:header-field? obj))
+
 (define (rfc822:header-field? obj)
   (and (pair? obj)
        (symbol? (car obj))
@@ -370,7 +373,7 @@ USA.
       (eq? (rfc822:header-field-name header-field)
            name))))
 
-(define (rfc822:adjoin-header-fields left header-fields right)
+(define (adjoin-http-header-fields left header-fields right)
   (let ((clean (lambda (other-header-fields)
                  (delete-matching-items other-header-fields
                    (lambda (header-field)
index 028205eae60201e271d9cfdf9a143886b25cdc31..45a182e1f52f78bd3f0d788b64535b78a425d9d4 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.603 2006/11/04 06:38:32 cph Exp $
+$Id: runtime.pkg,v 14.604 2006/11/04 20:16:47 riastradh Exp $
 
 Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
 Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
@@ -5053,6 +5053,7 @@ USA.
   (files "http-client")
   (parent (runtime))
   (export ()
+         adjoin-http-header-fields
          call-with-http-connection
          call-with-http-response:entity-request
          call-with-http-response:get
@@ -5089,6 +5090,7 @@ USA.
          read-http-response
          receive-http-response
          send-http-request
+         valid-http-header-field?
          write-http-request
          ))