diff options
author | ville <ville@localhost> | 2009-01-04 12:11:07 +0000 |
---|---|---|
committer | ville <ville@localhost> | 2009-01-04 12:11:07 +0000 |
commit | 73f46dc504f183e8da0de9e6040a5e270b65e976 (patch) | |
tree | ab1fb6554d32bddbeaa3899b8dd2292d91aa483f | |
parent | f19d20a3839d4bb29937e4f90207778f481b199e (diff) | |
download | markup-validator-73f46dc504f183e8da0de9e6040a5e270b65e976.zip markup-validator-73f46dc504f183e8da0de9e6040a5e270b65e976.tar.gz markup-validator-73f46dc504f183e8da0de9e6040a5e270b65e976.tar.bz2 |
If not in debug mode, set Accept-Encoding to what LWP (>= 5.816) can handle.
-rwxr-xr-x | htdocs/docs/install.html | 9 | ||||
-rwxr-xr-x | httpd/cgi-bin/check | 10 |
2 files changed, 14 insertions, 5 deletions
diff --git a/htdocs/docs/install.html b/htdocs/docs/install.html index 530fccd..6d1cdad 100755 --- a/htdocs/docs/install.html +++ b/htdocs/docs/install.html @@ -1,5 +1,5 @@ -<!--#set var="revision" value="\$Id: install.html,v 1.41 2009-01-04 11:34:56 ville Exp $" ---><!--#set var="date" value="\$Date: 2009-01-04 11:34:56 $" +<!--#set var="revision" value="\$Id: install.html,v 1.42 2009-01-04 12:11:07 ville Exp $" +--><!--#set var="date" value="\$Date: 2009-01-04 12:11:07 $" --><!--#set var="title" value="Installation Documentation for The W3C Markup Validation Service" --><!--#set var="relroot" value="../" --><!--#include virtual="../header.html" --> @@ -155,7 +155,10 @@ install Bundle::W3C::Validator support for downloading pages off the net comes from. Version 5.800 or newer is required, however we strongly suggest a (much) newer version. Validator's support for compressed responses is available - with version 5.802 and later. If you want your Validator to + with version 5.802 and later, and announced using the + <code>Accept-Encoding</code> HTTP header with version 5.816 and + later, depending on if the modules required for libwww-perl's + compression facilities are installed. If you want your Validator to support <abbr title="Secure Sockets Layer">SSL</abbr>/<abbr title="Transport Layer Security">TLS</abbr>, see <a href="http://search.cpan.org/dist/libwww-perl/README.SSL">README.SSL</a> diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 138c18e..667089b 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.620 2009-01-04 11:35:46 ville Exp $ +# $Id: check,v 1.621 2009-01-04 12:11:07 ville Exp $ # # Disable buffering on STDOUT! @@ -198,7 +198,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.620 $; + $VERSION = q$Revision: 1.621 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -462,6 +462,7 @@ if ($CFG->{'Allow Debug'}) { } else { $DEBUG = FALSE; # The default. } +$File->{Opt}->{Debug} = $DEBUG; &abort_if_error_flagged($File, O_NONE); @@ -3043,6 +3044,7 @@ sub end_element package W3C::Validator::UserAgent; +use HTTP::Message qw(); use LWP::UserAgent 2.032 qw(); # Need 2.032 for default_header() use Net::hostent qw(gethostbyname); use Net::IP qw(); @@ -3068,6 +3070,10 @@ sub new { # Tell caches in the middle we want a fresh copy (Bug 4998). $self->default_header('Cache-Control' => 'max-age=0'); + # If not in debug mode, set Accept-Encoding to what LWP (>= 5.816) can handle + $self->default_header('Accept-Encoding' => scalar HTTP::Message::decodable()) + if (!$File->{Opt}->{Debug} && HTTP::Message->can('decodable')); + return $self; } |