validator/httpd/cgi-bin check,1.384,1.385

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv21113/httpd/cgi-bin

Modified Files:
	check 
Log Message:
Add warning when MSIE XP SP2 is getting a fatal error on text/plain upload.


Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.384
retrieving revision 1.385
diff -u -d -r1.384 -r1.385
--- check	4 Feb 2005 19:44:42 -0000	1.384
+++ check	4 Feb 2005 21:01:54 -0000	1.385
@@ -1434,9 +1434,26 @@
           . uri_escape $url;
       exit;
     } else {
+      my $msie = '';
       $File->{'Error Flagged'} = TRUE;
+      if ($File->{'Is Upload'} and $ct eq 'text/plain'
+          and $q->http('User-Agent') eq 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)') {
+        $msie = <<".EOF.";
+
+      <p id="msie">
+        <strong>Note:</strong>
+        a bug in the version of Microsoft's Internet Explorer that comes with
+        Windows XP's Service Pack 2 causes it to mislabel uploaded files as
+        "<code>text/plain</code>". If this is the browser you are using you
+        can work around this problem by using a different browser &mdash;
+        such as <a href="http://getfirefox.com/">Firefox</a> &mdash; for
+        validating uploaded files; or by publishing the page in question
+        and validating it by URL instead.
+      </p>
+.EOF.
+      }
       $File->{'Error Message'} = sprintf(<<"      EOF", &ent($ct));
-    <div class="error">
+    <div class="error">$msie
       <p>
         Sorry, I am unable to validate this document because its content type
         is <code>%s</code>, which is not currently supported by this service.

Received on Friday, 4 February 2005 21:01:57 UTC