#35354 closed Cleanup/optimization (fixed)
Simplify ASGIRequest path handling.
| Reported by: | Carlton Gibson | Owned by: | Carlton Gibson |
|---|---|---|---|
| Component: | HTTP handling | Version: | 5.0 |
| Severity: | Normal | Keywords: | asgi |
| Cc: | Andrew Godwin | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Following the ASGI HTTP Connection Scope docs[0], the provided path is already the correct value that Django requires.
In combination with root_path, from which script_name is derived, the path_info variable is set.
It's then redundant to re-calculate path from script_name and path_info.
See also, a clarifying discussion on the ASGIref repo[1].
[0]: https://asgi.readthedocs.io/en/latest/specs/www.html#http-connection-scope
[1]: https://github.com/django/asgiref/issues/424
Change History (8)
comment:1 by , 20 months ago
| Owner: | changed from to |
|---|
comment:2 by , 20 months ago
| Cc: | added |
|---|
comment:3 by , 20 months ago
| Description: | modified (diff) |
|---|
comment:4 by , 20 months ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:5 by , 20 months ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
PR