aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-01-23 09:23:58 +0100
committerLoïc Hoguin <[email protected]>2012-01-23 09:23:58 +0100
commit314483a0b6609873f5c215d24e662016374128ec (patch)
treec68bd8c9205f0a47a548aebe582d62558dd71471
parent9f4016748782876c4ac006a438df52a6bf19203c (diff)
downloadcowboy-314483a0b6609873f5c215d24e662016374128ec.tar.gz
cowboy-314483a0b6609873f5c215d24e662016374128ec.tar.bz2
cowboy-314483a0b6609873f5c215d24e662016374128ec.zip
Rename the type http_uri/0 to cowboy_http:uri/0
-rw-r--r--include/http.hrl4
-rw-r--r--src/cowboy_http.erl6
-rw-r--r--src/cowboy_http_protocol.erl2
3 files changed, 6 insertions, 6 deletions
diff --git a/include/http.hrl b/include/http.hrl
index c693e53..0be6652 100644
--- a/include/http.hrl
+++ b/include/http.hrl
@@ -13,10 +13,6 @@
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--type http_uri() :: '*' | {absoluteURI, http | https, Host::binary(),
- Port::integer() | undefined, Path::binary()}
- | {scheme, Scheme::binary(), binary()}
- | {abs_path, binary()} | binary().
-type http_version() :: {Major::non_neg_integer(), Minor::non_neg_integer()}.
-type http_header() :: 'Cache-Control' | 'Connection' | 'Date' | 'Pragma'
| 'Transfer-Encoding' | 'Upgrade' | 'Via' | 'Accept' | 'Accept-Charset'
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index 2f29375..4891d72 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -28,8 +28,12 @@
-type method() :: 'OPTIONS' | 'GET' | 'HEAD'
| 'POST' | 'PUT' | 'DELETE' | 'TRACE' | binary().
+-type uri() :: '*' | {absoluteURI, http | https, Host::binary(),
+ Port::integer() | undefined, Path::binary()}
+ | {scheme, Scheme::binary(), binary()}
+ | {abs_path, binary()} | binary().
--export_type([method/0]).
+-export_type([method/0, uri/0]).
-include("include/http.hrl").
-include_lib("eunit/include/eunit.hrl").
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index 1202dbe..e4aaf27 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -108,7 +108,7 @@ wait_request(State=#state{socket=Socket, transport=Transport,
{error, _Reason} -> terminate(State)
end.
--spec request({http_request, cowboy_http:method(), http_uri(),
+-spec request({http_request, cowboy_http:method(), cowboy_http:uri(),
http_version()}, #state{}) -> ok | none().
request({http_request, _Method, _URI, Version}, State)
when Version =/= {1, 0}, Version =/= {1, 1} ->