I'm seeing a problem with mod_headers and mod_wsgi where it seems that
mod_headers does not see the response headers generated by mod_wsgi. (Looks
like a duplicate of
http://stackoverflow.com/questions/7172630/headers-added-in-mod-wsgi-not-properly-recognized-by-apache
but thought I'd post here in case anyone knew of a resolution.)
My use case: I have a Pyramid app which records various timings which it
then sets as the X-Stats response header. I then want to insert the Apache
request time into that header using ``Header edit``, but it appears that
Apache does not see the Python originated X-Stats header and leaves the
X-Stats header unedited. To confirm this when I use ``Header append X-Stats
"%D"`` I see a second X-Stats response header line with the duration value
rather than a single header with the new value appended with a separating
comma.
Versions: self-compiled mod_wsgi 3.4 running under Apache 2.2.15 on CentOS.
Config:
WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess encoded user=encoded group=encoded processes=8 threads=1
WSGIImportScript /.../wsgi process-group=encoded application-group=%{GLOBAL}
WSGIScriptAlias / /.../wsgi
<Directory /...>
WSGIProcessGroup encoded
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
Header edit X-Stats ^ "%D&"
Order deny,allow
Allow from all
</Directory>
Example response headers with append instead of edit:
X-Stats:
db_count=2&db_time=10138&es_count=1&es_time=14927&queue_begin=1380077896713622&queue_time=2312&wsgi_begin=1380077896715934&wsgi_end=1380077896818668&wsgi_time=102734
X-Stats: D=105536
Thinking this through again while writing the post, I suppose %D is not
terribly interesting at header generation time as it can only include the
transfer time when logged.
Laurence
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/groups/opt_out.