validator/httpd/cgi-bin check,1.478,1.479

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

Modified Files:
	check 
Log Message:
For default auto-detection of charset and doctype, changing the 
form so that the values be empty, hence creating validation results URIs like 
...check?uri=http%3A%2F%2Fwww.example.org&doctype=&charset=
rather than
...check?uri=http%3A%2F%2Fwww.example.org%2F&charset=%28detect+automatically%29&doctype=Inline



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.478
retrieving revision 1.479
diff -u -d -r1.478 -r1.479
--- check	14 Mar 2007 07:43:50 -0000	1.478
+++ check	15 Mar 2007 06:30:14 -0000	1.479
@@ -484,8 +484,12 @@
 
 #
 # Handle any Fallback or Override for the charset.
-if (charset_not_equal($File->{Opt}->{Charset}, '(detect automatically)')) {
-  # charset=foo was given to the CGI and it wasn't "autodetect".
+if (
+        charset_not_equal($File->{Opt}->{Charset}, '(detect automatically)')
+   and 
+        charset_not_equal($File->{Opt}->{Charset}, '')
+   ) {
+  # charset=foo was given to the CGI and it wasn't "autodetect" or empty.
 
   #
   # Extract the user-requested charset from CGI param.
@@ -581,9 +585,10 @@
 #
 
 #
-# Override DOCTYPE if user asked for it.
+# Override DOCTYPE if user asked for it. 
 if ($File->{Opt}->{DOCTYPE}
-    and not $File->{Opt}->{DOCTYPE} =~ /(Inline|detect)/i) {
+    and not $File->{Opt}->{DOCTYPE} =~ /(Inline|detect)/i
+    and $File->{Opt}->{DOCTYPE} ne '1' ) { 
   $File = &override_doctype($File);
 }
 

Received on Thursday, 15 March 2007 06:30:48 UTC