adapt code to remove calls of URI-PATH->URI (relict of old URL parser)

This commit is contained in:
vibr 2005-04-06 12:32:17 +00:00
parent 61a63b4d4b
commit 745a123735
3 changed files with 5 additions and 5 deletions

View File

@ -175,14 +175,14 @@
(headers (request-headers req))
;; 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))
;; Compute the $SCRIPT_PATH string.
(url-path (http-url-path (request-url req)))
(script-path (take (- (length url-path) (length path-suffix))
url-path))
(script-name (uri-path->uri script-path)))
(script-name (string-join script-path "/")))
(receive (rhost rport)
(socket-address->internet-address raddr)

View File

@ -123,8 +123,8 @@
(socket-remote-address (request-socket req)))
(format-internet-host-address host-address))
(request-method req) ; request method
(uri-path->uri
(http-url-path (request-url req))) ; requested file
(http-url-path->path-string
(http-url-path (request-url req))) ; requested file (escaped as it was in original request)
(version->string (request-version req)) ; protocol version
(status-code-number status-code)
23 ; filesize (unknown)

View File

@ -44,7 +44,7 @@
(lambda (path req)
(if (pair? path) ; need at least one element
(let ((request-method (request-method req))
(path-string (uri-path->uri path)))
(path-string (string-join path "/")))
(if (or (string=? request-method "GET")
(string=? request-method "POST"))
(make-input-response