[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Content-Length in HEAD responses

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: Sat, 10 Nov 2012 06:49:38 -0500

On Fri, Nov 9, 2012 at 11:37 PM, Branko Čibej <brane_at_wandisco.com> wrote:

> That would imply that, if content-length doesn't get set on a HEAD
> response, but Transfer-Encoding: chunked does, then everything is
> correct, right? If somewhat inefficient.
>

The chunked header is only sent on non-HEAD responses. r->chunked is set
as a side-effect in a conditional in httpd and that conditional gets
short-circuited earlier if we are a HEAD request.

BTW, if I do:

% curl --head
https://svn.apache.org/repos/asf/subversion/trunk/subversion/mod_dav_svn/repos.c
HTTP/1.1 200 OK
Date: Sat, 10 Nov 2012 11:48:26 GMT
Server: Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/1.0.0c DAV/2
mod_wsgi/3.1 Python/2.6.6 SVN/1.7.0
Last-Modified: Fri, 19 Oct 2012 14:11:49 GMT
ETag: "1400104//subversion/trunk/subversion/mod_dav_svn/repos.c"
Accept-Ranges: bytes
Content-Length: 157969
Vary: Accept-Encoding
Content-Type: text/plain; charset=ISO-8859-1

There is a C-L header...so, I don't know what the original poster is
seeing, but we're already doing the right thing... -- justin
Received on 2012-11-10 12:50:15 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.