W3C home > Mailing lists > Public > www-validator@w3.org > January 2005

Re: Validator examining localhost instead of referrer

From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
Date: Sun, 23 Jan 2005 20:46:46 +1100
Message-ID: <41F37286.7000102@iinet.net.au>
To: Etan Wexler <ewexler@stickdog.com>
CC: Ron Falconberry <ronfalcon@comcast.net>, Validation Crew <www-validator@w3.org>

Etan Wexler wrote:
> Ron Falconberry wrote:
>> However, over the last couple of days, instead of displaying the HTML
>> page, it displays the “This Page is Valid XHTML 1.0 Strict!” even
>> though I have my page defined as HTML 4.01 transitional.  Why is it
>> telling me that the code is XHTML?
> "Note: The URL you gave me, <http://www.falconberry.com/>, returned a 
> redirect to <http://localhost/>."
> That explains the end result of the proclamation of valid XHTML...
> The question is why this happens. I was unable to provoke the alleged 
> redirection in the HTTP header served by your Apache installation.

The redirection appears to happen based on the User Agent string.  The 
validators User-Agent string is:
     W3C_Validator/1.305.2.148 libwww-perl/5.803

Using the following HTTP request headers (after altering Firefox's 
User-Agent string to match the validators), a 302 Found response is 
returned, redirecting me to http://localhost/


GET / HTTP/1.1
Host: www.falconberry.com
User-Agent: W3C_Validator/1.305.2.148 libwww-perl/5.803
Accept-Language: en-au,en-gb;q=0.8,en;q=0.5,en-us;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.x 302 Found
Date: Sun, 23 Jan 2005 09:15:33 GMT
Server: Apache/1.3.31 (Unix) mod_log_bytes/0.3 FrontPage/ 
PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.7d
Location: http://localhost/
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

After further investigation, it seems that the server is objecting to 
the presence of the string "libwww-perl" within the User-Agent request 
header.  The 302 response is returned if an exact match of that string 
is found regardless of any other content, or lack there of, within the 
User-Agent string.

I'm guessing that the server may be convigured to reject access by some 
bots, and it just happens the validator is an innocent victim.  Check 
the server configuration files if you have access or have your host's 
server administrator check for you.

Describe the problem to your host just as well as you did to us, and 
provide them with the validators User-Agent header and they should be 
able to fix the problem for you.

Lachlan Hunt
http://GetFirefox.com/    Rediscover the Web
http://SpreadFirefox.com/   Igniting the Web
Received on Sunday, 23 January 2005 11:21:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:44 UTC