From 745a123735816ad5b431758fb289855410b8ff2a Mon Sep 17 00:00:00 2001 From: vibr Date: Wed, 6 Apr 2005 12:32:17 +0000 Subject: [PATCH] adapt code to remove calls of URI-PATH->URI (relict of old URL parser) --- scheme/httpd/cgi-server.scm | 4 ++-- scheme/httpd/logging.scm | 4 ++-- scheme/httpd/surflets/surflet-handler.scm | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scheme/httpd/cgi-server.scm b/scheme/httpd/cgi-server.scm index 483824b..8c43de5 100644 --- a/scheme/httpd/cgi-server.scm +++ b/scheme/httpd/cgi-server.scm @@ -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) diff --git a/scheme/httpd/logging.scm b/scheme/httpd/logging.scm index 1834e84..c0a9e81 100644 --- a/scheme/httpd/logging.scm +++ b/scheme/httpd/logging.scm @@ -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) diff --git a/scheme/httpd/surflets/surflet-handler.scm b/scheme/httpd/surflets/surflet-handler.scm index 19631ff..485895e 100644 --- a/scheme/httpd/surflets/surflet-handler.scm +++ b/scheme/httpd/surflets/surflet-handler.scm @@ -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