You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using FileResponse to return a file. However, if I pass a status to __init__() it is overwritten with 200 in FileResponse.prepare(). This looks like a bug as it should probably only overwrite this value when handling a range request.
Long story short
I am using FileResponse to return a file. However, if I pass a status to
__init__()
it is overwritten with 200 inFileResponse.prepare()
. This looks like a bug as it should probably only overwrite this value when handling a range request.Relevant lines:
https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web_fileresponse.py#L248
https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web_fileresponse.py#L322
I will open a PR shortly.
Expected behaviour
I expect the HTTP status code I desire to be emitted to the client.
Actual behaviour
HTTP status is always 200.
Steps to reproduce
Your environment
Ubuntu 18.04, I am using aiohttp==3.6.1, but master has the same issue.
The text was updated successfully, but these errors were encountered: