No need to do uri-decode anymore, URL did not used to do it

svn: r6426
This commit is contained in:
Jay McCarthy 2007-05-31 05:33:31 +00:00
parent 321c489ef5
commit 200fd8dd85
6 changed files with 12 additions and 19 deletions

View File

@ -5,8 +5,7 @@
(lib "list.ss")
(lib "string.ss")
(lib "plt-match.ss")
(lib "contract.ss")
(lib "uri-codec.ss" "net"))
(lib "contract.ss"))
(require "dispatch.ss"
"../configuration/responders.ss"
"../private/util.ss"
@ -52,7 +51,7 @@
(define path
; XXX Abstract this
(url-path->path htdocs-path
(uri-decode (url-path->string (url-path uri)))))
(url-path->string (url-path uri))))
(cond
[(file-exists? path)
(match (headers-assq* #"Range" (request-headers/raw req))

View File

@ -1,7 +1,6 @@
(module dispatch-filter mzscheme
(require (lib "contract.ss")
(lib "url.ss" "net")
(lib "uri-codec.ss" "net"))
(lib "url.ss" "net"))
(require "dispatch.ss"
"../request-structs.ss"
"../private/util.ss")
@ -11,7 +10,7 @@
(define interface-version 'v1)
(define ((make regex inner) conn req)
(define path (uri-decode (url-path->string (url-path (request-uri req)))))
(define path (url-path->string (url-path (request-uri req))))
(if (regexp-match regex path)
(inner conn req)
(next-dispatcher))))

View File

@ -1,7 +1,6 @@
(module dispatch-passwords mzscheme
(require (lib "kw.ss")
(lib "url.ss" "net")
(lib "uri-codec.ss" "net")
(lib "contract.ss"))
(require "dispatch.ss"
"../private/util.ss"
@ -38,7 +37,7 @@
(unbox password-cache))
(lambda (conn req)
(define uri (request-uri req))
(define path (uri-decode (url-path->string (url-path uri))))
(define path (url-path->string (url-path uri)))
(define method (request-method req))
(define denied? (read-password-cache))
(cond

View File

@ -1,7 +1,6 @@
(module dispatch-pathprocedure mzscheme
(require (lib "contract.ss")
(lib "url.ss" "net")
(lib "uri-codec.ss" "net"))
(lib "url.ss" "net"))
(require "dispatch.ss"
"../private/util.ss"
"../private/response.ss"
@ -13,7 +12,7 @@
(define interface-version 'v1)
(define ((make the-path procedure) conn req)
(define path (uri-decode (url-path->string (url-path (request-uri req)))))
(define path (url-path->string (url-path (request-uri req))))
(if (string=? the-path path)
(output-response/method
conn

View File

@ -3,8 +3,7 @@
(lib "kw.ss")
(lib "plt-match.ss")
(lib "string.ss")
(lib "contract.ss")
(lib "uri-codec.ss" "net"))
(lib "contract.ss"))
(require "dispatch.ss"
"../private/web-server-structs.ss"
"../private/connection-manager.ss"
@ -383,7 +382,7 @@
;; return dispatcher
(lambda (conn req)
(define path (uri-decode (url-path->string (url-path (request-uri req)))))
(define path (url-path->string (url-path (request-uri req))))
(cond [(string=? "/conf/refresh-servlets" path)
;; more here - this is broken - only out of date or specifically mentioned
;; scripts should be flushed. This destroys persistent state!

View File

@ -1,8 +1,7 @@
(module helpers mzscheme
(require (lib "contract.ss")
(lib "kw.ss")
(lib "plt-match.ss")
(lib "uri-codec.ss" "net"))
(lib "plt-match.ss"))
(require "../private/util.ss"
"../request-structs.ss"
"../response-structs.ss")
@ -53,10 +52,9 @@
(pre ,(exn->string exn)))))))])
(thunk)))
(provide ; all-from
(provide
with-errors-to-browser
redirect-to
(rename uri-decode translate-escapes))
redirect-to)
(provide/contract
[permanently redirection-status?]
[temporarily redirection-status?]