ASGI callable returned without completing response & nginx redirect
See original GitHub issueHi, I am trying to figure out how to resolve this error and if I am doing something incorrectly. It is triggered when I use the X-Accel-Redirect feature of nginx. This view is working fine as far as I can tell, but after each request I get that exception logged.
My view looks like this:
def view(request):
filename = "some_file"
path = "/path/to/image.png"
response = HttpResponse()
response["Content-Disposition"] = "attachment; filename={}".format(filename)
response["X-Accel-Redirect"] = "/protected/{}".format(path)
return response
Example log:
INFO: / - "GET /app/image/35/ HTTP/1.0" 200
ERROR: ASGI callable returned without completing response.
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
ASGI callable returned without starting response
My issue was caused by a customize middleware. I've been able to update the middleware and fix this issue.
Read more >Redirects from Nginx reverse-proxyed Django ASGI server ...
It's adding directories, not dropping the /etesync/ directory like i've seen in other questions. (Going directly to dan9er.internal/etesync/ ...
Read more >Configuration - NGINX Unit
The value is variable-interpolated; if it matches no configuration entities after interpolation, a 404 “Not Found” status code is returned.
Read more >tiangolo/fastapi - Gitter
Team, when I add a middleware to my fastapi app, i end up with TypeError: 'NoneType' object is not callable related to URL...
Read more >Using Starlette to migrate my blog across domains
So, how should I proceed in order not to break URL references, and retain the existing ranking on search engines? The answer was...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for reporting this, and your time looking into it!
Okay, oughta now be resolved in 0.3.7. We also now have some really nice debug-level logging in place.