*reinsert lost line

*replace calls of UNESCAPE-URI (relict of old URL parser) with UNESCAPE
*simplify URI-HAS-PROTOCOL?
This commit is contained in:
vibr 2005-04-06 22:43:53 +00:00
parent 512ccfaed3
commit 2dcdd41ed9
1 changed files with 4 additions and 6 deletions

View File

@ -104,7 +104,7 @@
; why did we had (string-suffix? "-nph" prog) here?
(search (http-url-query (request-url req))) ; Compute the
(argv (if (and search (not (string-index search #\=))) ; argv list.
(split-and-decode-search-spec search)
'()))
@ -144,9 +144,9 @@
(define (split-and-decode-search-spec s)
(let recur ((i 0))
(cond
((string-index s #\+ i) => (lambda (j) (cons (unescape-uri s i j)
((string-index s #\+ i) => (lambda (j) (cons (unescape s i j)
(recur (+ j 1)))))
(else (list (unescape-uri s i (string-length s)))))))
(else (list (unescape s i (string-length s)))))))
;;; Compute the CGI scripts' process environment by adding the standard CGI
@ -287,9 +287,7 @@
(copy-inport->outport script-port out)))))
(define (uri-has-protocol? loc)
(receive (host port path query)
(parse-url loc)
(if host #t #f)))
(if (http-url-host (url-string->http-url loc)) #t #f))
(define (extract-status-code-and-text status req)
(with-fatal-error-handler*