Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route error on valid routes #76

Open
Schultzer opened this issue Jan 17, 2019 · 6 comments
Open

Route error on valid routes #76

Schultzer opened this issue Jan 17, 2019 · 6 comments

Comments

@Schultzer
Copy link

Schultzer commented Jan 17, 2019

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.

@mvalitov
Copy link

I get the same error when there are parameters in the route via "?"

@mvalitov
Copy link

look at here #55

@anthonator
Copy link
Contributor

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.

@thiamsantos
Copy link
Contributor

@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?

@Schultzer
Copy link
Author

@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;

@Nezteb
Copy link

Nezteb commented May 24, 2024

I've also run into this. Specifically any URL paths with query params will cause the "route error".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants