You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original reporter: rjmh
Affected version: OTP-23.0-rc3
Fixed in version: OTP-23
Component: Not Specified
Migrated from: https://bugs.erlang.org/browse/ERL-1241
Calling httpc:request with a malformed URL can result in an exception rather than an error result. Sure, the argument is bad, but the documentation doesn't mention exceptions, and the behaviour was friendlier back in OTP-19.
{{Erlang/OTP 23 [RELEASE CANDIDATE 3] [erts-11.0] [source] [64-bit] [smp:36:36] [ds:36:36:10] [async-threads:1] [hipe]}}{{Eshell V11.0 (abort with ^G)}}
{{1> httpc:request("http://:").}}
{{** exception error: bad argument}}
{{ in function integer_to_list/1}}
{{ called as integer_to_list(undefined)}}
{{ in call from http_request:normalize_host/3 (http_request.erl, line 111)}}
{{ in call from httpc:handle_request/9 (httpc.erl, line 549)}}
{{2>}}
{{In OTP-19:}}
{{1}}{{> httpc:request("http://:").}}
{{{error,\{malformed_url,http,"http://:"}}}}
The text was updated successfully, but these errors were encountered:
This crash happened because httpc did not handle undefined port correctly. It was expecting a number but fed with undefined value. A fix has been merged and probably will be released in OTP23.1 (next release)
Original reporter:
rjmh
Affected version:
OTP-23.0-rc3
Fixed in version:
OTP-23
Component:
Not Specified
Migrated from: https://bugs.erlang.org/browse/ERL-1241
The text was updated successfully, but these errors were encountered: