svn: r4533
This commit is contained in:
Jay McCarthy 2006-10-09 19:37:18 +00:00
parent a930138643
commit 75e9681724

View File

@ -3,6 +3,7 @@
(lib "string.ss")
(lib "list.ss")
(lib "url.ss" "net")
(lib "plt-match.ss")
(lib "uri-codec.ss" "net"))
(require "../request-structs.ss")
@ -14,12 +15,16 @@
(define (url-path->string strs)
(apply
string-append
(let loop ([strs strs])
(cond
[(null? strs) (list)]
[else (list* "/"
(maybe-join-params (car strs))
(loop (cdr strs)))]))))
(map (match-lambda
['up ".."]
['same "."]
[(and s (? string?)) s])
(let loop ([strs strs])
(cond
[(null? strs) (list)]
[else (list* "/"
(maybe-join-params (car strs))
(loop (cdr strs)))])))))
;; needs to unquote things!
(define (maybe-join-params s)