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

Unified Diff: net/spdy/spdy_http_stream.cc

Issue 6800009: Attn: Mike Belshe Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 8 months 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
Index: net/spdy/spdy_http_stream.cc
===================================================================
--- net/spdy/spdy_http_stream.cc (revision 80449)
+++ net/spdy/spdy_http_stream.cc (working copy)
@@ -340,10 +340,28 @@
}
void SpdyHttpStream::OnDataReceived(const char* data, int length) {
+ // JTL - delete this
+ if (using_sctp()) {
+ if (!using_sctp_control_stream() || stream()->syn_reply_received()) {
+ printf("SpdyHttpStream::OnDataReceived: entered on stream %d "
+ "(length = %d)\n",
+ stream()->stream_id(), length);
+ } else {
+ printf("SpdyHttpStream::OnDataReceived: entered on stream %d, with "
+ "syn_reply_received_ = false (length = %d)\n",
+ stream()->stream_id(), length);
+ }
+ }
// SpdyStream won't call us with data if the header block didn't contain a
// valid set of headers. So we don't expect to not have headers received
// here.
- DCHECK(response_headers_received_);
+ // Exception - when using SCTP with a single dictionary, all SPDY CONTROL
+ // frames are sent on SCTP stream 0, while all SPDY DATA frames are sent on
+ // SCTP stream n > 0. This means that data can arrive before a SYN_REPLY,
+ // due to reordering or loss. In this case we can't require
+ // response_headers_received to be true.
+ if ( !(using_sctp() && using_sctp_control_stream()))
+ DCHECK(response_headers_received_);
// Note that data may be received for a SpdyStream prior to the user calling
// ReadResponseBody(), therefore user_buffer_ may be NULL. This may often
@@ -382,6 +400,11 @@
void SpdyHttpStream::ScheduleBufferedReadCallback() {
// If there is already a scheduled DoBufferedReadCallback, don't issue
// another one. Mark that we have received more data and return.
+ if (using_sctp() && using_sctp_control_stream() &&
+ !stream()->syn_reply_received()) {
+ printf("SpdyHttpStream::ScheduleBufferedReadCallback: SYN_REPLY is "
+ "*** pending *** on stream %d\n", stream()->stream_id()); // JTL
+ }
if (buffered_read_callback_pending_) {
more_read_data_pending_ = true;
return;

Powered by Google App Engine
This is Rietveld 408576698