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.
This commit is contained in:
Tatsuhiro Tsujikawa 2012-09-22 16:07:49 +09:00
parent 00172f827a
commit 9d6257a4cc
1 changed files with 4 additions and 1 deletions

View File

@ -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) {