[web/cors] don't overwrite other Vary headers
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 29 Jul 2014 16:27:11 +0200
changeset 10002 586d0e527052
parent 10001 1245357b3b3e
child 10003 6bcb460826cc
[web/cors] don't overwrite other Vary headers Vary is a list of request headers, we shouldn't override others.
web/cors.py
--- a/web/cors.py	Tue Jul 15 16:07:59 2014 +0200
+++ b/web/cors.py	Tue Jul 29 16:27:11 2014 +0200
@@ -109,6 +109,6 @@
              '%s != %s' % (host, myhost))
         raise CORSFailed('Host header and hostname do not match')
     # include "Vary: Origin" header (see 6.4)
-    req.set_header('Vary', 'Origin')
+    req.headers_out.addHeader('Vary', 'Origin')
     return origin