adapt code to remove calls of URI-PATH->URI (relict of old URL parser)
This commit is contained in:
parent
61a63b4d4b
commit
745a123735
|
@ -175,14 +175,14 @@
|
||||||
(headers (request-headers req))
|
(headers (request-headers req))
|
||||||
|
|
||||||
;; Compute the $PATH_INFO and $PATH_TRANSLATED strings.
|
;; Compute the $PATH_INFO and $PATH_TRANSLATED strings.
|
||||||
(path-info (uri-path->uri path-suffix)) ; No encode or .. check.
|
(path-info (string-join path-suffix "/")) ; No encode or .. check.
|
||||||
(path-translated (path-list->file-name path-info bin-dir))
|
(path-translated (path-list->file-name path-info bin-dir))
|
||||||
|
|
||||||
;; Compute the $SCRIPT_PATH string.
|
;; Compute the $SCRIPT_PATH string.
|
||||||
(url-path (http-url-path (request-url req)))
|
(url-path (http-url-path (request-url req)))
|
||||||
(script-path (take (- (length url-path) (length path-suffix))
|
(script-path (take (- (length url-path) (length path-suffix))
|
||||||
url-path))
|
url-path))
|
||||||
(script-name (uri-path->uri script-path)))
|
(script-name (string-join script-path "/")))
|
||||||
|
|
||||||
(receive (rhost rport)
|
(receive (rhost rport)
|
||||||
(socket-address->internet-address raddr)
|
(socket-address->internet-address raddr)
|
||||||
|
|
|
@ -123,8 +123,8 @@
|
||||||
(socket-remote-address (request-socket req)))
|
(socket-remote-address (request-socket req)))
|
||||||
(format-internet-host-address host-address))
|
(format-internet-host-address host-address))
|
||||||
(request-method req) ; request method
|
(request-method req) ; request method
|
||||||
(uri-path->uri
|
(http-url-path->path-string
|
||||||
(http-url-path (request-url req))) ; requested file
|
(http-url-path (request-url req))) ; requested file (escaped as it was in original request)
|
||||||
(version->string (request-version req)) ; protocol version
|
(version->string (request-version req)) ; protocol version
|
||||||
(status-code-number status-code)
|
(status-code-number status-code)
|
||||||
23 ; filesize (unknown)
|
23 ; filesize (unknown)
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
(lambda (path req)
|
(lambda (path req)
|
||||||
(if (pair? path) ; need at least one element
|
(if (pair? path) ; need at least one element
|
||||||
(let ((request-method (request-method req))
|
(let ((request-method (request-method req))
|
||||||
(path-string (uri-path->uri path)))
|
(path-string (string-join path "/")))
|
||||||
(if (or (string=? request-method "GET")
|
(if (or (string=? request-method "GET")
|
||||||
(string=? request-method "POST"))
|
(string=? request-method "POST"))
|
||||||
(make-input-response
|
(make-input-response
|
||||||
|
|
Loading…
Reference in New Issue