[erlang-questions] httpc broke URL parsing in OTP-21.0?

Roger Lipscombe roger@REDACTED
Mon Jun 25 16:31:15 CEST 2018


Pared it down:

17> httpc:request(get, {"http://localhost/?x[0]=1", []}, [], []).
** exception error: no function clause matching
uri_string:parse({error,invalid_uri,":"}) (uri_string.erl, line 337)
     in function  httpc:request/5 (httpc.erl, line 179)
18> httpc:request(get, {"http://localhost/?x=1", []}, [], []).
{ok,{{"HTTP/1.1",200,"OK"}, ...}

It doesn't seem to like the square brackets.

On 25 June 2018 at 15:28, Roger Lipscombe <roger@REDACTED> wrote:
> 20.3...
>
> 1> inets:start().
> ok
> 2> httpc:request(get,
> {"http://localhost:31316/EluoueLg-ueL/?x=32&y=54&z[0]=1&z[1]=2&q[]=5&q[]=4&p=9&p=8",
> []}, [], []).
> {error,{failed_connect,[{to_address,{"localhost",31316}},
>                         {inet,[inet],econnrefused}]}}
>
> ...fair enough (no server is running).
>
> 21.0...
>
> 1> inets:start().
> ok
> 2> httpc:request(get,
> {"http://localhost:31316/EluoueLg-ueL/?x=32&y=54&z[0]=1&z[1]=2&q[]=5&q[]=4&p=9&p=8",
> []}, [], []).
> ** exception error: no function clause matching
> uri_string:parse({error,invalid_uri,":"}) (uri_string.erl, line 337)
>      in function  httpc:request/5 (httpc.erl, line 179)
>
> Not good :(
>
> Cheers,
> Roger.



More information about the erlang-questions mailing list