[erlang-questions] httpc broke URL parsing in OTP-21.0?
Mon Jun 25 19:04:03 CEST 2018
On 25 June 2018 at 17:05, Andreas Schultz
> Square brackets are not permitted in the query part of an URL. You need to
> percent encode them (see https://tools.ietf.org/html/rfc3986#section-3.4).
Sure, but this is a breaking change. Source that did work now doesn't.
> However, many browsers and web servers will accept square brackets in the
> URI. And some (probably many) broken clients will not encode square brackets
> in requests.
Chrome passes the square brackets straight through if you type them
into the address bar; haven't checked any other browsers (yet).
> $ wget --debug -O /dev/null -S 'http://localhost:8080/?x =1'
curl (provided you specify --globoff; and, tbf, it *does* have a
warning in the manpage) also passes them straight through.
I've fixed my code -- it was just one line -- but ... breaking change.
More information about the erlang-questions