Skip to content

Commit

Permalink
Merge pull request #856 from samuelcolvin/static-file-error-fix
Browse files Browse the repository at this point in the history
'request.logger' > 'request.app.logger' in StaticFileMixin
  • Loading branch information
asvetlov committed Jun 2, 2016
2 parents b696364 + c9b7169 commit 3664464
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 3664464

Please sign in to comment.