altsvc: Discard altsvc when it is received by server in earlier point
This commit is contained in:
parent
df56f55f84
commit
b924ef5fff
|
@ -4666,9 +4666,7 @@ int nghttp2_session_on_altsvc_received(nghttp2_session *session,
|
||||||
|
|
||||||
altsvc = frame->ext.payload;
|
altsvc = frame->ext.payload;
|
||||||
|
|
||||||
if (session->server) {
|
/* session->server case has been excluded */
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (frame->hd.stream_id == 0) {
|
if (frame->hd.stream_id == 0) {
|
||||||
if (altsvc->origin_len == 0) {
|
if (altsvc->origin_len == 0) {
|
||||||
|
@ -5567,6 +5565,12 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
|
||||||
iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
|
iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
|
||||||
iframe->frame.ext.payload = &iframe->ext_frame_payload.altsvc;
|
iframe->frame.ext.payload = &iframe->ext_frame_payload.altsvc;
|
||||||
|
|
||||||
|
if (session->server) {
|
||||||
|
busy = 1;
|
||||||
|
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (iframe->payloadleft < 2) {
|
if (iframe->payloadleft < 2) {
|
||||||
busy = 1;
|
busy = 1;
|
||||||
iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
|
iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
|
||||||
|
|
Loading…
Reference in New Issue