summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_websocket_stream.h
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-06 18:53:47 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-06 18:53:47 +0000
commit5c6908ef3647da22139e04acdb75181f0452dcaf (patch)
treecb5caeda6da4a9b1f1910a889508941abfd7127c /net/spdy/spdy_websocket_stream.h
parente9e86ccc527453d6101fe03a0f4135c611ae63bb (diff)
downloadchromium_src-5c6908ef3647da22139e04acdb75181f0452dcaf.zip
chromium_src-5c6908ef3647da22139e04acdb75181f0452dcaf.tar.gz
chromium_src-5c6908ef3647da22139e04acdb75181f0452dcaf.tar.bz2
SPDY - Handle incomplete headers during server push.
If we receive a data frame without a status or without a version header, we close the stream with a PROTOCOL ERROR. Small bug fix to HttpNetworkTransaction to access the ResponseHeaders only if headers are there. In SpdyStream, retrun a SPDY_PROTOCOL_ERROR if we have pending data frames, but we haven't received "status" and "version" headers. (rch: removed the DCHECK for unit tests). SpdyHttpStream's OnDataReceived used to expect that it would be called only when all required headers are received. Converted the DCHECK into an error condition and SpdyStream closes the stream with PROTOCOL ERROR if OnDataReceived returns a network error. BUG=135485 R=rch@chromium.org TEST=network unittests Review URL: https://chromiumcodereview.appspot.com/10836084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_websocket_stream.h')
-rw-r--r--net/spdy/spdy_websocket_stream.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/spdy/spdy_websocket_stream.h b/net/spdy/spdy_websocket_stream.h
index 900232b..58c62b02 100644
--- a/net/spdy/spdy_websocket_stream.h
+++ b/net/spdy/spdy_websocket_stream.h
@@ -77,7 +77,7 @@ class NET_EXPORT_PRIVATE SpdyWebSocketStream
virtual int OnResponseReceived(const SpdyHeaderBlock& response,
base::Time response_time,
int status) OVERRIDE;
- virtual void OnDataReceived(const char* data, int length) OVERRIDE;
+ virtual int OnDataReceived(const char* data, int length) OVERRIDE;
virtual void OnDataSent(int length) OVERRIDE;
virtual void OnClose(int status) OVERRIDE;