httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 7rai...@inbox.lv
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/mod_expires.so<br />
LoadModule headers_module modules/mod_headers.so<br />
...</div>

<div id="eml-cke__signature_top" title="Paraksts">
<div class="eml-cke__signature" id="eml-cke__signature_top-wrap" title="">&nbsp;</div>
</div>
<style type="text/css">/*<![CDATA[*/
 blockquote.c1 {border-left: 1px solid #cccccc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex}
/*]]>*/
</style>
<br />
Binyamin<br />
&nbsp;
<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="mailto:covener@gmail.com">&lt;covener@gmail.com&gt;</a><br
/>
<b>To:</b> <a href="mailto:users@httpd.apache.org">&lt;users@httpd.apache.org&gt;</a></div>

<blockquote class="c1">On Tue, Dec 27, 2016 at 10:29 PM, Yehuda Katz &lt;yehuda@ymkatz.net&gt;
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: users-unsubscribe@httpd.apache.org<br />
For additional commands, e-mail: users-help@httpd.apache.org<br />
&nbsp;</blockquote>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message