benoitc / hackney

simple HTTP client in Erlang
Other
1.34k stars 427 forks source link

fix: ignore empty proxy_env #739

Open feng19 opened 7 months ago

feng19 commented 7 months ago

When all_proxy= it will throw an error:

[error] GenServer #PID<0.2401.0> terminating
** (CaseClauseError) no case clause matching: []
    (hackney 1.20.1) deps/hackney/src/hackney_url.erl:248: :hackney_url.parse_netloc/2
    (hackney 1.20.1) deps/hackney/src/hackney.erl:691: :hackney.proxy_from_url/5
    (hackney 1.20.1) deps/hackney/src/hackney.erl:335: :hackney.request/5
    (tesla 1.8.0) lib/tesla/adapter/hackney.ex:75: Tesla.Adapter.Hackney.request/5
    (tesla 1.8.0) lib/tesla/adapter/hackney.ex:37: Tesla.Adapter.Hackney.call/2
benoitc commented 6 months ago

this should be merged in https://github.com/benoitc/hackney/pull/737 . Working on it. Thanks for the patch