The test URL http://download.moodle.org/unittest/test_redir.php?done=1 fails because it sends a bogus header:
302 Moved Temporarily
(Verified with Firefox developer tools.) It should be 302 Found (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.3).
I have had enough of seeing unit tests fail because of this. I am going to make it just check the first 4 chars of the string.