#| -*-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
(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)
;;; 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))
(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)
#| -*-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
(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
read-http-response
receive-http-response
send-http-request
+ valid-http-header-field?
write-http-request
))