[StaticRoute] Add preliminary support for sendfile system call.#503
[StaticRoute] Add preliminary support for sendfile system call.#503asvetlov merged 11 commits intoaio-libs:masterfrom
Conversation
aiohttp/web_urldispatcher.py
Outdated
There was a problem hiding this comment.
Fallback should be performed automatically.
User doesn't know (and doesn't care) is underlying OS support sendfile.
There was a problem hiding this comment.
True, but it's useful to force the use of the fallback sendfile in the tests. That's the primary reason why the option exists.
But fallback is done automatically if sendfile_fallback=False. This should really be named force_sendfile_fallback, but that's too long.
There was a problem hiding this comment.
Public API is made not for tests, but for users. There is no need to pollute it with special flags, while you may call exact sendfile function in tests.
|
Yes, all tests should be passed with sendfile and fallback. |
…sendfile` for RANGE support.
[StaticRoute] Add preliminary support for sendfile system call.
|
Thanks! |
This is a first draft of
sendfilesupport. Not merge ready, yet. Please critique.The tests probably need some work. Should we test every static file test with both
sendfileandsendfile_fallback?#398