From 7bcbea210800e67045a9a58448a2e695d073246b Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Thu, 30 Mar 2017 14:17:13 +0300 Subject: Deprecate jlib.erl in favor of aux.erl Since the main goal of jlib.erl is lost, all auxiliary functions are now moved to aux.erl, and the whole jlib.erl is now deprecated. --- src/ejabberd_http.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ejabberd_http.erl') diff --git a/src/ejabberd_http.erl b/src/ejabberd_http.erl index c3f962fb..c7df928b 100644 --- a/src/ejabberd_http.erl +++ b/src/ejabberd_http.erl @@ -258,7 +258,7 @@ process_header(State, Data) -> request_version = Version, request_path = Path, request_keepalive = KeepAlive}; {ok, {http_header, _, 'Connection' = Name, _, Conn}} -> - KeepAlive1 = case jlib:tolower(Conn) of + KeepAlive1 = case aux:tolower(Conn) of <<"keep-alive">> -> true; <<"close">> -> false; _ -> State#state.request_keepalive @@ -520,7 +520,7 @@ make_bad_request(State) -> analyze_ip_xff(IP, [], _Host) -> IP; analyze_ip_xff({IPLast, Port}, XFF, Host) -> [ClientIP | ProxiesIPs] = str:tokens(XFF, <<", ">>) ++ - [jlib:ip_to_list(IPLast)], + [aux:ip_to_list(IPLast)], TrustedProxies = ejabberd_config:get_option( {trusted_proxies, Host}, fun(all) -> all; @@ -735,7 +735,7 @@ rest_dir(N, Path, <<_H, T/binary>>) -> rest_dir(N, Path, T). expand_custom_headers(Headers) -> lists:map(fun({K, V}) -> - {K, jlib:expand_keyword(<<"@VERSION@">>, V, ?VERSION)} + {K, aux:expand_keyword(<<"@VERSION@">>, V, ?VERSION)} end, Headers). %% hex_to_integer @@ -801,7 +801,7 @@ code_to_phrase(505) -> <<"HTTP Version Not Supported">>. -spec parse_auth(binary()) -> {binary(), binary()} | {oauth, binary(), []} | undefined. parse_auth(<<"Basic ", Auth64/binary>>) -> - Auth = jlib:decode_base64(Auth64), + Auth = aux:decode_base64(Auth64), %% Auth should be a string with the format: user@server:password %% Note that password can contain additional characters '@' and ':' case str:chr(Auth, $:) of -- cgit v1.2.3