summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 22:45:05 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 22:45:05 +0000
commitcdb83b9d62064c31a3229a19743866a7d5c20a0b (patch)
tree73f925630c245edb5cfeb8190c90dec7071b2d87 /net
parent62e070894167c2bce2b77367f6eda9c6b0736dcc (diff)
downloadchromium_src-cdb83b9d62064c31a3229a19743866a7d5c20a0b.zip
chromium_src-cdb83b9d62064c31a3229a19743866a7d5c20a0b.tar.gz
chromium_src-cdb83b9d62064c31a3229a19743866a7d5c20a0b.tar.bz2
A couple of SPDY server push bug fixes.
GFE and the SPDY spec both require lower-case headers, so I've updated the Chrome SPDY stack and the unit tests to use lower-case x-associated-content. Also fixes a bug in SpdyStream::DoReadBody that breaks push streams in certain situations (they never get their body data). Landing for Matthew Lloyd (mlloyd@google.com) BUG=none TEST=SpdyNetworkTransactionTest.ServerPush Review URL: http://codereview.chromium.org/1755017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46000 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/spdy/spdy_network_transaction_unittest.cc4
-rw-r--r--net/spdy/spdy_session.cc2
-rw-r--r--net/spdy/spdy_stream.cc6
3 files changed, 8 insertions, 4 deletions
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index ca31d95..28e00d0 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -1404,8 +1404,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPush) {
0x00, 0x00, 0x00, 0x71,
0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x04,
- 0x00, 0x14, 'X', '-', 'A', 's', 's', 'o', 'c', 'i', 'a', 't',
- 'e', 'd', '-', 'C', 'o', 'n', 't', 'e', 'n', 't',
+ 0x00, 0x14, 'x', '-', 'a', 's', 's', 'o', 'c', 'i', 'a', 't',
+ 'e', 'd', '-', 'c', 'o', 'n', 't', 'e', 'n', 't',
0x00, 0x20, '1', '?', '?', 'h', 't', 't', 'p', ':', '/', '/', 'w', 'w',
'w', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o', 'm',
'/', 'f', 'o', 'o', '.', 'd', 'a', 't',
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 3b818e6..ace8eaf 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -1015,7 +1015,7 @@ void SpdySession::OnSynReply(const spdy::SpdySynReplyControlFrame& frame,
// request a duplicate stream which is already scheduled to be
// sent to us.
spdy::SpdyHeaderBlock::const_iterator it;
- it = headers.find("X-Associated-Content");
+ it = headers.find("x-associated-content");
if (it != headers.end()) {
const std::string& content = it->second;
std::string::size_type start = 0;
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index f2ea36c..678b0c4 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -489,13 +489,17 @@ int SpdyStream::DoReadHeadersComplete(int result) {
int SpdyStream::DoReadBody() {
// TODO(mbelshe): merge SpdyStreamParser with SpdyStream and then this
// makes sense.
+ if (response_complete_) {
+ io_state_ = STATE_READ_BODY_COMPLETE;
+ return OK;
+ }
return ERR_IO_PENDING;
}
int SpdyStream::DoReadBodyComplete(int result) {
// TODO(mbelshe): merge SpdyStreamParser with SpdyStream and then this
// makes sense.
- return ERR_IO_PENDING;
+ return result;
}
void SpdyStream::UpdateHistograms() {