Fix bugs with browser responder.

Fix url>path so it doesn't double decode query parameters.
cvs
Chris Double 2005-02-13 02:51:33 +00:00
parent 82e22a0841
commit a3a1cf8a8c
1 changed files with 8 additions and 1 deletions

View File

@ -12,11 +12,18 @@ stdio streams strings threads url-encoding ;
drop stdio get
] ifte ;
: url>path ( uri -- path )
: (url>path) ( uri -- path )
url-decode "http://" ?str-head [
"/" split1 dup "" ? nip
] when ;
: url>path ( uri -- path )
"?" split1 dup [
>r (url>path) "?" r> cat3
] [
drop (url>path)
] ifte ;
: secure-path ( path -- path )
".." over str-contains? [ drop f ] when ;