httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [users@httpd] Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?
Date Thu, 02 Mar 2017 11:03:15 GMT
<html><div id="eml-cke__body" title="">Eric, it is not the case. Here is the order
of my loaded modules and the issue still happens (is relevant also for latest Apache version):<br
...<br />
LoadModule expires_module modules/<br />
LoadModule headers_module modules/<br />

<div id="eml-cke__signature_top" title="Paraksts">
<div class="eml-cke__signature" id="eml-cke__signature_top-wrap" title="">&nbsp;</div>
<style type="text/css">/*<![CDATA[*/
 blockquote.c1 {border-left: 1px solid #cccccc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex}
<br />
Binyamin<br />
<div>----- Reply to message -----<br />
<b>Subject:</b> Re: [users@httpd] Why ExpiresByType is ignored when has SetHandler
application/x-httpd-php ?<br />
<b>Date:</b> tre&scaron;diena, 2016. gada 28. decembris 13:20:25<br />
<b>From:</b> Eric Covener <a href="">&lt;;</a><br
<b>To:</b> <a href="">&lt;;</a></div>

<blockquote class="c1">On Tue, Dec 27, 2016 at 10:29 PM, Yehuda Katz &lt;;
wrote:<br />
&gt; Why ExpiresByType is ignored when has SetHandler application/x-httpd-php ?<br
&gt;<br />
&gt; /sitemap.xml Response Headers shows 1 day expiration while expected to be 1<br
&gt; year (1 month)<br />
&gt;<br />
&gt; Content-Type: application/xml; charset=utf-8<br />
&gt; Date: Tue, 27 Dec 2016 19:59:00 GMT<br />
&gt; Expires: Wed, 28 Dec 2016 19:59:00 GMT<br />
&gt;<br />
&gt; seems SetHandler forces it to apply text/html expiration and doesn&#39;t allow<br
&gt; to rewrite it<br />
&gt;<br />
&gt; ExpiresActive On<br />
&gt; ExpiresDefault &quot;access plus 1 month&quot;<br />
&gt; ExpiresByType text/html &quot;access plus 1 day&quot;<br />
&gt; ExpiresByType application/xml &quot;access plus 1 week&quot;<br />
&gt;<br />
&gt; &lt;FilesMatch ^sitemap\.xml$&gt;<br />
&gt; SetHandler application/x-httpd-php<br />
&gt; Header set Content-Type &quot;application/xml&quot;<br />
&gt; ExpiresDefault &quot;access plus 1 year&quot;<br />
&gt; &lt;/FilesMatch&gt;<br />
<br />
It&#39;s likely just an ordering problem. mod_expires runs before<br />
mod_headers and you can&#39;t really change it any meaningful way in this<br />
case (you can ask mod_headers to run much earlier, but then your<br />
scripts output will overwrite it anyway)<br />
<br />
Presumably your script issues Content-Type: text/html which is bogus<br />
and what&#39;s seen when mod_expires runs. A short while later,<br />
mod_headers changes the content-type.<br />
<br />
---------------------------------------------------------------------<br />
To unsubscribe, e-mail:<br />
For additional commands, e-mail:<br />

<div id="eml-cke__signature_bottom" title="Paraksts">&nbsp;</div>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message