Closed
Description
Long story short
Static handler raises AssertionError.
Expected behaviour
from aiohttp import web
app = web.Application()
app.router.add_static('/', '/', show_index=True)
web.run_app(app)Try to download any file. No errors should be reported.
Actual behaviour
Error log printed out.
Error handling request
Traceback (most recent call last):
File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/server.py", line 261, in start
yield from self.handle_request(message, payload)
File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/web.py", line 96, in handle_request
yield from resp.write_eof()
File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/web_reqrep.py", line 772, in write_eof
yield from self._resp_impl.write_eof()
File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/protocol.py", line 733, in write_eof
self.write(EOF_MARKER)
File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/protocol.py", line 711, in write
assert self.writer is not None, 'send_headers() is not called.'
AssertionError: send_headers() is not called.
Steps to reproduce
Run the above python script and download any file.
Your environment
Ubuntu 16.04 x64
aiohttp 1.0.0