25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Merge branch 'master' of github.com:processone/ejabberd

This commit is contained in:
Evgeniy Khramtsov 2014-10-27 13:44:59 +03:00
commit 067958d705

View File

@ -798,7 +798,12 @@ base64_to_term(Base64) ->
-spec decode_base64(binary()) -> binary(). -spec decode_base64(binary()) -> binary().
decode_base64(S) -> decode_base64(S) ->
decode_base64_bin(S, <<>>). case catch binary:last(S) of
C when C == $\n; C == $\s ->
decode_base64(binary:part(S, 0, byte_size(S) - 1));
_ ->
decode_base64_bin(S, <<>>)
end.
take_without_spaces(Bin, Count) -> take_without_spaces(Bin, Count) ->
take_without_spaces(Bin, Count, <<>>). take_without_spaces(Bin, Count, <<>>).