Skip to content

Commit

Permalink
'request.logger' > 'request.app.logger' in StaticFileMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed May 2, 2016
1 parent 63cf125 commit c9b7169
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aiohttp/web_urldispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def handle(self, request):
raise HTTPNotFound() from error
except Exception as error:
# perm error or other kind!
request.logger.exception(error)
request.app.logger.exception(error)
raise HTTPNotFound() from error

st = filepath.stat()
Expand Down
4 changes: 4 additions & 0 deletions tests/test_web_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,10 @@ def go(dirname, filename):
self.assertEqual(404, resp.status)
resp.close()

resp = yield from request('GET', url + 'x' * 500, loop=self.loop)
self.assertEqual(404, resp.status)
resp.close()

resp = yield from request('GET', url + '/../../', loop=self.loop)
self.assertEqual(404, resp.status)
resp.close()
Expand Down

0 comments on commit c9b7169

Please sign in to comment.