You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/04/03 05:26:33 UTC

DO NOT REPLY [Bug 42027] New: - FileETag directive appears to be ignored

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42027

           Summary: FileETag directive appears to be ignored
           Product: Apache httpd-2
           Version: 2.2.4
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: apachebugreporter@mailinator.com


I am trying to control ETag generation. According to the docs, the FileETag
directive should work inside a .htaccess with the FileInfo override.

Here is my directory block in httpd.conf:

<Directory "/home/me/public_html">
        AllowOverride All
        Options All

        order deny,allow
        allow from all
</Directory>

My .htaccess in /home/me/public_html/i/.htaccess contains the following:
FileETag None

Yet, a GET request for foo.com/i/bar.jpg still returns an ETag seemingly
comprised of all the available information (INode, MTime, Size).

I tried also placing the FileETag None in the <Directory> block, thinking
perhaps the documentation was incorrect and I had the same result. httpd was
restarted in between all changes. No errors were logged in the error_log
(loglevel warn).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 42027] - FileETag directive appears to be ignored

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42027





------- Additional Comments From rici@ricilake.net  2007-07-31 21:14 -------
I put some thoughts about refactoring options parsing at:

http://segundo.ricilake.net/options.txt

Maybe they're useful. I was trying to not be too clever, be explicit
in invariants, and get the semantics reasonable (while allowing
AP_INIT_ITERATE argument parsing). The semantics are not quite
the same as current httpd: for one thing, it throws errors on certain
constructions (Options +Foo -Bar Glitch) and for another thing it
allows you to split up absolute options over various Options directives
in the same block, so that:

  Options Foo
  Options Bar

(in one block) is the same as:

  Options Foo Bar

I'm not sure whether those are plausible changes, but it seems like it would
be useful to have a single library which did httpd-options style handling in
a consistent way.

By the way, the current FileETags error can be reproduced if you have
  Options -Indexes
in a block which is merged with a block containing:
  FileETag None
(because OPT_INDEXES is the same value as ETAG_NONE). So, for example, putting
the 'FileETag None' directive in a vhost, and the 'Options -Indexes' directive
in a <Directory> section will probably trigger the error when the directory
and the vhost are merged.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 42027] - FileETag directive appears to be ignored

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42027





------- Additional Comments From apachebugreporter@mailinator.com  2007-04-03 13:00 -------
The problem persists after applying the patch mentioned.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 42027] - FileETag directive appears to be ignored

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42027





------- Additional Comments From rici@ricilake.net  2007-07-31 16:27 -------
Ruediger,

I don't think that patch completely eliminates the bug.

Consider the following:

<directory /a>
FileETag None
</directory>
<directory /a/b>
FileETag +mtime
</directory>
<directory /a/b/c>
FileETag -mtime
</directory>

You might expect files in /a/b/c to have no etags. However, with a stock 2.2.4,
they end up with mtime+inode+size, and with the patch they end up with inode+size.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 42027] - FileETag directive appears to be ignored

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42027


nick@webthing.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From nick@webthing.com  2007-04-03 02:33 -------
This is probably a manifestation of PR#41829.  Can you apply the (one-line)
patch and see if it goes away?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 42027] - FileETag directive appears to be ignored

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42027





------- Additional Comments From rpluem@apache.org  2007-07-31 12:59 -------
While I was not able to reproduce the original issue I agree that the FileETag
configuration contains a bug. Parts of it are fixed by Rici's proposal, but
there is also another issue. Could you please give the attached patch (against
trunk, but works also against 2.2.x) a try and report back?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 42027] - FileETag directive appears to be ignored

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42027





------- Additional Comments From rpluem@apache.org  2007-07-31 13:00 -------
Created an attachment (id=20575)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=20575&action=view)
Patch against trunk


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 42027] - FileETag directive appears to be ignored

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42027





------- Additional Comments From rici@ricilake.net  2007-07-31 11:32 -------
I believe this is a copy&paste error at line 392 of server/core.c (in trunk,
line 420 in 2.2.4):
391 : conf->etag_remove =
392 :   	(conf->opts_remove & (~ new->etag_add)) | new->etag_remove;

line 392 should read:

392 :   	(conf->etag_remove & (~ new->etag_add)) | new->etag_remove;

In addition, I believe there is an error in the parsing of FileETag, at:

1599 :  if ((cfg->etag_bits & ETAG_NONE) != ETAG_NONE) {
1600 :  	cfg->etag_bits &= (~ ETAG_NONE);

That's a no-op; I think line 1599 should read:

1599 :  if (cfg->etag_bits != ETAG_NONE) {

However, the correction of cfg->etag_bits at in the merge (line 402/403) should
mask the effects of this error in the majority of cases.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 42027] - FileETag directive appears to be ignored

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42027





------- Additional Comments From rpluem@apache.org  2007-08-05 05:56 -------
I fixed at least the copy and paste error (opts_remove vs etag_remove) in trunk
as r562860 (http://svn.apache.org/viewcvs.cgi?rev=562860&view=rev) and proposed
it for backport to 2.2.x r562862
(http://svn.apache.org/viewcvs.cgi?rev=562862&view=rev). Solving the other
issues requires for time and thoughts.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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