validator/httpd/cgi-bin check,1.432.2.2,1.432.2.3

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

Modified Files:
      Tag: validator-0_7-branch
	check 
Log Message:
fixes the "no character encoding found"
warning when validating via direct input
http://www.w3.org/Bugs/Public/show_bug.cgi?id=1833



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.432.2.2
retrieving revision 1.432.2.3
diff -u -d -r1.432.2.2 -r1.432.2.3
--- check	20 Aug 2005 10:58:32 -0000	1.432.2.2
+++ check	21 Sep 2005 08:47:26 -0000	1.432.2.3
@@ -1059,6 +1059,7 @@
   $File->{Size}            = scalar $res->content_length;
   $File->{URI}             = scalar $res->request->uri->canonical;
   $File->{'Is Upload'}     = FALSE;
+  $File->{'Direct Input'}  = FALSE;
 
   return $File;
 }
@@ -1089,6 +1090,7 @@
                                    # to return false later in add_table.  This
                                    # is also a file handle... see man CGI.
   $File->{'Is Upload'}     = TRUE;
+  $File->{'Direct Input'}  = FALSE;
 
   return $File;
 }
@@ -1101,12 +1103,15 @@
 
   $File->{Bytes}       = $q->param('fragment');
   $File->{Mode}        = MODE_TBD;
+  $File->{Charset}->{HTTP} = "utf-8";
   $File->{Modified}    = '';
   $File->{Server}      = '';
   $File->{Size}        = '';
   $File->{ContentType} = ''; # @@TODO?
   $File->{URI}         = 'upload://Form Submission';
   $File->{'Is Upload'} = TRUE;
+  $File->{'Direct Input'} = TRUE;
+  $File->{Charset}->{HTTP} = "utf-8"; # by default, the form accepts utf-8 chars
 
   return $File;
 }
@@ -1946,7 +1951,7 @@
       W18_xml  => $cs_xml,
       W18_use  => $cs_use,
     });
-  } elsif (&conflict($File->{Charset}->{HTTP}, $File->{Charset}->{META})) {
+  } elsif (&conflict($File->{Charset}->{HTTP}, $File->{Charset}->{META}) and not ($File->{'Direct Input'})) {
     &add_warning('W19', {
       W19_http => $cs_http,
       W19_meta => $cs_meta,

Received on Wednesday, 21 September 2005 08:47:42 UTC