devashishbcsingh / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Headers added in mod_wsgi not properly recognized by Apache? #244

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi everyone, I've searched for this issue but haven't found any trace yet. I'm 
not sure this is a modwsgi issue, don't hesitate to correct me :)

I have a django application using the SessionMiddleware running in daemon mode 
with Apache. My Apache configuration also contains a standard mod_deflate 
config and mod_cache/mod_disk_cache for performance.

My problem is that the Vary: Cookie set by django's SessionMiddleware isn't 
being recognized correctly by mod_cache, which is serving cached versions of 
pages although the request cookies are different. Removing mod_deflate fixes 
the problem. Setting Vary: Cookie in *Apache* (regardless of the django 
middleware) also fixes the problem (this is my temporary workaround).

I have noticed, while playing around with this, that there seem to be cases 
where headers set inside the mod_wsgi app aren't properly recognized by some 
Apache modules that come afterwards, does this mean anything to anyone?

I've got very standard wsgi (attached) and Apache configs, let me know if any 
other data can help. I'm running stock ubuntu natty libapache2-mod-wsgi 
3.3-2ubuntu2, Apache 2.2.17, django 1.3

Thanks, Shay

Original issue reported on code.google.com by r...@roji.org on 23 Aug 2011 at 4:46

Attachments:

GoogleCodeExporter commented 8 years ago
Please repost the question on the mod_wsgi mailing as described in:

  http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Asking_Your_Questions

The issue tracker is not a suitable place for exploring problems using mod_wsgi.

Original comment by Graham.Dumpleton@gmail.com on 23 Aug 2011 at 9:20

GoogleCodeExporter commented 8 years ago
The issue here was that there was a mod_wsgi daemon mode bug where headers were 
associated with err_headers_out. This meant one needed to use the 'always' 
condition with Header directive rather than default of onsuccess.

Is finally fixed in mod_wsgi 4.3.3.

https://github.com/GrahamDumpleton/mod_wsgi/issues/5

Original comment by Graham.Dumpleton@gmail.com on 12 Nov 2014 at 10:16