diff options
author | Loïc Hoguin <[email protected]> | 2011-05-16 12:08:55 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-05-16 12:08:55 +0200 |
commit | 98b9b1124ca96655a774259e3f18693161f42cfa (patch) | |
tree | e874d05a3b738ea45315d0fb9a53d8922fa4b2b5 /src/cowboy_http_req.erl | |
parent | 9f06bac7bff3c8a8edbd90e3de80792c45c03578 (diff) | |
parent | 4e09d776f5368f432971429f9868052f55151555 (diff) | |
download | cowboy-98b9b1124ca96655a774259e3f18693161f42cfa.tar.gz cowboy-98b9b1124ca96655a774259e3f18693161f42cfa.tar.bz2 cowboy-98b9b1124ca96655a774259e3f18693161f42cfa.zip |
Merge remote-tracking branch 'nox/path-info'
Diffstat (limited to 'src/cowboy_http_req.erl')
-rw-r--r-- | src/cowboy_http_req.erl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl index 875a6dd..44286e2 100644 --- a/src/cowboy_http_req.erl +++ b/src/cowboy_http_req.erl @@ -17,8 +17,8 @@ -export([ method/1, version/1, peer/1, - host/1, raw_host/1, port/1, - path/1, raw_path/1, + host/1, host_info/1, raw_host/1, port/1, + path/1, path_info/1, raw_path/1, qs_val/2, qs_val/3, qs_vals/1, raw_qs/1, binding/2, binding/3, bindings/1, header/2, header/3, headers/1 @@ -59,6 +59,12 @@ peer(Req) -> host(Req) -> {Req#http_req.host, Req}. +-spec host_info(Req::#http_req{}) + -> {HostInfo::cowboy_dispatcher:path_tokens() | undefined, + Req::#http_req{}}. +host_info(Req) -> + {Req#http_req.host_info, Req}. + -spec raw_host(Req::#http_req{}) -> {RawHost::binary(), Req::#http_req{}}. raw_host(Req) -> {Req#http_req.raw_host, Req}. @@ -72,6 +78,12 @@ port(Req) -> path(Req) -> {Req#http_req.path, Req}. +-spec path_info(Req::#http_req{}) + -> {PathInfo::cowboy_dispatcher:path_tokens() | undefined, + Req::#http_req{}}. +path_info(Req) -> + {Req#http_req.path_info, Req}. + -spec raw_path(Req::#http_req{}) -> {RawPath::binary(), Req::#http_req{}}. raw_path(Req) -> {Req#http_req.raw_path, Req}. |