-
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
web-server/servlet-env
|
web-server/servlet-env
|
||||||
(prefix-in c: net/cookies)
|
(prefix-in c: net/cookies)
|
||||||
net/url
|
net/url
|
||||||
|
net/uri-codec
|
||||||
racket/runtime-path
|
racket/runtime-path
|
||||||
racket/file
|
racket/file
|
||||||
racket/string
|
racket/string
|
||||||
@@ -701,6 +702,7 @@
|
|||||||
(let* ((idx (string-find file "?")))
|
(let* ((idx (string-find file "?")))
|
||||||
(unless (eq? idx #f)
|
(unless (eq? idx #f)
|
||||||
(set! file (substring file 0 idx))))
|
(set! file (substring file 0 idx))))
|
||||||
|
(set! file (uri-decode file))
|
||||||
(let ((f (if (string=? file "/") "index.html" file)))
|
(let ((f (if (string=? file "/") "index.html" file)))
|
||||||
(when (string-prefix? f "/")
|
(when (string-prefix? f "/")
|
||||||
(set! f (substring f 1)))
|
(set! f (substring f 1)))
|
||||||
|
|||||||
Reference in New Issue
Block a user