From 517a31086b5309f09b414df2d1a58a95474e4e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 15 May 2013 14:46:24 +0200 Subject: Change some module calls to local function calls --- src/cowboy_http.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cowboy_http.erl') 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(<>, 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 -> -- cgit v1.2.3