rename HTTP-URL-SEARCH to HTTP-URL-QUERY (adaption to restructured

http-url type in url.scm)
This commit is contained in:
vibr 2005-04-04 21:13:35 +00:00
parent d0c64d371a
commit 3548b25c26
8 changed files with 13 additions and 13 deletions

View File

@ -103,8 +103,8 @@
(nph? (string-prefix? "nph-" prog)) ; PROG starts with "nph-" ? (nph? (string-prefix? "nph-" prog)) ; PROG starts with "nph-" ?
; why did we had (string-suffix? "-nph" prog) here? ; why did we had (string-suffix? "-nph" prog) here?
(search (http-url-search (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)
'())) '()))
@ -205,7 +205,7 @@
,@request-invariant-cgi-env ; Stuff that never changes (see cgi-handler). ,@request-invariant-cgi-env ; Stuff that never changes (see cgi-handler).
,@(cond ((http-url-search (request-url req)) => ,@(cond ((http-url-query (request-url req)) =>
(lambda (srch) `(("QUERY_STRING" . ,srch)))) (lambda (srch) `(("QUERY_STRING" . ,srch))))
(else '())) (else '()))

View File

@ -211,7 +211,7 @@
;;; ROOTED-FILE-OR-DIRECTORY-HANDLER for examples on how to feed this. ;;; ROOTED-FILE-OR-DIRECTORY-HANDLER for examples on how to feed this.
(define (make-rooted-file-path-response root file-path file-serve-response req options) (define (make-rooted-file-path-response root file-path file-serve-response req options)
(if (http-url-search (request-url req)) (if (http-url-query (request-url req))
(make-error-response (status-code bad-request) req (make-error-response (status-code bad-request) req
"Indexed search not provided for this URL.") "Indexed search not provided for this URL.")
(cond ((dotdot-check root file-path) => (cond ((dotdot-check root file-path) =>

View File

@ -117,7 +117,7 @@
((list? parse-info) ; it's an info path ((list? parse-info) ; it's an info path
(lambda (url) (lambda (url)
(values parse-info (values parse-info
(unescape-uri (http-url-search url))))) (unescape-uri (http-url-query url)))))
(else (else
(let ((info-path (let ((info-path
((infix-splitter ":") ((infix-splitter ":")
@ -128,7 +128,7 @@
""))))) "")))))
(lambda (url) (lambda (url)
(values info-path (values info-path
(unescape-uri (http-url-search url)))))))) (unescape-uri (http-url-query url))))))))
(make-reference (make-reference
(cond (cond
((procedure? reference) reference) ((procedure? reference) reference)

View File

@ -20,7 +20,7 @@
((list? finder) ((list? finder)
(lambda (url) (lambda (url)
(values finder (values finder
(unescape-uri (http-url-search url)) (unescape-uri (http-url-query url))
'()))) '())))
(else (else
(let ((man-path (let ((man-path
@ -32,7 +32,7 @@
""))))) "")))))
(lambda (url) (lambda (url)
(values man-path (values man-path
(unescape-uri (http-url-search url)) (unescape-uri (http-url-query url))
'())))))) '()))))))
(reference-template (reference-template
(cond (cond

View File

@ -26,7 +26,7 @@
'application/x-www-form-urlencoded' as content-type")) 'application/x-www-form-urlencoded' as content-type"))
(cond (cond
((string=? request-method "GET") ((string=? request-method "GET")
(form-query-list (http-url-search (form-query-list (http-url-query
(surflet-request-url surflet-request)))) (surflet-request-url surflet-request))))
((string=? request-method "POST") ((string=? request-method "POST")
(or (cached-bindings surflet-request) (or (cached-bindings surflet-request)

View File

@ -659,7 +659,7 @@
weak ;weak pointers weak ;weak pointers
surflets/utilities ;form-query-list surflets/utilities ;form-query-list
surflet-requests surflet-requests
(subset url (http-url-search)) (subset url (http-url-query))
(subset srfi-14 (char-set:digit)) (subset srfi-14 (char-set:digit))
(subset srfi-13 (string-index string-trim)) (subset srfi-13 (string-index string-trim))
(subset srfi-1 (filter)) (subset srfi-1 (filter))

View File

@ -28,7 +28,7 @@
(p (url "/" "Return to main menu") (br) (p (url "/" "Return to main menu") (br)
(url "add-html.scm" "Start new calculation.")))))))) (url "add-html.scm" "Start new calculation."))))))))
(let* ((bindings (form-query-list (let* ((bindings (form-query-list
(http-url-search (surflet-request-url result)))) (http-url-query (surflet-request-url result))))
(number (string->number (number (string->number
(extract-single-binding "number" bindings)))) (extract-single-binding "number" bindings))))
(if number (if number

View File

@ -2,7 +2,7 @@
(open surflet-requests ; SURFLET-REQUEST-url (open surflet-requests ; SURFLET-REQUEST-url
httpd-responses ; MAKE-RESPONSE httpd-responses ; MAKE-RESPONSE
parse-html-forms ; PARSE-HTML-FORM-QUERY parse-html-forms ; PARSE-HTML-FORM-QUERY
url ; HTTP-url-SEARCH url ; http-url-query
srfi-1 ; FILTER srfi-1 ; FILTER
surflet-handler/surflets ; SEND/SUSPEND, SEND/FINISH surflet-handler/surflets ; SEND/SUSPEND, SEND/FINISH
surflet-handler/primitives ; MAKE-SURFLET-RESPONSE surflet-handler/primitives ; MAKE-SURFLET-RESPONSE
@ -79,7 +79,7 @@
(let* ((title (if (pair? maybe-title) (car maybe-title) #f)) (let* ((title (if (pair? maybe-title) (car maybe-title) #f))
(result (send/suspend (make-get-number-page input-text title))) (result (send/suspend (make-get-number-page input-text title)))
(bindings (parse-html-form-query (bindings (parse-html-form-query
(http-url-search (surflet-request-url result)))) (http-url-query (surflet-request-url result))))
(number (string->number (number (string->number
(extract-single-binding "number" bindings)))) (extract-single-binding "number" bindings))))
(if number (if number