[erlang-questions] httpc broke URL parsing in OTP-21.0?
Roger Lipscombe
roger@REDACTED
Mon Jun 25 19:04:03 CEST 2018
On 25 June 2018 at 17:05, Andreas Schultz
<andreas.schultz@REDACTED> wrote:
> 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 [0]=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
mailing list