diff options
| author | fengweihao <[email protected]> | 2020-12-14 11:52:47 +0800 |
|---|---|---|
| committer | 卢文朋 <[email protected]> | 2020-12-15 12:22:40 +0800 |
| commit | 65ca1cf6793cd032e549ac312c08e1e50869b96d (patch) | |
| tree | cfbd189baff6bdef1e26ea7bdde3d2379b6baf12 /plugin/protocol/http2/src/http2_stream.cpp | |
| parent | 5bf7f2f29806ff808a5a6b52efa06fda6c3c4b86 (diff) | |
TSG-4606 重置HTTP2应答头上下文
Diffstat (limited to 'plugin/protocol/http2/src/http2_stream.cpp')
| -rw-r--r-- | plugin/protocol/http2/src/http2_stream.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugin/protocol/http2/src/http2_stream.cpp b/plugin/protocol/http2/src/http2_stream.cpp index fc404f2..e24b9c3 100644 --- a/plugin/protocol/http2/src/http2_stream.cpp +++ b/plugin/protocol/http2/src/http2_stream.cpp @@ -2104,7 +2104,7 @@ nghttp2_client_on_data_chunk_recv(nghttp2_session *session, uint8_t flags, resp->event_cb(resp, EV_HTTP_RESP_BODY_BEGIN, NULL, len, resp->event_cb_user); } - if (flags == NGHTTP2_FLAG_END_STREAM) + if (flags & NGHTTP2_FLAG_END_STREAM) { resp->h2_payload.flags = NGHTTP2_FLAG_NONE; }else @@ -2120,7 +2120,7 @@ nghttp2_client_on_data_chunk_recv(nghttp2_session *session, uint8_t flags, resp->event_cb(resp, EV_HTTP_RESP_BODY_CONT, data, len, resp->event_cb_user); } - if (flags == NGHTTP2_FLAG_END_STREAM) + if (flags & NGHTTP2_FLAG_END_STREAM) { resp->h2_payload.flags = NGHTTP2_FLAG_NONE; }else @@ -2191,6 +2191,7 @@ create_upstream_data(nghttp2_session *session, int32_t stream_id, goto resp; } if (h2_session->resp){ + nghttp2_session_set_stream_user_data(session, stream_id, h2_session); /** todo:When the data of the reply is pushed as promised, there is no stream id at the reply end. to create it*/ goto finish; @@ -2447,7 +2448,7 @@ nghttp2_server_on_data_chunk_recv(nghttp2_session *session, uint8_t flags, req->event_cb(req, EV_HTTP_REQ_BODY_BEGIN, NULL, len, req->event_cb_user); } - if (flags == NGHTTP2_FLAG_END_STREAM) + if (flags & NGHTTP2_FLAG_END_STREAM) { req->h2_payload.flags = NGHTTP2_FLAG_NONE; }else @@ -2463,7 +2464,7 @@ nghttp2_server_on_data_chunk_recv(nghttp2_session *session, uint8_t flags, req->event_cb(req, EV_HTTP_REQ_BODY_CONT, data, len, req->event_cb_user); } - if (flags == NGHTTP2_FLAG_END_STREAM){ + if (flags & NGHTTP2_FLAG_END_STREAM){ req->h2_payload.flags = NGHTTP2_FLAG_NONE; }else{ req->h2_payload.flags = flags; |
