- From: Martin Duerst <duerst@w3.org>
- Date: Fri, 25 Oct 2002 17:17:32 +0900
- To: Chris Lilley <chris@w3.org>, Ville Skytt(wrong string) g <ville.skytta@iki.fi>
- Cc: Terje Bless <link@pobox.com>, W3C Validator <www-validator@w3.org>
Hello Chris, Many thanks for your bug report and follow up. At 16:39 02/10/24 +0200, Chris Lilley wrote: >On Wednesday, October 23, 2002, 6:42:10 PM, Ville wrote: > >VS> On Wed, 2002-10-23 at 16:46, Chris Lilley wrote: > > >> TB> However, it may be that the weak support for file uploads in current > >> TB> browsers justifies special rules for files submitted via file upload. > >> > >> Possibly. I would rather know more about what headers are currently > >> send in a file upload before arguing either for or against special > >> rules. > >VS> I'm inclined to say yes for special rules (if those can be made); after >VS> all, the purpose of the validator is to validate the submitted file, not >VS> test the browser used for submitting it. I agree. The current message is confusing for somebody using file upload. There is probably a better way to explain what happens. >Of course, the (in)sanity of >VS> the browser may affect the validation to some extent, and a notice about >VS> this would be nice. > >OK, true. Yes. Maybe we should try in general to give a bit different messages for uploaded files, in particular if somebody uses the overrides. >Further testing (thanks, Terje!) has revealed that: > >Mozilla sends the correct MIME type of image/svg+xml when uploading an >SVG file Just to be sure, can you confirm that the file then validated correctly? >MS IE 6 sends an incorrect, sniffed MIME type of text/xml when >uploading the same file presumably because it sees the xml declaration. >I have not tried the exhaustive tests (removal of xml declaration, >inclusion of the string '<html' or ',HTML' in the first 256 bytes, >perhaps inside a comment) etc to try and describe the sniffing >algorithm correctly. The error message you got should only appear for text/xml and the text/foo+xml types, not for text/html. >One workaround would be to look at the filename of the uploaded file >and then treat this as the validator server would treat such a named >file if it were serving it .... I would be willing to close an eye or two for stuff sent in, and e.g. for file upload ignore the strong us-ascii default or so (which as far as I understand would mean that even with text/xml, the file would then be validated using the DTD it gives,...), but I'd rather not go into the business of sniffing on the server side. Regards, Martin.
Received on Friday, 25 October 2002 04:24:48 UTC