Re: "ack" in CVS

On Wed, 2006-04-12 at 16:22 +0900, Olivier Thereaux wrote:
> Hi Ville,

Hello,

> On Tue, Apr 11, 2006, Ville Skytt? wrote:
> > As discussed yesterday, I've imported "ack" to CVS, /2006/ack,
> > http://dev.w3.org/cvsweb/2006/ack/ .  The copy at
> > http://qa-dev.w3.org/~ville/ack/ is auto-updated from CVS hourly, feel
> > free to hack and commit if you're interested.
> 
> As promised, I gave it a look, in particular I looked at the bug that
> made it fail with Safari.

Thanks.

>  I eventually found that Safari did not like
> the Content-Length: of 0, and would set all properties of the req object
> (except readyState) as undefined if the Content-Length is == 0. 
> 
> responseText I could understand, but setting status and
> getAllResponseHeaders() as undefined, especially for a HEAD request,
> sounds... wrong.

Agreed.

> The following seems to make everyone happy, anyway:
[...]
> -print "Content-Length: 0\n\n";
> +print "Content-Length: 1\n\n0";

Hm, ok, but from the pedant POV, responses to HEAD requests must not
contain an entity body per the HTTP spec.  One thing to try could be to
return "204 No Content" but I guess that requires making the script a
NPH one and I have no experience with that, and I'm having doubts if it
would be handled any better.

How about omitting Content-Length altogether, ie. replacing the last
line of grab.pl by a simple 'print "\n";' ?

Received on Wednesday, 12 April 2006 18:52:17 UTC