summaryrefslogtreecommitdiffstats
path: root/httpd/cgi-bin/check
diff options
context:
space:
mode:
authorot <ot@localhost>2007-03-15 06:30:15 +0000
committerot <ot@localhost>2007-03-15 06:30:15 +0000
commitbc1bc798dc193d1fcfa65a40be84b2d9f5f4cbca (patch)
treeba0ae4a209e088640eb06f54248dd7f2d6bdedd3 /httpd/cgi-bin/check
parent1c8df1331125f578ead7ba7123261bfd0e0c5527 (diff)
downloadmarkup-validator-bc1bc798dc193d1fcfa65a40be84b2d9f5f4cbca.zip
markup-validator-bc1bc798dc193d1fcfa65a40be84b2d9f5f4cbca.tar.gz
markup-validator-bc1bc798dc193d1fcfa65a40be84b2d9f5f4cbca.tar.bz2
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
Diffstat (limited to 'httpd/cgi-bin/check')
-rwxr-xr-xhttpd/cgi-bin/check17
1 files changed, 11 insertions, 6 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index fd9724e..4883a64 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -14,7 +14,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.478 2007-03-14 07:43:50 ot Exp $
+# $Id: check,v 1.479 2007-03-15 06:30:14 ot Exp $
#
# Disable buffering on STDOUT!
@@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.478 $;
+ $VERSION = q$Revision: 1.479 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -484,8 +484,12 @@ unless ($File->{Charset}->{Use}) {
#
# 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 @@ if ($File->{Charset}->{Use} eq 'utf-8' &&
#
#
-# 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);
}