summaryrefslogtreecommitdiffstats
path: root/chrome_frame/urlmon_moniker.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 19:31:36 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 19:31:36 +0000
commit4718325ce7e91e4f52de4e2e9fca8934e1ba88f0 (patch)
tree47a95eedc52c3c0ca31edf8ad98ce1abb17de41f /chrome_frame/urlmon_moniker.cc
parent4b47c247aeadbf6a7967733120defcee2bc69773 (diff)
downloadchromium_src-4718325ce7e91e4f52de4e2e9fca8934e1ba88f0.zip
chromium_src-4718325ce7e91e4f52de4e2e9fca8934e1ba88f0.tar.gz
chromium_src-4718325ce7e91e4f52de4e2e9fca8934e1ba88f0.tar.bz2
Fix ChromeFrame referrer test which was flaky due to incorrect http header parsing. To pass the referrer
to Chrome during navigation we were converting normalized HTTP headers which are terminated with \r\n to raw headers and attempting to parse them. Converting to raw headers basically replaces \r\n with the NULL terminator which causes the parsing to fail as a result of which we fail to retrieve the referrer. Fix is to not convert the headers to raw and just parse the orignal headers. The other change is to only flag success or failure in the referrer frame test if we are running in Chrome. This page loads initially in IE as well due to the vagaries of the http equiv patch. Flagging an error if we don't find a referrer basically causes the test to fail. This should fix http://code.google.com/p/chromium/issues/detail?id=34812 Will remove the flaky attribute on the ChromeFrame Referrer test in a subsequent CL if all goes well. Bug=34812 Review URL: http://codereview.chromium.org/1128013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42372 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/urlmon_moniker.cc')
-rw-r--r--chrome_frame/urlmon_moniker.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome_frame/urlmon_moniker.cc b/chrome_frame/urlmon_moniker.cc
index 85fad9f..0873f13 100644
--- a/chrome_frame/urlmon_moniker.cc
+++ b/chrome_frame/urlmon_moniker.cc
@@ -33,11 +33,8 @@ std::string FindReferrerFromHeaders(const wchar_t* headers,
if (!both_headers[i])
continue;
std::string raw_headers_utf8 = WideToUTF8(both_headers[i]);
- std::string http_headers =
- net::HttpUtil::AssembleRawHeaders(raw_headers_utf8.c_str(),
- raw_headers_utf8.length());
- net::HttpUtil::HeadersIterator it(http_headers.begin(),
- http_headers.end(), "\r\n");
+ net::HttpUtil::HeadersIterator it(raw_headers_utf8.begin(),
+ raw_headers_utf8.end(), "\r\n");
while (it.GetNext()) {
if (LowerCaseEqualsASCII(it.name(), "referer")) {
referrer = it.values();