benoitc/hackney_lib — pull request #16 by Dumbris (2014-03-17 12:24:15+00:00)
Title: Fix "exception error: bad argument" for hackney_url:fix_path(<<"/">>)

Fix "exception error: bad argument" for hackney_url:fix_path(<<"/">>) or hackney_url:fix_path(<<>>);

Error was:
(wsg@alg)30> hackney_url:fix_path(<<"/">>).
(<0.2999.0>) call hackney_url:fix_path(<<"/">>)
(<0.2999.0>) call hackney_url:fix_path(<<>>)
(<0.2999.0>) exception_from {hackney_url,fix_path,1} {error,badarg}
(<0.2999.0>) exception_from {hackney_url,fix_path,1} {error,badarg}
** exception error: bad argument
in function binary:part/2
called as binary:part(<<>>,{0,-1})
in call from hackney_url:fix_path/1 (src/hackney_url.erl, line 306)