You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Igor Galić <i....@brainsware.org> on 2011/10/10 00:15:18 UTC

FileETag default

Hi folks,

i was just browsing through the dev@ list, stumbling over
this thread
 http://mail-archives.apache.org/mod_mbox/httpd-dev/201110.mbox/%3c4E8DE6B0.6090106@thelounge.net%3e

It reminded me of the terrible Default that FileETag has,
when I remembered that the power to change terrible defaults
is right at my hands!

I would like to propose to change the default for trunk's
FileEtag from

  FileETag INode MTime Size

to

  FileETag MTime Size


So long,

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 571B 8B8A FC97 266D BDA3  EF6F 43AD 80A4 5779 3257

Re: FileETag default

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Monday 10 October 2011, Igor Galić wrote:
> Hi folks,
> 
> i was just browsing through the dev@ list, stumbling over
> this thread
>  http://mail-archives.apache.org/mod_mbox/httpd-dev/201110.mbox/%3c
> 4E8DE6B0.6090106@thelounge.net%3e
> 
> It reminded me of the terrible Default that FileETag has,
> when I remembered that the power to change terrible defaults
> is right at my hands!
> 
> I would like to propose to change the default for trunk's
> FileEtag from
> 
>   FileETag INode MTime Size
> 
> to
> 
>   FileETag MTime Size
> 

+1

See also http://mail-archives.apache.org/mod_mbox/httpd-
dev/201109.mbox/%3CE563FB5AB3F02844AC749BA39E494AB4053BC518@VF-
MBX11.internal.vodafone.com%3E

Re: FileETag default

Posted by Ruediger Pluem <rp...@apache.org>.

On 10/11/2011 12:04 AM, Graham Leggett wrote:
> On 10 Oct 2011, at 5:11 PM, Igor Galić wrote:
> 
>> So I went ahead and tried to hack it, when I stumbled over this:
>>
>>
>>    <note type="warning"><title>Warning</title>
>>    Do not change the default for directories or locations that have
>> WebDAV
>>    enabled and use <module>mod_dav_fs</module> as a storage provider.
>>    <module>mod_dav_fs</module> uses
>> <code>INode&nbsp;MTime&nbsp;Size</code>
>>    as a fixed format for <code>ETag</code> comparisons on conditional
>> requests.
>>    These conditional requests will break if the <code>ETag</code>
>> format is
>>    changed via <directive>FileETag</directive>.
>>    </note>
>>
>> Well, duh.
> 
> That smells like a bug to me.
> 
> If webdav has a hard requirement on a "INode MTime Size" style ETag,
> then it should generate that ETag itself honouring it's own
> requirements. Telling the admin "I break when you try and fix ETags in
> your environment" isn't the way to approach webdav I think.

Please note that this is only about the filesystem provider for webdav not about
webdav itself. Other dav backend providers behave better. I think using
the current filesystem provider in a farm doesn't make sense anyway. So this
might be the reason why it is hardcoded. IMHO it should use the setting
from FileETag.

Regards

Rüdiger


Re: FileETag default

Posted by Graham Leggett <mi...@sharp.fm>.
On 10 Oct 2011, at 5:11 PM, Igor Galić wrote:

> So I went ahead and tried to hack it, when I stumbled over this:
>
>
>    <note type="warning"><title>Warning</title>
>    Do not change the default for directories or locations that have  
> WebDAV
>    enabled and use <module>mod_dav_fs</module> as a storage provider.
>    <module>mod_dav_fs</module> uses  
> <code>INode&nbsp;MTime&nbsp;Size</code>
>    as a fixed format for <code>ETag</code> comparisons on  
> conditional requests.
>    These conditional requests will break if the <code>ETag</code>  
> format is
>    changed via <directive>FileETag</directive>.
>    </note>
>
> Well, duh.

That smells like a bug to me.

If webdav has a hard requirement on a "INode MTime Size" style ETag,  
then it should generate that ETag itself honouring it's own  
requirements. Telling the admin "I break when you try and fix ETags in  
your environment" isn't the way to approach webdav I think.

Regards,
Graham
--


Re: FileETag default

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Monday 10 October 2011, Igor Galić wrote:
> So I went ahead and tried to hack it, when I stumbled over this:
> 
> 
>     <note type="warning"><title>Warning</title>
>     Do not change the default for directories or locations that
> have WebDAV enabled and use <module>mod_dav_fs</module> as a
> storage provider. <module>mod_dav_fs</module> uses
> <code>INode&nbsp;MTime&nbsp;Size</code> as a fixed format for
> <code>ETag</code> comparisons on conditional requests. These
> conditional requests will break if the <code>ETag</code> format is
> changed via <directive>FileETag</directive>.
>     </note>
> 
> Well, duh.

Then we should change the format in mod_dav_fs, too (it's in 
dav_fs_getetag() in repos.c). Or even better, make mod_dav_fs honor 
the FileETag setting, but that's not a requirement IMHO.

Re: FileETag default

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> On 10 Oct 2011, at 12:15 AM, Igor Galić wrote:
> 
> > i was just browsing through the dev@ list, stumbling over
> > this thread
> > http://mail-archives.apache.org/mod_mbox/httpd-dev/201110.mbox/%3c4E8DE6B0.6090106@thelounge.net%3e
> >
> > It reminded me of the terrible Default that FileETag has,
> > when I remembered that the power to change terrible defaults
> > is right at my hands!
> >
> > I would like to propose to change the default for trunk's
> > FileEtag from
> >
> >  FileETag INode MTime Size
> >
> > to
> >
> >  FileETag MTime Size
> 
> +1.
> 
> There is far too much mis-advice out there about turning off ETag
> support when you try and load balance servers, in the process
> increasing your load and wasting money. If we load balance safely out
> the box, it's ftw.

So I went ahead and tried to hack it, when I stumbled over this:


    <note type="warning"><title>Warning</title>
    Do not change the default for directories or locations that have WebDAV
    enabled and use <module>mod_dav_fs</module> as a storage provider.
    <module>mod_dav_fs</module> uses <code>INode&nbsp;MTime&nbsp;Size</code>
    as a fixed format for <code>ETag</code> comparisons on conditional requests.
    These conditional requests will break if the <code>ETag</code> format is
    changed via <directive>FileETag</directive>.
    </note>

Well, duh.


> Regards,
> Graham
> --
> 
> 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 571B 8B8A FC97 266D BDA3  EF6F 43AD 80A4 5779 3257

Re: FileETag default

Posted by Graham Leggett <mi...@sharp.fm>.
On 10 Oct 2011, at 12:15 AM, Igor Galić wrote:

> i was just browsing through the dev@ list, stumbling over
> this thread
> http://mail-archives.apache.org/mod_mbox/httpd-dev/201110.mbox/%3c4E8DE6B0.6090106@thelounge.net%3e
>
> It reminded me of the terrible Default that FileETag has,
> when I remembered that the power to change terrible defaults
> is right at my hands!
>
> I would like to propose to change the default for trunk's
> FileEtag from
>
>  FileETag INode MTime Size
>
> to
>
>  FileETag MTime Size

+1.

There is far too much mis-advice out there about turning off ETag  
support when you try and load balance servers, in the process  
increasing your load and wasting money. If we load balance safely out  
the box, it's ftw.

Regards,
Graham
--