diff options
author | Loïc Hoguin <[email protected]> | 2013-05-15 14:46:24 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-05-15 14:46:24 +0200 |
commit | 517a31086b5309f09b414df2d1a58a95474e4e43 (patch) | |
tree | 03f73f13c4f7a753ceef57c432e221c7deff8716 /src | |
parent | 6e33274c852f60eccbdc610b0525c3541d36aa89 (diff) | |
download | cowboy-517a31086b5309f09b414df2d1a58a95474e4e43.tar.gz cowboy-517a31086b5309f09b414df2d1a58a95474e4e43.tar.bz2 cowboy-517a31086b5309f09b414df2d1a58a95474e4e43.zip |
Change some module calls to local function calls
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_http.erl | 8 |
1 files changed, 4 insertions, 4 deletions
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 -> |