[PATCH] hgweb: add HEAD method

Alexander Solovyov piranha at piranha.org.ua
Tue Apr 14 03:00:45 CDT 2009


On Tue, Apr 14, 2009 at 12:42 AM, Brodie Rao <dackze at gmail.com> wrote:
> On Apr 13, 2009, at 4:54 PM, Alexander Solovyov wrote:
>
>> On Mon, Apr 13, 2009 at 11:51 PM, Greg Ward <greg-hg at gerg.ca> wrote:
>>>
>>> But... ummm... doesn't that make hgweb issue a response with a body,
>>> which is exactly what HEAD is not supposed to do?  Or does the
>>> framework that imposes the do_{GET,HEAD,POST} convention take care of
>>> that by not sending the body?
>>
>> Looks like, at least "curl -I http://localhost:8000/" (that's big i)
>> displays only headers.
>
> It does look like it would send the entire response body.
>
> Also, shouldn't there also be changes to the WSGI applications themselves?
> hgweb/hgwebdir still wouldn't respond to HEAD under CGI or WSGI, only the
> server started by hg serve would.

You're right, I was too inattentive. :\ I'll prepare better patch.

-- 
Alexander



More information about the Mercurial-devel mailing list