Skip to content
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

Nodelay #680

Merged
merged 11 commits into from
Dec 15, 2015
Prev Previous commit
Next Next commit
Enable TCP_CORK for sending static file
  • Loading branch information
asvetlov committed Dec 15, 2015
commit faa0b20212a48c9123ab043fbff36d913636e44c
1 change: 1 addition & 0 deletions aiohttp/web_urldispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def handle(self, request):
file_size = st.st_size

resp.content_length = file_size
resp.set_tcp_cork(True)
yield from resp.prepare(request)

with open(filepath, 'rb') as f:
Expand Down