fix mod-lisp bugs
* tekuti/mod-lisp.scm (url, read-request/mod-lisp)a (write-headers/mod-lisp, write-response/mod-lisp): Fix a number of mod-lisp bugs.
This commit is contained in:
parent
c2d3231e24
commit
6df26e1c72
1 changed files with 4 additions and 4 deletions
|
@ -53,7 +53,7 @@
|
||||||
parse-http-method)
|
parse-http-method)
|
||||||
|
|
||||||
(define-mod-lisp-header! 'url
|
(define-mod-lisp-header! 'url
|
||||||
"URL"
|
"url"
|
||||||
parse-request-uri)
|
parse-request-uri)
|
||||||
|
|
||||||
(define-mod-lisp-header! 'server-ip-addr
|
(define-mod-lisp-header! 'server-ip-addr
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
(build-request
|
(build-request
|
||||||
#:method (assq-ref meta 'method)
|
#:method (assq-ref meta 'method)
|
||||||
#:uri (assq-ref meta 'url)
|
#:uri (assq-ref meta 'url)
|
||||||
#:version (assq-ref meta 'url)
|
#:version (assq-ref meta 'server-protocol)
|
||||||
#:headers headers
|
#:headers headers
|
||||||
#:meta meta
|
#:meta meta
|
||||||
#:port port))))
|
#:port port))))
|
||||||
|
@ -145,13 +145,13 @@
|
||||||
(define (write-headers/mod-lisp headers port)
|
(define (write-headers/mod-lisp headers port)
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (pair)
|
(lambda (pair)
|
||||||
(write-header (car pair) (cdr pair) port))
|
(write-header/mod-lisp (car pair) (cdr pair) port))
|
||||||
headers))
|
headers))
|
||||||
|
|
||||||
(define (write-response/mod-lisp r port)
|
(define (write-response/mod-lisp r port)
|
||||||
(write-response-line/mod-lisp (response-code r)
|
(write-response-line/mod-lisp (response-code r)
|
||||||
(response-reason-phrase r) port)
|
(response-reason-phrase r) port)
|
||||||
(write-headers (response-headers r) port)
|
(write-headers/mod-lisp (response-headers r) port)
|
||||||
(display "end" port) (newline port)
|
(display "end" port) (newline port)
|
||||||
(if (eq? port (response-port r))
|
(if (eq? port (response-port r))
|
||||||
r
|
r
|
||||||
|
|
Loading…
Reference in a new issue