From 973e67a53ce73ef71073715f1bced5bd6be6c9a1 Mon Sep 17 00:00:00 2001 From: Magnus Klaar Date: Thu, 29 Sep 2011 16:53:47 +0200 Subject: add note to split_path/1 and path/1 on escaped / --- src/cowboy_http_req.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/cowboy_http_req.erl') diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl index 5b63599..2e37079 100644 --- a/src/cowboy_http_req.erl +++ b/src/cowboy_http_req.erl @@ -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 / if, and only if, a / 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}. -- cgit v1.2.3