validator/httpd/cgi-bin check,1.620,1.621

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

Modified Files:
	check 
Log Message:
If not in debug mode, set Accept-Encoding to what LWP (>= 5.816) can handle.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.620
retrieving revision 1.621
diff -u -d -r1.620 -r1.621
--- check	4 Jan 2009 11:35:46 -0000	1.620
+++ check	4 Jan 2009 12:11:07 -0000	1.621
@@ -462,6 +462,7 @@
 } else {
   $DEBUG = FALSE; # The default.
 }
+$File->{Opt}->{Debug} = $DEBUG;
 
 &abort_if_error_flagged($File, O_NONE);
 
@@ -3043,6 +3044,7 @@
 
 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 @@
   # 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;
 }
 

Received on Sunday, 4 January 2009 12:11:18 UTC