Skip to content

Commit

Permalink
Fix issue aio-libs#512: force sendfile fallback when using SSL.
Browse files Browse the repository at this point in the history
  • Loading branch information
jashandeep-sohi committed Sep 18, 2015
1 parent dd4062e commit ffc7982
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aiohttp/web_urldispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,16 @@ def _sendfile_system(self, req, resp, fobj, count):
`count` should be an integer > 0.
"""
transport = req.transport

if transport.get_extra_info("sslcontext"):
yield from self._sendfile_fallback(req, resp, fobj, count)
return

yield from resp.drain()

loop = req.app.loop
out_fd = req.transport.get_extra_info("socket").fileno()
out_fd = transport.get_extra_info("socket").fileno()
in_fd = fobj.fileno()
fut = asyncio.Future(loop=loop)

Expand Down

0 comments on commit ffc7982

Please sign in to comment.