W3C home > Mailing lists > Public > www-validator-cvs@w3.org > January 2005

validator/httpd/cgi-bin check,1.370,1.371

From: Ville Skytta <ville@dev.w3.org>
Date: Sun, 09 Jan 2005 19:40:54 +0000
To: www-validator-cvs@w3.org
Message-ID: <E1Cnivm-0002jz-UF@lionel-hutz.w3.org>

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

Modified Files:
	check 
Log Message:
Add support for compressed responses (if LWP >= 5.802 is available).
http://www.w3.org/Bugs/Public/show_bug.cgi?id=887


Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.370
retrieving revision 1.371
diff -u -d -r1.370 -r1.371
--- check	9 Jan 2005 19:24:22 -0000	1.370
+++ check	9 Jan 2005 19:40:52 -0000	1.371
@@ -1245,7 +1245,10 @@
     $lastmod = scalar(gmtime($res->last_modified));
   }
 
-  $File->{Bytes}           = $res->content;
+  my $content = $res->can('decoded_content') ?
+    $res->decoded_content(charset => 'none') : $res->content;
+
+  $File->{Bytes}           = $content;
   $File->{Type}            = $type;
   $File->{ContentType}     = $ct;
   $File->{ContentEnc}      = $res->content_encoding;
Received on Sunday, 9 January 2005 19:40:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:19 UTC