>> yes, clearly there is a bug in there, but not where you think - what is
>> important is that apache needs to do the same thing on GET as HEAD,
>> not that
>> there is no C-L generated for contentless HEAD requests.  this patch more
>> accurately represents the real bug which, IIRC, httpd is already aware of
>> (at least I'm recalling discussion about a C-L of 0).
> 
> 
> Why do you say so? Your patch respresents a related, but a different
> issue. Boris has a problem with HEAD, and that's what the test was testing.

ok, maybe I was misunderstanding the discussion and subsequent test.  my
points are these:

  - apache has essentially full reign over the C-L header - it decides
whether it is required or not, regardless of whether or not you call
ap_set_content_length

  - more important than whether the C-L header shows up or not for a given
HEAD or GET request is whether apache is consistent with itself.  that is,
regardless of what _you_ think it should do, apache _knows_ what it should
do and should do it consistently between GET and HEAD.

  - of course, printing a C-L header to stdout works around all of this -
apache can only manage things when you use the official API, since it checks
the headers_out table and not the actual content.

so, the test, as it existed before, made me think that the problem you saw
was in that final test, that adding content magically made the C-L header
appear.  my point was that as long as apache does whatever it does
consistently between GET and HEAD it's not a bug.  but maybe I'm just not
seeing it, so if you guys grok all of that and still see an issue, let's
flesh it out.

> 
> But, certainly please commit it, rename the files to something different
> (content_length_header.t?) since it's not longer a HEAD request. And
> please add a comment explaining the bug, ideally with xref to a bugzilla
> for the bug you are talking about or discussion thread.

will do.

> also please move that no strict thing, inside the block, where it is
> needed. Thanks.
> 
>> +no strict qw(refs);
>> +foreach my $method qw(GET HEAD) {

d'oh!

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to