Issue 653: This time for sure!
authorNathan Yergler <nathan@yergler.net>
Sun, 13 Nov 2011 20:07:09 +0000 (12:07 -0800)
committerNathan Yergler <nathan@yergler.net>
Sun, 13 Nov 2011 20:07:09 +0000 (12:07 -0800)
mediagoblin/middleware/csrf.py

index d0601af89e92ac26cea297aead7b6bcc7685734a..8275c18ee88d3c8055d5e44ec3591e5e10ef4680 100644 (file)
@@ -98,7 +98,7 @@ class CsrfMiddleware(object):
             httponly=True)
 
         # update the Vary header
-        response.vary = (getattr(response, 'vary') or []) + ['Cookie']
+        response.vary = (getattr(response, 'vary', None) or []) + ['Cookie']
 
     def _make_token(self, request):
         """Generate a new token to use for CSRF protection."""