Possible bug: fetch external DTD; Validator does not send Host: HTTP-header

Hiya.

I was trying to validate a document with a foreign DOCTYPE - the first
lines of the file was:

<?xml version="1.0"?>
 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" 
"http://www.wapforum.org/DTD/wml_1.1.xml">

The validator appearently tried to fetch the doctype-specification, but:

"http://www.wapforum.org/DTD/wml_1.1.xml">
 ^
Error: could not get "/DTD/wml_1.1.xml" from "www.wapforum.org" (reason
given was "Host Header Required")

... and causing trouble for the rest of the validation.

It looks like the routine to get an external document is using an old
implementation of HTTP, not sending the "Host:"-HTTP-header:

Host: www.wapforum.org

If the webserver, containing the doctype-specification, are running
virtual hosts (multiple hosts at the same IP-address), it can't know
what host, the requested file is placed on, causing the request to fail.

Due the wide usage of virtual hosts, I believe that the validator should
also support sending the Host:-header

Just my 0.02$ worth. Merry christmas! :-)

-- 
- Peter Brodersen
  Professional nerd

Received on Tuesday, 21 December 1999 15:29:08 UTC