diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-17 04:02:58 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-17 04:02:58 +0000 |
commit | aaf124502e4c86acf98b88998fca3afcdb88a234 (patch) | |
tree | 3e163bb2cef2512464d8a3f54f2d2f42918a8f48 /chrome_frame/urlmon_url_request.cc | |
parent | 962b98214d0ca8e8db14ae83ccb79667ec440eac (diff) | |
download | chromium_src-aaf124502e4c86acf98b88998fca3afcdb88a234.zip chromium_src-aaf124502e4c86acf98b88998fca3afcdb88a234.tar.gz chromium_src-aaf124502e4c86acf98b88998fca3afcdb88a234.tar.bz2 |
BUG=47879
Review URL: http://codereview.chromium.org/2824057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/urlmon_url_request.cc')
-rw-r--r-- | chrome_frame/urlmon_url_request.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc index 642a438..e951f18 100644 --- a/chrome_frame/urlmon_url_request.cc +++ b/chrome_frame/urlmon_url_request.cc @@ -556,6 +556,9 @@ STDMETHODIMP UrlmonUrlRequest::BeginningTransaction(const wchar_t* url, new_headers += StringPrintf("Referer: %s\r\n", referrer().c_str()); } + // In the rare case if "User-Agent" string is already in |current_headers|. + new_headers += AppendCFUserAgentString(current_headers, NULL); + if (!new_headers.empty()) { *additional_headers = reinterpret_cast<wchar_t*>( CoTaskMemAlloc((new_headers.size() + 1) * sizeof(wchar_t))); |