parent
1546bb6a39
commit
d396d59779
|
|
@ -70,8 +70,9 @@ parse(Uri, DefaultVHost) ->
|
||||||
error:Err -> {error, {Err, Uri}}
|
error:Err -> {error, {Err, Uri}}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
parse1(Uri, DefaultVHost) when is_list(Uri) ->
|
parse1(Uri, DefaultVHost) when is_list(Uri); is_binary(Uri) ->
|
||||||
case uri_parser:parse(Uri, [{host, undefined}, {path, undefined},
|
UriString = rabbit_data_coercion:to_list(Uri),
|
||||||
|
case uri_parser:parse(UriString, [{host, undefined}, {path, undefined},
|
||||||
{port, undefined}, {'query', []}]) of
|
{port, undefined}, {'query', []}]) of
|
||||||
{error, Err} ->
|
{error, Err} ->
|
||||||
throw({unable_to_parse_uri, Err});
|
throw({unable_to_parse_uri, Err});
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,8 @@
|
||||||
%% 'fragment'.
|
%% 'fragment'.
|
||||||
|
|
||||||
parse(AbsURI, Defaults) ->
|
parse(AbsURI, Defaults) ->
|
||||||
case parse_scheme(AbsURI) of
|
AbsUriString = rabbit_data_coercion:to_list(AbsURI),
|
||||||
|
case parse_scheme(AbsUriString) of
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
{error, Reason};
|
{error, Reason};
|
||||||
{Scheme, Rest} ->
|
{Scheme, Rest} ->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue