summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorville <ville@localhost>2006-08-05 09:43:15 +0000
committerville <ville@localhost>2006-08-05 09:43:15 +0000
commit5340837b22bcc52368dda27541c5f516b84a5e2d (patch)
treeab7a3a699650de3c006dd19463d583def7c7366a
parentb91e58a6b62f67eaf2a30ba390a555e5bf47f409 (diff)
downloadmarkup-validator-5340837b22bcc52368dda27541c5f516b84a5e2d.zip
markup-validator-5340837b22bcc52368dda27541c5f516b84a5e2d.tar.gz
markup-validator-5340837b22bcc52368dda27541c5f516b84a5e2d.tar.bz2
Be more lenient about whitespace and linefeeds in Content-Type (#3574).
-rwxr-xr-xhttpd/cgi-bin/check7
1 files changed, 3 insertions, 4 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index 34cee7a..659f35b 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.459 2006-08-01 06:10:52 ot Exp $
+# $Id: check,v 1.460 2006-08-05 09:42:21 ville Exp $
#
# Disable buffering on STDOUT!
@@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.459 $;
+ $VERSION = q$Revision: 1.460 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -1051,8 +1051,7 @@ sub parse_content_type {
my $url = shift;
my $charset = '';
- # @@FIXME @param now unused
- my ($ct, @param) = split /\s*;\s*/, lc $Content_Type;
+ my ($ct) = lc($Content_Type) =~ /^\s*([^\s;]*)/g;
my $mode = $CFG->{MIME}->{$ct} || $ct;