-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
enable_compression doesn't work with FileResponse in sendfile mode #2942
Comments
Try to set |
Works now, thanks. Is there a way to set this programmatically? |
Not yet. The path for |
The issue is waiting for a champion. |
I'll take this one. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
response.enable_compression doesn't work on Heroku.
Expected behaviour
enable_compression on a response should work on Heroku.
Actual behaviour
While this worked locally just fine, Heroku didn't like it when I enabled compression on a FileResponse:
Apr 17 11:58:19 my-app-staging heroku/router: http_error="Bad chunk" at=error code=H17 desc="Poorly formatted HTTP response" method=GET path="/" host=my-app-staging.herokuapp.com request_id=0bc47133-af19-4999-bc0f-179054b7388a fwd="xx.xx.xx.xx" dyno=web.1 connect=0ms service=19ms status=503 bytes= protocol=https
Apr 17 11:58:19 my-app-staging heroku/router: http_error="Bad chunk" at=error code=H17 desc="Poorly formatted HTTP response" method=GET path="/" host=my-app-staging.herokuapp.com request_id=9c1b4583-61d5-4867-bf1a-75de194cf71f fwd="xx.xx.xx.xx" dyno=web.1 connect=0ms service=5ms status=503 bytes= protocol=https
Apr 17 11:58:23 my-app-staging heroku/router: http_error="Bad chunk" at=error code=H17 desc="Poorly formatted HTTP response" method=GET path="/" host=my-app-staging.herokuapp.com request_id=a2f80aee-0ba0-4117-9139-123a79fd2f1c fwd="xx.xx.xx.xx" dyno=web.1 connect=0ms service=3ms status=503 bytes= protocol=https
Steps to reproduce
Your environment
aiohttp==2.3.6
Using aiohttp directly on Heroku (no gunicorn/etc).
The text was updated successfully, but these errors were encountered: