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

Unified Diff: net/spdy/spdy_proxy_client_socket.cc

Issue 2526003002: Disallow multiple HEADERS frames on pushed streams. (Closed)
Patch Set: Rename enum, enum entry, and member. Created 4 years, 1 month 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 | « net/spdy/spdy_proxy_client_socket.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_proxy_client_socket.cc
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index ea771b3cf82aea048e7752e2a2e6425783d959e3..c19144611eb494ca88ac6f6311812ec33e94afe3 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -430,26 +430,26 @@ int SpdyProxyClientSocket::DoReadReplyComplete(int result) {
// SpdyStream::Delegate methods:
// Called when SYN frame has been sent.
// Returns true if no more data to be sent after SYN frame.
-void SpdyProxyClientSocket::OnRequestHeadersSent() {
+void SpdyProxyClientSocket::OnHeadersSent() {
DCHECK_EQ(next_state_, STATE_SEND_REQUEST_COMPLETE);
OnIOComplete(OK);
}
-SpdyResponseHeadersStatus SpdyProxyClientSocket::OnResponseHeadersUpdated(
+void SpdyProxyClientSocket::OnHeadersReceived(
const SpdyHeaderBlock& response_headers) {
// If we've already received the reply, existing headers are too late.
// TODO(mbelshe): figure out a way to make HEADERS frames useful after the
// initial response.
if (next_state_ != STATE_READ_REPLY_COMPLETE)
- return RESPONSE_HEADERS_ARE_COMPLETE;
+ return;
// Save the response
- if (!SpdyHeadersToHttpResponse(response_headers, &response_))
- return RESPONSE_HEADERS_ARE_INCOMPLETE;
+ const bool headers_valid =
+ SpdyHeadersToHttpResponse(response_headers, &response_);
+ DCHECK(headers_valid);
OnIOComplete(OK);
- return RESPONSE_HEADERS_ARE_COMPLETE;
}
// Called when data is received or on EOF (if |buffer| is NULL).
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698