1
0
mirror of https://github.com/moparisthebest/spdylay synced 2024-11-05 00:55:07 -05:00

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

View File

@ -339,7 +339,10 @@ void check_response_header
} }
Request *req = (Request*)spdylay_session_get_stream_user_data(session, Request *req = (Request*)spdylay_session_get_stream_user_data(session,
stream_id); stream_id);
assert(req); if(!req) {
// Server-pushed stream does not have stream user data
return;
}
bool gzip = false; bool gzip = false;
for(size_t i = 0; nv[i]; i += 2) { for(size_t i = 0; nv[i]; i += 2) {
if(strcmp("content-encoding", nv[i]) == 0) { if(strcmp("content-encoding", nv[i]) == 0) {