Latest update - 9095

This commit is contained in:
2023-05-19 16:40:20 +09:00
parent 162c842011
commit c54353987b
26 changed files with 17 additions and 2030 deletions
+4 -87
View File
@@ -1159,10 +1159,7 @@ ngx_http_v3_parse_control(ngx_connection_t *c, ngx_http_v3_parse_control_t *st,
sw_first_type,
sw_type,
sw_length,
sw_cancel_push,
sw_settings,
sw_max_push_id,
sw_goaway,
sw_skip
};
@@ -1212,6 +1209,10 @@ ngx_http_v3_parse_control(ngx_connection_t *c, ngx_http_v3_parse_control_t *st,
return NGX_HTTP_V3_ERR_FRAME_UNEXPECTED;
}
if (st->type == NGX_HTTP_V3_FRAME_CANCEL_PUSH) {
return NGX_HTTP_V3_ERR_ID_ERROR;
}
st->state = sw_length;
break;
@@ -1233,22 +1234,10 @@ ngx_http_v3_parse_control(ngx_connection_t *c, ngx_http_v3_parse_control_t *st,
switch (st->type) {
case NGX_HTTP_V3_FRAME_CANCEL_PUSH:
st->state = sw_cancel_push;
break;
case NGX_HTTP_V3_FRAME_SETTINGS:
st->state = sw_settings;
break;
case NGX_HTTP_V3_FRAME_MAX_PUSH_ID:
st->state = sw_max_push_id;
break;
case NGX_HTTP_V3_FRAME_GOAWAY:
st->state = sw_goaway;
break;
default:
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http3 parse skip unknown frame");
@@ -1257,30 +1246,6 @@ ngx_http_v3_parse_control(ngx_connection_t *c, ngx_http_v3_parse_control_t *st,
break;
case sw_cancel_push:
ngx_http_v3_parse_start_local(b, &loc, st->length);
rc = ngx_http_v3_parse_varlen_int(c, &st->vlint, &loc);
ngx_http_v3_parse_end_local(b, &loc, &st->length);
if (st->length == 0 && rc == NGX_AGAIN) {
return NGX_HTTP_V3_ERR_FRAME_ERROR;
}
if (rc != NGX_DONE) {
return rc;
}
rc = ngx_http_v3_cancel_push(c, st->vlint.value);
if (rc != NGX_OK) {
return rc;
}
st->state = sw_type;
break;
case sw_settings:
ngx_http_v3_parse_start_local(b, &loc, st->length);
@@ -1303,54 +1268,6 @@ ngx_http_v3_parse_control(ngx_connection_t *c, ngx_http_v3_parse_control_t *st,
break;
case sw_max_push_id:
ngx_http_v3_parse_start_local(b, &loc, st->length);
rc = ngx_http_v3_parse_varlen_int(c, &st->vlint, &loc);
ngx_http_v3_parse_end_local(b, &loc, &st->length);
if (st->length == 0 && rc == NGX_AGAIN) {
return NGX_HTTP_V3_ERR_FRAME_ERROR;
}
if (rc != NGX_DONE) {
return rc;
}
rc = ngx_http_v3_set_max_push_id(c, st->vlint.value);
if (rc != NGX_OK) {
return rc;
}
st->state = sw_type;
break;
case sw_goaway:
ngx_http_v3_parse_start_local(b, &loc, st->length);
rc = ngx_http_v3_parse_varlen_int(c, &st->vlint, &loc);
ngx_http_v3_parse_end_local(b, &loc, &st->length);
if (st->length == 0 && rc == NGX_AGAIN) {
return NGX_HTTP_V3_ERR_FRAME_ERROR;
}
if (rc != NGX_DONE) {
return rc;
}
rc = ngx_http_v3_goaway(c, st->vlint.value);
if (rc != NGX_OK) {
return rc;
}
st->state = sw_type;
break;
case sw_skip:
rc = ngx_http_v3_parse_skip(b, &st->length);