Re: "ack" in CVS

Hi Ville,

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. 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.

The following seems to make everyone happy, anyway:

Index: grab.pl
===================================================================
RCS file: /sources/public/2006/ack/grab.pl,v
retrieving revision 1.2
diff -u -r1.2 grab.pl
--- grab.pl     11 Apr 2006 19:34:27 -0000      1.2
+++ grab.pl     12 Apr 2006 07:17:27 -0000
@@ -54,4 +54,4 @@
 print "X-LinkCheck-Status: ", CGI::escapeHTML($res->code()), "\n";
 print "X-LinkCheck-Message: ", CGI::escapeHTML($res->status_line()), "\n";
 print "X-LinkCheck-Redirect: ", CGI::escapeHTML($redirect), "\n" if $redirect;
-print "Content-Length: 0\n\n";
+print "Content-Length: 1\n\n0";


-- 
olivier

Received on Wednesday, 12 April 2006 07:22:54 UTC