Skip to content

Commit

Permalink
xsrf fix, +request log
Browse files Browse the repository at this point in the history
  • Loading branch information
fiorix committed Jan 18, 2013
1 parent 6d7fb77 commit 8ff1799
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cyclone/web.py
Expand Up @@ -1058,7 +1058,7 @@ def _execute(self, transforms, *args, **kwargs):
# If XSRF cookies are turned on, reject form submissions without
# the proper cookie
if self.request.method not in ("GET", "HEAD", "OPTIONS") and \
"xsrf_cookies" in self.application.settings:
self.application.settings.get("xsrf_cookies"): # is True
if not getattr(self, "no_xsrf", False):
self.check_xsrf_cookie()
defer.maybeDeferred(self.prepare).addCallbacks(
Expand Down Expand Up @@ -1482,8 +1482,8 @@ def log_request(self, handler):
return

request_time = 1000.0 * handler.request.request_time()
log.msg("%d %s %.2fms" % (handler.get_status(),
handler._request_summary(), request_time))
log.msg("[%s] %d %s %.2fms" % (handler.request.protocol or "-",
handler.get_status(), handler._request_summary(), request_time))


class HTTPError(Exception):
Expand Down

0 comments on commit 8ff1799

Please sign in to comment.