asgiref
asgiref copied to clipboard
Clarify `raw_path` Definition for WebSockets Protocol in the Specification
The definition of raw_path
in the ASGI specification differs slightly between HTTP and WebSockets protocols.
-
HTTP: The specification explicitly states that the query string is excluded from
raw_path
.
https://github.com/django/asgiref/blob/b7aaa795fbbea7ca88458279cf8302533d249101/specs/www.rst?#L107-L110
-
WebSockets: The specification does not mention whether the query string should be included or excluded from
raw_path
.
https://github.com/django/asgiref/blob/b7aaa795fbbea7ca88458279cf8302533d249101/specs/www.rst?#L318-L321
To ensure clarity and consistency, it would be beneficial to explicitly define the behavior of raw_path
for WebSockets:
- If the query string should be excluded: The specification should use the same wording as in the HTTP section to avoid ambiguity.
- If the query string should be included: This should be explicitly stated, along with any rationale for the differing behavior.
Given the potential for confusion, it would be helpful to clarify this in the specification.