diff options
author | ot <ot@localhost> | 2008-02-13 05:57:24 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2008-02-13 05:57:24 +0000 |
commit | 3857c89ea5d219125f01db0c5d85a9081d73504e (patch) | |
tree | 34000d569c608fbc3e34436b449d0e94e9deeeff | |
parent | 4b5af677bbb9bf337fa7fde9f3d9df4701a36bdd (diff) | |
download | markup-validator-3857c89ea5d219125f01db0c5d85a9081d73504e.zip markup-validator-3857c89ea5d219125f01db0c5d85a9081d73504e.tar.gz markup-validator-3857c89ea5d219125f01db0c5d85a9081d73504e.tar.bz2 |
adding accept-charset option
-rwxr-xr-x | htdocs/docs/users.html | 12 | ||||
-rwxr-xr-x | httpd/cgi-bin/check | 10 |
2 files changed, 17 insertions, 5 deletions
diff --git a/htdocs/docs/users.html b/htdocs/docs/users.html index 080d3f4..e7d1798 100755 --- a/htdocs/docs/users.html +++ b/htdocs/docs/users.html @@ -1,5 +1,5 @@ -<!--#set var="revision" value="\$Id: users.html,v 1.28 2007-09-27 10:13:33 ot Exp $" ---><!--#set var="date" value="\$Date: 2007-09-27 10:13:33 $" +<!--#set var="revision" value="\$Id: users.html,v 1.29 2008-02-13 05:57:24 ot Exp $" +--><!--#set var="date" value="\$Date: 2008-02-13 05:57:24 $" --><!--#set var="title" value="User Documentation for The W3C Markup Validation Service" --><!--#set var="relroot" value="../" --><!--#include virtual="../header.html" --> @@ -215,6 +215,14 @@ <p>For example, append "<code>accept-language=ja%2Cfr</code>" and the validator will send the HTTP Header "<code>Accept-Language: ja,fr</code>".</p> </dd> + <dt id="option-accept-charset">Set a specific <code>Accept-Charset</code> Header (<code>accept-charset</code>)</dt> + <dd> + <p>This option (<em>experimental, as of 0.8.3</em>) makes the validator send + a <code>Accept-Charset</code> HTTP header, specifying the character encodings + which it will accept from server. This option is mainly used to interface the Markup + Validator for <a href="http://www.w3.org/TR/mobileOK-basic10-tests/#http_request">Mobile Web Best Practices</a> + checking.</p> + </dd> </dl> <h4 id="Output">Output Options</h4> <p> diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 3706bb7..8b621ad 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -14,7 +14,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.582 2008-02-12 06:30:25 ot Exp $ +# $Id: check,v 1.583 2008-02-13 05:57:24 ot Exp $ # # Disable buffering on STDOUT! @@ -186,7 +186,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.582 $; + $VERSION = q$Revision: 1.583 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -444,6 +444,7 @@ $File->{Opt}->{'Prefill Doctype'} = $q->param('prefill_doctype') ? $q->pa $File->{Opt}->{'Accept Header'} = $q->param('accept') ? $q->param('accept') : ''; $File->{Opt}->{'Accept-Language Header'} = $q->param('accept-language') ? $q->param('accept-language') : ''; +$File->{Opt}->{'Accept-Charset Header'} = $q->param('accept-charset') ? $q->param('accept-charset') : ''; # # "Fallback" info for Character Encoding (fbc), Content-Type (fbt), @@ -1310,7 +1311,7 @@ sub handle_uri { # 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 + # if one wants to use the accept, accept-charset and accept-language params # in order to trigger specific negotiation if ($File->{Opt}->{'Accept Header'}) { $req->header(Accept => $File->{Opt}->{'Accept Header'}); @@ -1318,6 +1319,9 @@ sub handle_uri { if ($File->{Opt}->{'Accept-Language Header'}) { $req->header(Accept_Language => $File->{Opt}->{'Accept-Language Header'}); } + if ($File->{Opt}->{'Accept-Charset Header'}) { + $req->header(Accept_Charset => $File->{Opt}->{'Accept-Charset Header'}); + } # If we got a Authorization header, the client is back at it after being |