diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 20:29:12 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 20:29:12 +0000 |
commit | 8e698b6c58faf3a267ebc7512e530dc4323a010b (patch) | |
tree | a9e1d055c274fb2f6fdda77d5a5cfe3d7f2a3b15 /chrome_frame/utils.h | |
parent | eba0116741b4849809fc57d97cdf527a1b5da507 (diff) | |
download | chromium_src-8e698b6c58faf3a267ebc7512e530dc4323a010b.zip chromium_src-8e698b6c58faf3a267ebc7512e530dc4323a010b.tar.gz chromium_src-8e698b6c58faf3a267ebc7512e530dc4323a010b.tar.bz2 |
Modify the parsing of X-UA-COMPATIBLE header (and meta tag) to allow comma or semi-colon as delimiter for backwards compatibility.
BUG=52601
TEST=chrome_frame_unittests / UtilTests.XUaCompatibleDirectiveTest
Review URL: http://codereview.chromium.org/4103004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.h')
-rw-r--r-- | chrome_frame/utils.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h index 678b86c..7cafc26 100644 --- a/chrome_frame/utils.h +++ b/chrome_frame/utils.h @@ -610,10 +610,10 @@ void EnumerateKeyValues(HKEY parent_key, const wchar_t* sub_key_name, // // The header is a series of name-value pairs, with the names being HTTP tokens // and the values being either tokens or quoted-strings. Names and values are -// joined by '=' and pairs are delimited by ';'. LWS may be used liberally -// before and between names, values, '=', and ';'. See RFC 2616 for definitions -// of token, quoted-string, and LWS. See Microsoft's documentation of the -// X-UA-COMPATIBLE header here: +// joined by '=' and pairs are delimited by either ';' or ','. LWS may be used +// liberally before and between names, values, '=', and ';' or ','. See RFC 2616 +// for definitions of token, quoted-string, and LWS. See Microsoft's +// documentation of the X-UA-COMPATIBLE header here: // http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx // // At most one 'Chrome=<FILTER>' entry is expected in the header value. The @@ -625,6 +625,9 @@ void EnumerateKeyValues(HKEY parent_key, const wchar_t* sub_key_name, // // For example: // X-UA-Compatible: IE=8; Chrome=IE6 +// +// The string is first interpreted using ';' as a delimiter. It is reevaluated +// using ',' iff no valid 'chrome=' value is found. bool CheckXUaCompatibleDirective(const std::string& directive, int ie_major_version); |