summaryrefslogtreecommitdiffstats
path: root/chrome_frame/urlmon_upload_data_stream.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 06:43:35 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 06:43:35 +0000
commit4736610c8c5210c61efbf985b7e56843c7cfa219 (patch)
tree0842657b27f9055b6653708e9025ee6ff076f2ea /chrome_frame/urlmon_upload_data_stream.h
parentb9e8ea61b8b7b897292bfc69814444dd9e938477 (diff)
downloadchromium_src-4736610c8c5210c61efbf985b7e56843c7cfa219.zip
chromium_src-4736610c8c5210c61efbf985b7e56843c7cfa219.tar.gz
chromium_src-4736610c8c5210c61efbf985b7e56843c7cfa219.tar.bz2
Revert 76880 - 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 TBR=ananta@chromium.org Review URL: http://codereview.chromium.org/6626008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/urlmon_upload_data_stream.h')
-rw-r--r--chrome_frame/urlmon_upload_data_stream.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/chrome_frame/urlmon_upload_data_stream.h b/chrome_frame/urlmon_upload_data_stream.h
new file mode 100644
index 0000000..8f715ed
--- /dev/null
+++ b/chrome_frame/urlmon_upload_data_stream.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_FRAME_URLMON_UPLOAD_DATA_STREAM_H_
+#define CHROME_FRAME_URLMON_UPLOAD_DATA_STREAM_H_
+
+#include <urlmon.h>
+#include <atlbase.h>
+#include <atlcom.h>
+
+#include "base/ref_counted.h"
+#include "chrome_frame/stream_impl.h"
+#include "net/base/upload_data.h"
+#include "net/base/upload_data_stream.h"
+
+// Provides an IStream interface to the very different UploadDataStream
+// implementation.
+class UrlmonUploadDataStream : public CComObjectRootEx<CComMultiThreadModel>,
+ public StreamImpl {
+ public:
+ UrlmonUploadDataStream() {}
+
+ BEGIN_COM_MAP(UrlmonUploadDataStream)
+ COM_INTERFACE_ENTRY(ISequentialStream)
+ COM_INTERFACE_ENTRY(IStream)
+ END_COM_MAP()
+
+ void Initialize(net::UploadData* upload_data);
+
+ // Partial implementation of IStream.
+ STDMETHOD(Read)(void* pv, ULONG cb, ULONG* read);
+ STDMETHOD(Seek)(LARGE_INTEGER move, DWORD origin, ULARGE_INTEGER* new_pos);
+ STDMETHOD(Stat)(STATSTG *pstatstg, DWORD grfStatFlag);
+
+ private:
+ scoped_refptr<net::UploadData> upload_data_;
+ scoped_ptr<net::UploadDataStream> request_body_stream_;
+};
+
+#endif // CHROME_FRAME_URLMON_UPLOAD_DATA_STREAM_H_