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

Re: Suggested change: Error message on attempt to Validate non-existing file

From: Ville Skyttä <ville.skytta@iki.fi>
Date: 10 Jan 2003 20:20:29 +0200
To: Tim Bonham <t-bonham@scc.net>
Cc: www-validator@w3.org
Message-Id: <1042222829.20852.224.camel@bobcat.ods.org>

On Fri, 2003-01-10 at 12:19, Tim Bonham wrote:

> On the very useful validation page http://validator.w3.org/,
> when the user wants to validate a local file like "c:\document.html", but 
> mistypes the name, for example as "C:\doucment.html",
> the resulting error message that is returned is inaccurate & irrelevant to 
> the error that has occured:
> 	"Sorry, I am unable to validate this document because its content type is 
> application/octet-stream, which is not currently supported by this service. "
> 
> I would suggest that this error be trapped, and a more specific error 
> message returned, such as:
> 	"Sorry, I am unable to find that document".
> 
> This happens even for file names which are correctly found by common 
> browsers, such as IE, Netscape, & Mozilla, such as using "/" instead of "\" 
> in the file name.

Common browsers need to be fixed.  On erroneous file names, they send
the file upload part as application/octet-stream, with empty content. 
It's hard to "trap" this, or to know exactly what happened, see below
for a sample part of a multipart/form-data (ie. a file upload) request
to the validator with a bad file name (using Mozilla).

In addition to the error about application/octet-stream, Validator could
check if the uploaded file is empty, and include that in the message.

-----------------------------3639870123395661091505687794
Content-Disposition: form-data; name="uploaded_file"; filename="bar"
Content-Type: application/octet-stream


-----------------------------3639870123395661091505687794--

-- 
\/ille Skyttä
ville.skytta at iki.fi
Received on Friday, 10 January 2003 13:20:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:05 GMT