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

Colon in uri generate response 404 #67

Closed
4n1qz5skwv opened this issue Sep 27, 2022 · 2 comments
Closed

Colon in uri generate response 404 #67

4n1qz5skwv opened this issue Sep 27, 2022 · 2 comments

Comments

@4n1qz5skwv
Copy link

Sanic can't find the route if there's a colon in the uri.

Code snippet

from sanic import Sanic, Request, HTTPResponse

app = Sanic('zzz')


@app.get(f'/abc/x:y')
async def main(_: Request):
    return HTTPResponse()


if __name__ == '__main__':
    app.run()

Expected behavior
GET http://127.0.0.1:8000/abc/x:y 200 0

Actual behavior
GET http://127.0.0.1:8000/abc/x:y 404 733

Environment

[2022-09-26 20:50:40 +0600] [13060] [INFO] Sanic v22.6.2
[2022-09-26 20:50:40 +0600] [13060] [INFO] Goin' Fast @ http://127.0.0.1:8000
[2022-09-26 20:50:40 +0600] [13060] [INFO] mode: production, single worker
[2022-09-26 20:50:40 +0600] [13060] [INFO] server: sanic, HTTP/1.1
[2022-09-26 20:50:40 +0600] [13060] [INFO] python: 3.10.5
[2022-09-26 20:50:40 +0600] [13060] [INFO] platform: Windows-10-10.0.19044-SP0
[2022-09-26 20:50:40 +0600] [13060] [INFO] packages: sanic-routing==22.3.0
[2022-09-26 20:50:40 +0600] [13060] [INFO] Starting worker [13060]

Additional context
tiangolo/fastapi#4892
encode/starlette#1657

@4n1qz5skwv
Copy link
Author

sanic-org/sanic#2553

@ahopkins
Copy link
Member

Closing this. Keep thread in other issue.

@ahopkins ahopkins closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants