Route error on valid routes
Schultzer opened this issue · 6 comments
Hi,
I get an Route error
on routes with decimal values like /myroute/v1/0,10.0
Request: GET /myroute/v1/0,10.0
** (exit) an exception was raised:
** (RuntimeError) Route error
(bypass) lib/bypass/plug.ex:24: Bypass.Plug.call/2
(plug_cowboy) lib/plug/cowboy/handler.ex:12: Plug.Cowboy.Handler.init/2
(cowboy) myroute/deps/cowboy/src/cowboy_handler.erl:41: :cowboy_handler.execute/2
(cowboy) myroute/deps/cowboy/src/cowboy_stream_h.erl:296: :cowboy_stream_h.execute/3
(cowboy) myroute/deps/cowboy/src/cowboy_stream_h.erl:274: :cowboy_stream_h.request_process/3
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
OWM use these routes example here https://samples.openweathermap.org/pollution/v1/co/0.0,10.0/current.json?appid=b1b15e88fa797225412429c1c50c122a1
I'm not sure if this is a Plug specific issue.
I get the same error when there are parameters in the route via "?"
Bypass also doesn't accept paths with double /
. For instance //fake
throws the Route error
exception. I've never encountered an HTTP client or server that would reject this.
@Schultzer @anthonator Really strange this behaviour. I just tested GET /myroute/v1/0,10.0
and GET //fake
and it worked normally. There was any special scenario that triggered this error?
@thiamsantos I don't know and I don't use bypass anymore, but maybe you could just add some test cases; to make sure, this is working, with previous and current OTP/Elixir releases;