0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 13:10:24 +00:00

add note to split_path/1 and path/1 on escaped /

This commit is contained in:
Magnus Klaar 2011-09-29 16:53:47 +02:00
parent eff9477201
commit 973e67a53c
2 changed files with 10 additions and 2 deletions

View file

@ -88,7 +88,11 @@ raw_host(Req) ->
port(Req) ->
{Req#http_req.port, Req}.
%% @doc Return the tokens for the path requested.
%% @doc Return the path segments for the path requested.
%%
%% Follwing RFC2396, this function may return path segments containing any
%% character, including <em>/</em> if, and only if, a <em>/</em> was escaped
%% and part of a path segment in the path requested.
-spec path(#http_req{}) -> {cowboy_dispatcher:path_tokens(), #http_req{}}.
path(Req) ->
{Req#http_req.path, Req}.