summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlink <link@localhost>2005-02-04 21:12:51 +0000
committerlink <link@localhost>2005-02-04 21:12:51 +0000
commit4920adc5690c5755d6bfdd9db0050deb77d38c6b (patch)
tree56cc6a86959d933a83f7ee4549696753ef0986de
parent0cbfbf33547f81a20a177bf9b0899fcddb0e7281 (diff)
downloadmarkup-validator-4920adc5690c5755d6bfdd9db0050deb77d38c6b.zip
markup-validator-4920adc5690c5755d6bfdd9db0050deb77d38c6b.tar.gz
markup-validator-4920adc5690c5755d6bfdd9db0050deb77d38c6b.tar.bz2
Un-bork unknown media type detection.
-rwxr-xr-xhttpd/cgi-bin/check8
1 files changed, 4 insertions, 4 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index eed016b..3e03507 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -9,7 +9,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.387 2005-02-04 21:05:54 link Exp $
+# $Id: check,v 1.388 2005-02-04 21:12:51 link Exp $
#
# Disable buffering on STDOUT!
@@ -239,7 +239,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.387 $;
+ $VERSION = q$Revision: 1.388 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -1416,7 +1416,7 @@ sub parse_content_type {
my($ct, @param) = split /\s*;\s*/, lc $Content_Type;
- $mode = $CFG->{MIME}->{$ct} || MODE_TBD;
+ $mode = $CFG->{MIME}->{$ct} || $ct;
foreach my $param (@param) {
my($p, $v) = split /\s*=\s*/, $param;
@@ -1427,7 +1427,7 @@ sub parse_content_type {
}
}
- if ($mode == MODE_TBD) {
+ if ($mode =~ m(/)) { # a "/" means it's unknown or we'd have a mode here.
if ($ct =~ m(text/css) and defined $url) {
print redirect
'http://jigsaw.w3.org/css-validator/validator?uri='