summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_transaction_winhttp.cc10
-rw-r--r--net/http/http_transaction_winhttp.h3
2 files changed, 11 insertions, 2 deletions
diff --git a/net/http/http_transaction_winhttp.cc b/net/http/http_transaction_winhttp.cc
index 4429511..727bbe3 100644
--- a/net/http/http_transaction_winhttp.cc
+++ b/net/http/http_transaction_winhttp.cc
@@ -727,7 +727,7 @@ void HttpTransactionWinHttp::StatusCallback(HINTERNET handle,
// Successfully found the IP address of the server.
case WINHTTP_CALLBACK_STATUS_NAME_RESOLVED:
DidFinishDnsResolutionWithStatus(true,
- GURL(), // null referer URL.
+ GURL(), // null referrer URL.
reinterpret_cast<void*>(context));
break;
}
@@ -1435,6 +1435,14 @@ int HttpTransactionWinHttp::DidReadData(DWORD num_bytes) {
content_length_remaining_ = 0;
}
+ // We have read the entire response. Mark the request done to unblock a
+ // queued request.
+ if (rv == 0 || content_length_remaining_ == 0) {
+ DCHECK(request_submitted_);
+ request_submitted_ = false;
+ session_->request_throttle()->NotifyRequestDone(connect_peer_);
+ }
+
return rv;
}
diff --git a/net/http/http_transaction_winhttp.h b/net/http/http_transaction_winhttp.h
index 430a288..5bb3b94 100644
--- a/net/http/http_transaction_winhttp.h
+++ b/net/http/http_transaction_winhttp.h
@@ -185,7 +185,8 @@ class HttpTransactionWinHttp : public HttpTransaction {
// worry about thread synchronization issues.)
bool need_to_wait_for_handle_closing_;
- // True if we have called WinHttpRequestThrottle::SubmitRequest.
+ // True if we have called WinHttpRequestThrottle::SubmitRequest but haven't
+ // called WinHttpRequestThrottle::NotifyRequestDone.
bool request_submitted_;
DISALLOW_EVIL_CONSTRUCTORS(HttpTransactionWinHttp);