diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 05:18:43 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 05:18:43 +0000 |
commit | 04ac6e874adc7e00269b7f3bab879d3d93530184 (patch) | |
tree | 47b31b00716c3d0b9b7ce838568537b8fbaefc4a /chrome_frame/npapi_url_request.cc | |
parent | 3358a3dc6df4a18cf36288b40c6777ed9fba4204 (diff) | |
download | chromium_src-04ac6e874adc7e00269b7f3bab879d3d93530184.zip chromium_src-04ac6e874adc7e00269b7f3bab879d3d93530184.tar.gz chromium_src-04ac6e874adc7e00269b7f3bab879d3d93530184.tar.bz2 |
ChromeFrame would fail to upload POST data to the server if the webserver requested NTLM
authentication. This is due to a bug in urlmon on IE6 and IE7 which manifests itself when
the post data is passed to urlmon as an IStream.
Fix is to pass in the uploaded data as a HGLOBAL. We always pass in a copy of the HGLOBAL
which points to the posted data to urlmon. This is to have it accessible for reissuing
navigation requests which target downloads.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=62687
BUG=62687
TEST=manually at this point. As we need a server which supports NTLM authentication like IIS.
Review URL: http://codereview.chromium.org/6603006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/npapi_url_request.cc')
-rw-r--r-- | chrome_frame/npapi_url_request.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/chrome_frame/npapi_url_request.cc b/chrome_frame/npapi_url_request.cc index ac091df..885c390 100644 --- a/chrome_frame/npapi_url_request.cc +++ b/chrome_frame/npapi_url_request.cc @@ -91,14 +91,8 @@ bool NPAPIUrlRequest::Start() { buffer += base::IntToString(data_len); buffer += "\r\n\r\n"; } - - std::string data; - data.resize(data_len); - uint32 bytes_read; - upload_data_->Read(&data[0], data_len, - reinterpret_cast<ULONG*>(&bytes_read)); - DCHECK_EQ(data_len, bytes_read); - buffer += data; + buffer.append(reinterpret_cast<char*>(&upload_data_[0]), + upload_data_.size()); result = npapi::PostURLNotify(instance_, url().c_str(), NULL, buffer.length(), buffer.c_str(), false, this); |