aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-05-15 14:46:24 +0200
committerLoïc Hoguin <[email protected]>2013-05-15 14:46:24 +0200
commit517a31086b5309f09b414df2d1a58a95474e4e43 (patch)
tree03f73f13c4f7a753ceef57c432e221c7deff8716
parent6e33274c852f60eccbdc610b0525c3541d36aa89 (diff)
downloadcowboy-517a31086b5309f09b414df2d1a58a95474e4e43.tar.gz
cowboy-517a31086b5309f09b414df2d1a58a95474e4e43.tar.bz2
cowboy-517a31086b5309f09b414df2d1a58a95474e4e43.zip
Change some module calls to local function calls
-rw-r--r--erlang.mk2
-rw-r--r--src/cowboy_http.erl8
2 files changed, 5 insertions, 5 deletions
diff --git a/erlang.mk b/erlang.mk
index 9e4c698..ecd4d54 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -116,7 +116,7 @@ CT_SUITES ?=
CT_SUITES_FULL = $(addsuffix _SUITE,$(CT_SUITES))
tests: ERLC_OPTS += -DTEST=1 +'{parse_transform, eunit_autoexport}'
-tests: clean clean-deps deps app build-tests
+tests: clean deps app build-tests
@mkdir -p logs/
@$(CT_RUN) -suite $(CT_SUITES_FULL)
$(gen_verbose) rm -f test/*.beam
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index f889b52..fc08716 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -802,7 +802,7 @@ qvalue(Data, Fun, Q, _M) ->
%% Only Basic authorization is supported so far.
-spec authorization(binary(), binary()) -> {binary(), any()} | {error, badarg}.
authorization(UserPass, Type = <<"basic">>) ->
- cowboy_http:whitespace(UserPass,
+ whitespace(UserPass,
fun(D) ->
authorization_basic_userid(base64:mime_decode(D),
fun(Rest, Userid) ->
@@ -813,7 +813,7 @@ authorization(UserPass, Type = <<"basic">>) ->
end)
end);
authorization(String, Type) ->
- cowboy_http:whitespace(String, fun(Rest) -> {Type, Rest} end).
+ whitespace(String, fun(Rest) -> {Type, Rest} end).
%% @doc Parse user credentials.
-spec authorization_basic_userid(binary(), fun()) -> any().
@@ -849,12 +849,12 @@ authorization_basic_password(<<C, Rest/binary>>, Fun, Acc) ->
Unit :: binary(),
Range :: {non_neg_integer(), non_neg_integer() | infinity} | neg_integer().
range(Data) ->
- cowboy_http:token_ci(Data, fun range/2).
+ token_ci(Data, fun range/2).
range(Data, Token) ->
whitespace(Data,
fun(<<"=", Rest/binary>>) ->
- case cowboy_http:list(Rest, fun range_beginning/2) of
+ case list(Rest, fun range_beginning/2) of
{error, badarg} ->
{error, badarg};
Ranges ->