diff --git a/collects/web-server/dispatch-files.ss b/collects/web-server/dispatch-files.ss index ca43899930..2a347f107d 100644 --- a/collects/web-server/dispatch-files.ss +++ b/collects/web-server/dispatch-files.ss @@ -17,7 +17,7 @@ ;; ************************************************************ ;; ************************************************************ ;; SERVING FILES - + ;; serve-file : connection symbol uri host -> void ;; to find the file, including searching for implicit index files, and serve it out (define (serve-file conn method uri host-info) @@ -66,12 +66,11 @@ TEXT/HTML-MIME-TYPE `([Location . ,(string-append url-path-str "/")]) (list - (xml->string - (xexpr->xml - `(html - (head (title "Add a Slash")) - (body "Please use " - (a ([href ,(string-append - url-path-str "/")]) - "this url") " instead.")))))) + (xexpr->string + `(html + (head (title "Add a Slash")) + (body "Please use " + (a ([href ,(string-append + url-path-str "/")]) + "this url") " instead."))))) method))) \ No newline at end of file diff --git a/collects/web-server/util.ss b/collects/web-server/util.ss index a93f201fd7..f279bdb006 100644 --- a/collects/web-server/util.ss +++ b/collects/web-server/util.ss @@ -16,7 +16,6 @@ url-path->string) (provide/contract - [xml->string (document? . -> . string?)] [decompose-request ((request?) . ->* . (url? symbol? string?))] [network-error ((symbol? string?) (listof any/c) . ->* . (void))] [path->list (path? . -> . (cons/c (union path? (symbols 'up 'same)) @@ -27,13 +26,7 @@ [exn->string ((union exn? any/c) . -> . string?)] [get-mime-type (path? . -> . bytes?)] [build-path-unless-absolute (path? (union string? path?) . -> . path?)]) - - ;; xml->string: xml -> string - (define (xml->string some-xml) - (let ([o-port (open-output-string)]) - (write-xml/content some-xml o-port) - (get-output-string o-port))) - + ;; ripped this off from url-unit.ss (define (url-path->string strs) (apply