projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0504cf
)
Issue 653: Don't throw exception if response has no vary header.
author
Nathan Yergler
<nathan@yergler.net>
Sun, 13 Nov 2011 19:41:43 +0000
(11:41 -0800)
committer
Nathan Yergler
<nathan@yergler.net>
Sun, 13 Nov 2011 19:41:43 +0000
(11:41 -0800)
mediagoblin/middleware/csrf.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/middleware/csrf.py
b/mediagoblin/middleware/csrf.py
index 7a5e352e8e88a808431a9d5cf6faf34cfea8101c..6c977f21a5e7c3a92988aa64ddcb2981eba4cf36 100644
(file)
--- a/
mediagoblin/middleware/csrf.py
+++ b/
mediagoblin/middleware/csrf.py
@@
-98,7
+98,7
@@
class CsrfMiddleware(object):
httponly=True)
# update the Vary header
- response.vary =
(response.vary or
[]) + ['Cookie']
+ response.vary =
getattr(response, 'vary',
[]) + ['Cookie']
def _make_token(self, request):
"""Generate a new token to use for CSRF protection."""