Skip to content

Commit 8fddc96

Browse files
committed
ejabberd_http: Get back handling when BOSH or WS are disabled
This support was broken in recent commit 06a8994
1 parent 0d24869 commit 8fddc96

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ejabberd_http.erl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,8 +898,10 @@ get_url_preliminar(M, Tls, Host, Option, Handler) ->
898898
end.
899899

900900
get_auto_url(Tls, Handler) ->
901-
[{_ThisTls, Url} | _] = get_auto_urls(Tls, Handler),
902-
Url.
901+
case get_auto_urls(Tls, Handler) of
902+
[] -> undefined;
903+
[{_ThisTls, Url} | _] -> Url
904+
end.
903905

904906
-spec get_auto_urls(boolean() | any, atom()) -> [{boolean(), binary()}].
905907

0 commit comments

Comments
 (0)