*reinsert lost line
*replace calls of UNESCAPE-URI (relict of old URL parser) with UNESCAPE *simplify URI-HAS-PROTOCOL?
This commit is contained in:
parent
512ccfaed3
commit
2dcdd41ed9
|
@ -104,7 +104,7 @@
|
||||||
; why did we had (string-suffix? "-nph" prog) here?
|
; why did we had (string-suffix? "-nph" prog) here?
|
||||||
|
|
||||||
(search (http-url-query (request-url req))) ; Compute the
|
(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)
|
(split-and-decode-search-spec search)
|
||||||
'()))
|
'()))
|
||||||
|
|
||||||
|
@ -144,9 +144,9 @@
|
||||||
(define (split-and-decode-search-spec s)
|
(define (split-and-decode-search-spec s)
|
||||||
(let recur ((i 0))
|
(let recur ((i 0))
|
||||||
(cond
|
(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)))))
|
(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
|
;;; Compute the CGI scripts' process environment by adding the standard CGI
|
||||||
|
@ -287,9 +287,7 @@
|
||||||
(copy-inport->outport script-port out)))))
|
(copy-inport->outport script-port out)))))
|
||||||
|
|
||||||
(define (uri-has-protocol? loc)
|
(define (uri-has-protocol? loc)
|
||||||
(receive (host port path query)
|
(if (http-url-host (url-string->http-url loc)) #t #f))
|
||||||
(parse-url loc)
|
|
||||||
(if host #t #f)))
|
|
||||||
|
|
||||||
(define (extract-status-code-and-text status req)
|
(define (extract-status-code-and-text status req)
|
||||||
(with-fatal-error-handler*
|
(with-fatal-error-handler*
|
||||||
|
|
Loading…
Reference in New Issue