You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/10/01 23:39:48 UTC
Re: C-L issues in 2.1
Geoffrey Young wrote:
> hi all...
>
> ok, I've had the chance to look at t/apache/content_length_header.t and I
> _think_ I understand what the issues are.
>
> it all seems to come back to this change:
>
> http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/protocol.c?r1=1.150&r2=1.151
>
> it looks as though this single change affected 2.1 in that GET and HEAD
> requests can now be expected to behave exactly the same wrt the C-L header.
> at least this is what our tests show - in 2.1 there is no difference at all
> between the C-L header that GET and HEAD produce. overall a good thing, I'd
> think.
>
> the only thing that makes me uneasy is that, as illustrated by our tests,
> calling ap_set_content_length on a HEAD request, even when no bytes are
> sent, results in a set C-L header. while I think this is the proper
> behavior, from the comments and the above patch it would seem that this was
> _not_ intended. does r->bytes_sent include headers themselves? if so, then
> it seems the logic in the above patch is wrong - I think he means to count
> the body?
so it's not proper then, try asking at httpd-dev? May be httpd-test should
include tests for this case too?
> anyway, the attached patch passes for me on 2.0.52 and current 2.1.
> discussion welcome.
Geoff, can you please update the documentation?
http://perl.apache.org/docs/2.0/user/handlers/http.html#C_Content_Length__Response_Header
Thanks.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org