From 3c480a5b0b186c5f3173c5b2c3f84ea8c19a7918 Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Wed, 30 Mar 2016 16:47:40 +0200 Subject: [PATCH] Fix Dialyzer inconsistency --- include/ejabberd_http.hrl | 3 +-- src/ejabberd_http.erl | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ejabberd_http.hrl b/include/ejabberd_http.hrl index b8cbe37087b..25209f76c92 100644 --- a/include/ejabberd_http.hrl +++ b/include/ejabberd_http.hrl @@ -23,8 +23,7 @@ path = [] :: [binary()], q = [] :: [{binary() | nokey, binary()}], us = {<<>>, <<>>} :: {binary(), binary()}, - auth :: {binary(), binary()} | - {auth_jid, {binary(), binary()}, jlib:jid()}, + auth :: {binary(), binary()} | {oauth, binary(), []} | undefined, lang = <<"">> :: binary(), data = <<"">> :: binary(), ip :: {inet:ip_address(), inet:port_number()}, diff --git a/src/ejabberd_http.erl b/src/ejabberd_http.erl index d8d1ddd44d7..6b53f46c6a2 100644 --- a/src/ejabberd_http.erl +++ b/src/ejabberd_http.erl @@ -753,6 +753,7 @@ code_to_phrase(503) -> <<"Service Unavailable">>; code_to_phrase(504) -> <<"Gateway Timeout">>; 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 should be a string with the format: user@server:password