Skip to content

Commit

Permalink
avoid including query string into PathTokens
Browse files Browse the repository at this point in the history
Change-Id: Ie8016dadb540edad56f64444e09dd2f41b169f0c
Reviewed-on: http://review.northscale.com:8080/330
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
  • Loading branch information
Aliaksey Kandratsenka authored and steveyen committed Jun 8, 2010
1 parent 2381880 commit 6869b82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deps/menelaus/src/menelaus_web.erl
Expand Up @@ -105,7 +105,8 @@ loop(Req, AppRoot, DocRoot) ->
try
% Using raw_path so encoded slash characters like %2F are handed correctly,
% in that we delay converting %2F's to slash characters until after we split by slashes.
"/" ++ Path = Req:get(raw_path),
"/" ++ RawPath = Req:get(raw_path),
{Path, _, _} = mochiweb_util:urlsplit_path(RawPath),
PathTokens = lists:map(fun mochiweb_util:unquote/1, string:tokens(Path, "/")),
Action = case Req:get(method) of
Method when Method =:= 'GET'; Method =:= 'HEAD' ->
Expand Down

0 comments on commit 6869b82

Please sign in to comment.