From b647cf88f396b6d60aaa7f2206d37b3a9a2e4a50 Mon Sep 17 00:00:00 2001 From: "stoyan@chromium.org" Date: Wed, 10 Feb 2010 23:00:21 +0000 Subject: Review URL: http://codereview.chromium.org/600032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38692 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/urlmon_url_request.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'chrome_frame/urlmon_url_request.cc') diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc index c03b3f0..393b193 100644 --- a/chrome_frame/urlmon_url_request.cc +++ b/chrome_frame/urlmon_url_request.cc @@ -226,6 +226,15 @@ STDMETHODIMP UrlmonUrlRequest::OnStopBinding(HRESULT result, LPCWSTR error) { return S_OK; } + // We have no data, and no pending read request from Chrome. + // Wait until Chrome issue a read request and then send error/success code. + // The network policy in Chrome network is that error/end_of_stream should + // be returned only as a result of read (or start) request. + if (pending_read_size_ == 0) { + ReleaseBindings(); + return S_OK; + } + NotifyDelegateAndDie(); return S_OK; } -- cgit v1.1