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

Remove superfluous root_path from logging messages #1290

Closed
2 tasks done
HansBrende opened this issue Dec 10, 2021 · 0 comments · Fixed by #1294
Closed
2 tasks done

Remove superfluous root_path from logging messages #1290

HansBrende opened this issue Dec 10, 2021 · 0 comments · Fixed by #1294

Comments

@HansBrende
Copy link
Contributor

Checklist

  • The bug is reproducible against the latest release or master.
  • There are no similar issues or pull requests to fix it yet.

Describe the bug

As per encode/starlette#1336, scope["root_path"] is never supposed to be joined to scope["path"], as the latter is supposed to be already prefixed with the former. Luckily uvicorn is never doing this except in logging. It is logging incorrect paths (according to ASGI spec) in the following places:

https://github.com/encode/uvicorn/blob/master/uvicorn/protocols/websockets/wsproto_impl.py#L256
https://github.com/encode/uvicorn/blob/master/uvicorn/protocols/websockets/wsproto_impl.py#L272
https://github.com/encode/uvicorn/blob/master/uvicorn/protocols/websockets/websockets_impl.py#L230
https://github.com/encode/uvicorn/blob/master/uvicorn/protocols/websockets/websockets_impl.py#L240
https://github.com/encode/uvicorn/blob/master/uvicorn/protocols/utils.py#L50

Steps to reproduce the bug

No response

Expected behavior

No response

Actual behavior

No response

Debugging material

No response

Environment

Running uvicorn 0.16.0 with CPython 3.8.10 on Darwin

Additional context

No response

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

Successfully merging a pull request may close this issue.

1 participant