Commit 4fffd23d authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Code cleanup

parent b187895e
...@@ -1542,6 +1542,13 @@ static int session_prep_frame(nghttp2_session *session, ...@@ -1542,6 +1542,13 @@ static int session_prep_frame(nghttp2_session *session,
} else if(session_predicate_push_response_headers_send } else if(session_predicate_push_response_headers_send
(session, frame->hd.stream_id) == 0) { (session, frame->hd.stream_id) == 0) {
frame->headers.cat = NGHTTP2_HCAT_PUSH_RESPONSE; frame->headers.cat = NGHTTP2_HCAT_PUSH_RESPONSE;
if(aux_data && aux_data->stream_user_data) {
nghttp2_stream *stream;
stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
stream->stream_user_data = aux_data->stream_user_data;
}
} else if(session_predicate_response_headers_send } else if(session_predicate_response_headers_send
(session, frame->hd.stream_id) == 0) { (session, frame->hd.stream_id) == 0) {
frame->headers.cat = NGHTTP2_HCAT_RESPONSE; frame->headers.cat = NGHTTP2_HCAT_RESPONSE;
...@@ -1571,14 +1578,6 @@ static int session_prep_frame(nghttp2_session *session, ...@@ -1571,14 +1578,6 @@ static int session_prep_frame(nghttp2_session *session,
goto close_stream_return; goto close_stream_return;
} }
if(frame->headers.cat == NGHTTP2_HCAT_PUSH_RESPONSE) {
if(aux_data && aux_data->stream_user_data) {
nghttp2_stream *stream;
stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
stream->stream_user_data = aux_data->stream_user_data;
}
}
DEBUGF(fprintf(stderr, "send: HEADERS finally serialized in %zd bytes\n", DEBUGF(fprintf(stderr, "send: HEADERS finally serialized in %zd bytes\n",
nghttp2_bufs_len(&session->aob.framebufs))); nghttp2_bufs_len(&session->aob.framebufs)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment