- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 27 Sep 2007 10:13:39 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv19846/httpd/cgi-bin
Modified Files:
check
Log Message:
adding experimental parameters to set the Accept and Accept-Language headers
Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.571
retrieving revision 1.572
diff -u -d -r1.571 -r1.572
--- check 25 Sep 2007 07:22:03 -0000 1.571
+++ check 27 Sep 2007 10:13:36 -0000 1.572
@@ -439,6 +439,9 @@
$File->{Opt}->{'Prefill'} = $q->param('prefill') ? TRUE : FALSE;
$File->{Opt}->{'Prefill Doctype'} = $q->param('prefill_doctype') ? $q->param('prefill_doctype') : 'html401';
+$File->{Opt}->{'Accept Header'} = $q->param('accept') ? $q->param('accept') : '';
+$File->{Opt}->{'Accept-Language Header'} = $q->param('accept-language') ? $q->param('accept-language') : '';
+
#
# "Fallback" info for Character Encoding (fbc), Content-Type (fbt),
# and DOCTYPE (fbd). If TRUE, the Override values are treated as
@@ -1303,6 +1306,16 @@
# telling caches in the middle we want a fresh copy (Bug 4998)
$req->header(Cache_control=> "max-age=0");
+ # if one wants to use the accept and accept-language params
+ # in order to trigger specific negotiation
+ if ($File->{Opt}->{'Accept Header'}) {
+ $req->header(Accept => $File->{Opt}->{'Accept Header'});
+ }
+ if ($File->{Opt}->{'Accept-Language Header'}) {
+ $req->header(Accept_Language => $File->{Opt}->{'Accept-Language Header'});
+ }
+
+
# If we got a Authorization header, the client is back at it after being
# prompted for a password so we insert the header as is in the request.
if($ENV{HTTP_AUTHORIZATION}){
Received on Thursday, 27 September 2007 10:13:50 UTC