factor out GET-HEADER
This commit is contained in:
parent
a1f3d72ce8
commit
da98c4b78c
|
@ -274,11 +274,6 @@
|
|||
(copy-inport->outport script-port out)
|
||||
(close-input-port script-port)))))))
|
||||
|
||||
(define (get-header headers tag)
|
||||
(cond
|
||||
((assq tag headers) => cdr)
|
||||
(else #f)))
|
||||
|
||||
(define (delete-headers headers tag)
|
||||
(alist-delete tag headers))
|
||||
|
||||
|
|
|
@ -104,7 +104,3 @@
|
|||
(read (make-string-input-port s)))))
|
||||
(else (error "No `Content-length:' field in POST request."))))
|
||||
|
||||
(define (get-header headers tag)
|
||||
(cond
|
||||
((assq tag headers) => cdr)
|
||||
(else #f)))
|
|
@ -207,6 +207,7 @@
|
|||
locks
|
||||
let-opt ;:OPTIONAL
|
||||
handle-fatal-error
|
||||
(subset sunet-utilities (get-header)) ; GET-HEADER
|
||||
scsh
|
||||
scheme)
|
||||
(files surflets))
|
||||
|
|
|
@ -86,10 +86,6 @@
|
|||
(release-lock *cache-lock*)
|
||||
result))
|
||||
|
||||
(define (get-header headers tag)
|
||||
(cond ((assq tag headers) => cdr)
|
||||
(else #f)))
|
||||
|
||||
|
||||
;; Will be needed when we handle POST requests.
|
||||
(define (get-content-length headers)
|
||||
|
|
|
@ -67,3 +67,9 @@
|
|||
thunk
|
||||
(lambda ()
|
||||
(release-lock lock))))
|
||||
|
||||
|
||||
;; Get Header from (RFC822 like) header alist
|
||||
(define (get-header headers tag)
|
||||
(cond ((assq tag headers) => cdr)
|
||||
(else #f)))
|
|
@ -199,7 +199,8 @@
|
|||
dump
|
||||
copy-inport->outport
|
||||
dotdot-check
|
||||
with-lock))
|
||||
with-lock
|
||||
get-header))
|
||||
|
||||
(define-interface handle-fatal-error-interface
|
||||
(export with-fatal-error-handler*
|
||||
|
@ -714,6 +715,7 @@
|
|||
handle ; IGNORE-ERROR
|
||||
parse-html-forms ; PARSE-HTML-FORM-QUERY
|
||||
threads ; SLEEP
|
||||
sunet-utilities ; GET-HEADER
|
||||
)
|
||||
(files (httpd seval)))
|
||||
|
||||
|
@ -765,7 +767,7 @@
|
|||
sunet-version
|
||||
formats
|
||||
format-net
|
||||
sunet-utilities ; host-name-or-empty
|
||||
sunet-utilities ; host-name-or-empty, get-header
|
||||
let-opt ; let-optionals
|
||||
handle-fatal-error
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue