validator/httpd/cgi-bin check,1.627,1.628

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

Modified Files:
	check 
Log Message:
Pass original Content-Language and Last-Modified to validator.nu; $File->{Modified} is now always the raw header value as we received it.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.627
retrieving revision 1.628
diff -u -d -r1.627 -r1.628
--- check	4 Jan 2009 20:35:08 -0000	1.627
+++ check	4 Jan 2009 21:05:43 -0000	1.628
@@ -844,6 +844,10 @@
     $req->content_ref(\$File->{Bytes});
   }
 
+  $req->content_language($File->{ContentLang}) if $File->{ContentLang};
+  # Intentionally using direct header access instead of $req->last_modified
+  $req->header('Last-Modified', $File->{Modified}) if $File->{Modified};
+
   my $res = $ua->request($req);
   if (! $res->is_success()) {
     $File->{'Error Flagged'} = TRUE;
@@ -1522,11 +1526,6 @@
                           scalar($res->request->uri),
                          );
 
-  my $lastmod = undef;
-  if ( $res->last_modified ) {
-    $lastmod = scalar(gmtime($res->last_modified));
-  }
-
   my $content = $res->can('decoded_content') ?
     $res->decoded_content(charset => 'none') : $res->content;
 
@@ -1538,7 +1537,7 @@
   $File->{ContentLoc}      = $res->header('Content-Location');
   $File->{TransferEnc}     = $res->header('Client-Transfer-Encoding');
   $File->{Charset}->{HTTP} = lc $charset;
-  $File->{Modified}        = $lastmod;
+  $File->{Modified}        = $res->header('Last-Modified');
   $File->{Server}          = scalar $res->server;
 
   # TODO: Content-Length is not always set, so either this should

Received on Sunday, 4 January 2009 21:05:58 UTC