Latest update - 7566
This commit is contained in:
@@ -972,7 +972,8 @@ ngx_resolve_addr(ngx_resolver_ctx_t *ctx)
|
|||||||
|
|
||||||
name = ngx_resolver_dup(r, rn->name, rn->nlen);
|
name = ngx_resolver_dup(r, rn->name, rn->nlen);
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
goto failed;
|
ngx_resolver_free(r, ctx);
|
||||||
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->name.len = rn->nlen;
|
ctx->name.len = rn->nlen;
|
||||||
|
|||||||
+12
-64
@@ -1109,20 +1109,19 @@ ngx_http_v2_state_headers(ngx_http_v2_connection_t *h2c, u_char *pos,
|
|||||||
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
|
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
h2c->last_sid = h2c->state.sid;
|
|
||||||
|
|
||||||
h2c->state.pool = ngx_create_pool(1024, h2c->connection->log);
|
|
||||||
if (h2c->state.pool == NULL) {
|
|
||||||
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (depend == h2c->state.sid) {
|
if (depend == h2c->state.sid) {
|
||||||
ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
|
ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
|
||||||
"client sent HEADERS frame for stream %ui "
|
"client sent HEADERS frame for stream %ui "
|
||||||
"with incorrect dependency", h2c->state.sid);
|
"with incorrect dependency", h2c->state.sid);
|
||||||
|
|
||||||
status = NGX_HTTP_V2_PROTOCOL_ERROR;
|
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
|
||||||
goto rst_stream;
|
}
|
||||||
|
|
||||||
|
h2c->last_sid = h2c->state.sid;
|
||||||
|
|
||||||
|
h2c->state.pool = ngx_create_pool(1024, h2c->connection->log);
|
||||||
|
if (h2c->state.pool == NULL) {
|
||||||
|
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
|
h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
|
||||||
@@ -1851,28 +1850,7 @@ ngx_http_v2_state_priority(ngx_http_v2_connection_t *h2c, u_char *pos,
|
|||||||
"client sent PRIORITY frame for stream %ui "
|
"client sent PRIORITY frame for stream %ui "
|
||||||
"with incorrect dependency", h2c->state.sid);
|
"with incorrect dependency", h2c->state.sid);
|
||||||
|
|
||||||
node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 0);
|
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
|
||||||
|
|
||||||
if (node && node->stream) {
|
|
||||||
if (ngx_http_v2_terminate_stream(h2c, node->stream,
|
|
||||||
NGX_HTTP_V2_PROTOCOL_ERROR)
|
|
||||||
== NGX_ERROR)
|
|
||||||
{
|
|
||||||
return ngx_http_v2_connection_error(h2c,
|
|
||||||
NGX_HTTP_V2_INTERNAL_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (ngx_http_v2_send_rst_stream(h2c, h2c->state.sid,
|
|
||||||
NGX_HTTP_V2_PROTOCOL_ERROR)
|
|
||||||
== NGX_ERROR)
|
|
||||||
{
|
|
||||||
return ngx_http_v2_connection_error(h2c,
|
|
||||||
NGX_HTTP_V2_INTERNAL_ERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ngx_http_v2_state_complete(h2c, pos, end);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 1);
|
node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 1);
|
||||||
@@ -2263,41 +2241,11 @@ ngx_http_v2_state_window_update(ngx_http_v2_connection_t *h2c, u_char *pos,
|
|||||||
h2c->state.sid, window);
|
h2c->state.sid, window);
|
||||||
|
|
||||||
if (window == 0) {
|
if (window == 0) {
|
||||||
if (h2c->state.sid == 0) {
|
|
||||||
ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
|
|
||||||
"client sent WINDOW_UPDATE frame "
|
|
||||||
"with incorrect window increment 0");
|
|
||||||
|
|
||||||
return ngx_http_v2_connection_error(h2c,
|
|
||||||
NGX_HTTP_V2_PROTOCOL_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
|
ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
|
||||||
"client sent WINDOW_UPDATE frame for stream %ui "
|
"client sent WINDOW_UPDATE frame "
|
||||||
"with incorrect window increment 0", h2c->state.sid);
|
"with incorrect window increment 0");
|
||||||
|
|
||||||
node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 0);
|
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
|
||||||
|
|
||||||
if (node && node->stream) {
|
|
||||||
if (ngx_http_v2_terminate_stream(h2c, node->stream,
|
|
||||||
NGX_HTTP_V2_PROTOCOL_ERROR)
|
|
||||||
== NGX_ERROR)
|
|
||||||
{
|
|
||||||
return ngx_http_v2_connection_error(h2c,
|
|
||||||
NGX_HTTP_V2_INTERNAL_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (ngx_http_v2_send_rst_stream(h2c, h2c->state.sid,
|
|
||||||
NGX_HTTP_V2_PROTOCOL_ERROR)
|
|
||||||
== NGX_ERROR)
|
|
||||||
{
|
|
||||||
return ngx_http_v2_connection_error(h2c,
|
|
||||||
NGX_HTTP_V2_INTERNAL_ERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ngx_http_v2_state_complete(h2c, pos, end);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h2c->state.sid) {
|
if (h2c->state.sid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user