You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tim Philips <ti...@rndgroup.co.nz> on 2007/02/18 01:28:22 UTC

[users@httpd] ETags not included in Response-Headers:

Hi All,

I been requested to enable ETags for a customer on their Apache httpd
server (Version 2.0.52-28.ent.centos4) on CentOS 4.4 from RPM.

After researching the correct directive (FileETag) from the Apache core
documentation and several FAQ's I added:

FileETag MTime Size

To the main Apache configuration file in the server config.  After
reloading Apache (even stopping and starting) I don't see the suggested
ETAG header in the Response-Headers to the client.

I have tested the FileETag with INode as well without success. After
having no luck in the server config I added the directive to the
respective VirtualHost entry without luck (also tried .htaccess without
luck).  There are no errors in the ErrorLog for the server or virtual
host indicating any problem using the FileETag directive. Along with
different options in the Apache configuration file I have attempted to
enable FileETag on a totally different installation of CentOS 4.4 and
have tried several different browsers (as well as telnetting directly to
the Apache server) and still don't see the ETAG in the Response-Headers.

My research has indicated that once FileETag is enabled it should
automagically generate the ETAG based on the specified criteria and be
visible in the Response-Headers so either I have totally missed the boat
or my understanding of its usage is incorrect.

Look forward to anyone who could point me in the right direction.

Cheers.

-- 


Thanks
Tim Philips
RND GROUP LIMITED


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ETags not included in Response-Headers:

Posted by Joshua Slive <jo...@slive.ca>.
On 2/17/07, Tim Philips <ti...@rndgroup.co.nz> wrote:

> > So why aren't you seeing them?  Etags will only be generated by apache
> > for content served by the default handler that is not modified by
> > filters (such as mod_include).  So it will only work for static files,
> > and only if they aren't processed by other filters.
>
> I presume this includes mod_rewrite and friends?  I wasn't even seeing
> any ETAG's generated for a default index.html page (but I suspect there
> was mod_rewrite activity going on at a lower level).

No, mod_rewrite should not, in general, affect this unless you are
doing something fancy.  I'd look for other modules getting involved.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ETags not included in Response-Headers:

Posted by Tim Philips <ti...@rndgroup.co.nz>.
Joshua Slive wrote:

Hi Joshua,

> In fact, FileETag is not necessary unless you want to restrict the
> data used to calculate an etag.  Etags are generated automatically and
> by default.
> 
> So why aren't you seeing them?  Etags will only be generated by apache
> for content served by the default handler that is not modified by
> filters (such as mod_include).  So it will only work for static files,
> and only if they aren't processed by other filters.

I presume this includes mod_rewrite and friends?  I wasn't even seeing
any ETAG's generated for a default index.html page (but I suspect there
was mod_rewrite activity going on at a lower level).

> (It is, of course, possible to have etags for dynamically generated
> content.  But it is the responsibility of the content generator to
> prepare them in that case.  It can't be done automatically.)

For sure.

-- 


Thanks
Tim Philips (RHCE)
RND GROUP LIMITED


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ETags not included in Response-Headers:

Posted by Joshua Slive <jo...@slive.ca>.
On 2/17/07, Tim Philips <ti...@rndgroup.co.nz> wrote:

> My research has indicated that once FileETag is enabled it should
> automagically generate the ETAG based on the specified criteria and be
> visible in the Response-Headers so either I have totally missed the boat
> or my understanding of its usage is incorrect.

In fact, FileETag is not necessary unless you want to restrict the
data used to calculate an etag.  Etags are generated automatically and
by default.

So why aren't you seeing them?  Etags will only be generated by apache
for content served by the default handler that is not modified by
filters (such as mod_include).  So it will only work for static files,
and only if they aren't processed by other filters.

(It is, of course, possible to have etags for dynamically generated
content.  But it is the responsibility of the content generator to
prepare them in that case.  It can't be done automatically.)

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org