From 8e7e071db2b222ace1de36917b0afe52f95eccbd Mon Sep 17 00:00:00 2001 From: vibr Date: Thu, 14 Apr 2005 14:42:03 +0000 Subject: [PATCH] fix MAKE-CLF (which prepended superfluous slash to requested resource) --- scheme/httpd/logging.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scheme/httpd/logging.scm b/scheme/httpd/logging.scm index c0a9e81..750e039 100644 --- a/scheme/httpd/logging.scm +++ b/scheme/httpd/logging.scm @@ -169,11 +169,21 @@ (or (maybe-dns-lookup remote-ip) "-") (format-date "[~d/~b/~Y:~H:~M:~S +0000]" (date)) ; +0000 as we don't know (string-join (list request-type - (string-append "/" requested-file) + requested-file protocol)) ; Unfortunately, we first split the request line into ; method/request-type etc. and put it together here. ; Files conform to CLF are expected to print the original line. + + ; --> Shouldn't be a problem: the original request + ; line is reconstructed almost completely: + ; requested-file (i.e. http-url->url-string url) is + ; exactly the original Request_URI (apart from + ; multiple slashes, which are thrown away), + ; request-type and protocol are the original. + ; --> Only number of slashes in Request_URI and + ; whitespace between parts of Request-Line can differ. + (or http-code "-") (or filesize "-") (if (string? referer) (string-trim referer) '-)