Skip to content

Commit

Permalink
Merge pull request #19 from kofron/fix_empty_path
Browse files Browse the repository at this point in the history
fixed a bug where an empty path part would cause make_url/3 to fail
  • Loading branch information
benoitc committed Apr 14, 2014
2 parents 01d4ced + 0d48d3c commit 60b7061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hackney_url.erl
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ make_url(Url, Path, Query) when is_binary(Path) ->
make_url(Url, [Path], Query);
make_url(Url, PathParts, Query) when is_binary(Query) ->
%% create path
PathParts1 = [fix_path(P) || P <- PathParts, P /= "/" orelse P /= <<"/">>],
PathParts1 = [fix_path(P) || P <- PathParts, P /= "", P /= "/" orelse P /= <<"/">>],
Path = hackney_bstr:join([<<>> | PathParts1], <<"/">>),

%% initialise the query
Expand Down

0 comments on commit 60b7061

Please sign in to comment.