From 9d6257a4cc6d1b30df8e50de5c81c7331420348a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 22 Sep 2012 16:07:49 +0900 Subject: [PATCH] spdycat: Just return in check_response_header if stream_user_data is NULL We cannot use assert(stream_user_data) because server-pushed stream does not have stream_user_data. --- src/spdycat.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/spdycat.cc b/src/spdycat.cc index f25e02df..93d1d8c2 100644 --- a/src/spdycat.cc +++ b/src/spdycat.cc @@ -339,7 +339,10 @@ void check_response_header } Request *req = (Request*)spdylay_session_get_stream_user_data(session, stream_id); - assert(req); + if(!req) { + // Server-pushed stream does not have stream user data + return; + } bool gzip = false; for(size_t i = 0; nv[i]; i += 2) { if(strcmp("content-encoding", nv[i]) == 0) {