Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5301)

Unified Diff: chrome_frame/urlmon_url_request.cc

Issue 491057: ChromeFrame's host network stack implementation for IE should ensure that HTT... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/urlmon_url_request.cc
===================================================================
--- chrome_frame/urlmon_url_request.cc (revision 34375)
+++ chrome_frame/urlmon_url_request.cc (working copy)
@@ -214,8 +214,10 @@
OnResponse(0, UTF8ToWide(headers).c_str(), NULL, NULL);
ignore_redirect_stop_binding_error_ = true;
DCHECK(binding_ != NULL);
- binding_->Abort();
- binding_ = NULL;
+ if (binding_) {
+ binding_->Abort();
+ binding_ = NULL;
+ }
return E_ABORT;
}
@@ -244,6 +246,15 @@
status_.set_status(URLRequestStatus::SUCCESS);
status_.set_os_error(0);
ReleaseBindings();
+ // In most cases we receive the end request notification from Chrome.
+ // However at times requests can complete without us receiving any
+ // data. In this case we need to inform Chrome that this request has been
+ // completed to prevent Chrome from waiting forever for data for this
+ // request.
+ if (!cached_data_.is_valid()) {
+ pending_read_size_ = 0;
+ OnResponseEnd(status_);
+ }
}
return S_OK;
@@ -332,6 +343,7 @@
cached_data_.Read(&send_stream, pending_read_size_, &pending_read_size_);
DLOG(INFO) << StringPrintf("URL: %s Obj: %X", url().c_str(), this) <<
" - size read: " << pending_read_size_;
+ pending_read_size_ = 0;
} else {
DLOG(INFO) << StringPrintf("URL: %s Obj: %X", url().c_str(), this) <<
" - waiting for remote read";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698