Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions aiohttp/hdrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
METH_POST = upstr('POST')
METH_PUT = upstr('PUT')
METH_TRACE = upstr('TRACE')
METH_PURGE = upstr('PURGE')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like unrelated change. PURGE is used for Varnish needs, but what's it purpose for aiohttp?


ACCEPT = upstr('ACCEPT')
ACCEPT_CHARSET = upstr('ACCEPT-CHARSET')
Expand Down
6 changes: 5 additions & 1 deletion aiohttp/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ def handle_request(self, message, payload):
"got {!r} [middlewares {!r}]").format(
match_info.handler, type(resp), self._middlewares)
except HTTPException as exc:
resp = exc
route = self._router.get_system_route(exc.status_code)
try:
resp = yield from route.handler(request, exc)
except:
resp = exc

resp_msg = resp.start(request)
yield from resp.write_eof()
Expand Down
Loading