W3C home > Mailing lists > Public > www-validator@w3.org > October 2007

Patch for charset error when Authentication fails

From: Chuck Houpt <chuck@habilis.net>
Date: Wed, 24 Oct 2007 16:19:43 -0400
Message-Id: <a06240801c33c45569ff4@[192.168.1.153]>
To: www-validator@w3.org

Hi,

I ran across a minor error in the validator:

When the validator attempts to retrieve a password-protected page, 
but authentication fails, the validator prints the following error 
message (either in Apache's error log or standard error):

check: Wide character in print at 
/Applications/Validator-SAC.app/Contents/Resources/validator/httpd/cgi-bin/check 
line 1274.

The patch below fixes the error, by encoding the output as UTF-8 
(same as other error print-statements).

Cheers - Chuck

Index: httpd/cgi-bin/check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.576
diff -u -r1.576 check
--- httpd/cgi-bin/check 19 Oct 2007 19:37:39 -0000      1.576
+++ httpd/cgi-bin/check 24 Oct 2007 20:19:04 -0000
@@ -1268,7 +1268,7 @@
    $File->{Templates}->{AuthzReq}->param(http_401_headers => $headers);
    $File->{Templates}->{AuthzReq}->param(http_401_url     => $resource);

-  print $File->{Templates}->{AuthzReq}->output;
+  print Encode::encode('UTF-8',$File->{Templates}->{AuthzReq}->output);

    exit; # Further interaction will be a new HTTP request.
  }
Received on Wednesday, 24 October 2007 20:20:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:05 UTC