We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
http.response.pathsend
As suggested by @Kludex
ASGI protocol might take advantage of granian capability of directly serve files from a path, like already implemented in RSGI proto.response_file.
proto.response_file
This would require to open up a PR to https://github.com/django/asgiref adding the new extra, which might look like the following:
"scope": { ... "extensions": { "http.response.file_path": {}, }, }
With the above extra definition, a new event might be produced by ASGI applications, with the following keys:
type
file_path
The ASGI application is still responsible to send the http.response.start event with the relevant headers (eg: content-type, content-length, etc.)
http.response.start
content-type
content-length
The text was updated successfully, but these errors were encountered:
http.response.file_path
Add support for ASGI pathsend (#82)
f582221
pathsend
Add ASGI pathsend tests (#82)
37ebd1e
63dd437
1bc6666
AsgiWhiteNoise
WhiteNoiseMiddleware
Successfully merging a pull request may close this issue.
As suggested by @Kludex
ASGI protocol might take advantage of granian capability of directly serve files from a path, like already implemented in RSGI
proto.response_file
.This would require to open up a PR to https://github.com/django/asgiref adding the new extra, which might look like the following:
With the above extra definition, a new event might be produced by ASGI applications, with the following keys:
type
(Unicode string): "http.response.file_path"file_path
(Unicode string): The string representation of the file path to serve (platform specific)The ASGI application is still responsible to send the
http.response.start
event with the relevant headers (eg:content-type
,content-length
, etc.)The text was updated successfully, but these errors were encountered: