Mercurial > hg > nginx-quic
comparison src/http/v2/ngx_http_v2.c @ 6958:28dc369899ea
HTTP/2: style and typos.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
author | Piotr Sikora <piotrsikora@google.com> |
---|---|
date | Sun, 26 Mar 2017 01:25:01 -0700 |
parents | 83bae3d354ab |
children | cc823122d50d e532d397ca5e |
comparison
equal
deleted
inserted
replaced
6957:83bae3d354ab | 6958:28dc369899ea |
---|---|
939 | 939 |
940 size = end - pos; | 940 size = end - pos; |
941 | 941 |
942 if (size >= h2c->state.length) { | 942 if (size >= h2c->state.length) { |
943 size = h2c->state.length; | 943 size = h2c->state.length; |
944 stream->in_closed = h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG; | 944 stream->in_closed = h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG; |
945 } | 945 } |
946 | 946 |
947 r = stream->request; | 947 r = stream->request; |
948 | 948 |
949 if (r->request_body) { | 949 if (r->request_body) { |
1903 | 1903 |
1904 node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 0); | 1904 node = ngx_http_v2_get_node_by_id(h2c, h2c->state.sid, 0); |
1905 | 1905 |
1906 if (node == NULL || node->stream == NULL) { | 1906 if (node == NULL || node->stream == NULL) { |
1907 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, | 1907 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, |
1908 "unknown http2 stream"); | 1908 "unknown http2 stream"); |
1909 | 1909 |
1910 return ngx_http_v2_state_complete(h2c, pos, end); | 1910 return ngx_http_v2_state_complete(h2c, pos, end); |
1911 } | 1911 } |
1912 | 1912 |
1913 stream = node->stream; | 1913 stream = node->stream; |
2017 | 2017 |
2018 h2c->init_window = value; | 2018 h2c->init_window = value; |
2019 break; | 2019 break; |
2020 | 2020 |
2021 case NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING: | 2021 case NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING: |
2022 | |
2022 if (value > NGX_HTTP_V2_MAX_FRAME_SIZE | 2023 if (value > NGX_HTTP_V2_MAX_FRAME_SIZE |
2023 || value < NGX_HTTP_V2_DEFAULT_FRAME_SIZE) | 2024 || value < NGX_HTTP_V2_DEFAULT_FRAME_SIZE) |
2024 { | 2025 { |
2025 ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0, | 2026 ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0, |
2026 "client sent SETTINGS frame with incorrect " | 2027 "client sent SETTINGS frame with incorrect " |
3074 | 3075 |
3075 break; | 3076 break; |
3076 } | 3077 } |
3077 | 3078 |
3078 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | 3079 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, |
3079 "client sent unknown pseudo header \"%V\"", | 3080 "client sent unknown pseudo-header \":%V\"", |
3080 &header->name); | 3081 &header->name); |
3081 | 3082 |
3082 return NGX_DECLINED; | 3083 return NGX_DECLINED; |
3083 } | 3084 } |
3084 | 3085 |
3221 static ngx_int_t | 3222 static ngx_int_t |
3222 ngx_http_v2_parse_scheme(ngx_http_request_t *r, ngx_http_v2_header_t *header) | 3223 ngx_http_v2_parse_scheme(ngx_http_request_t *r, ngx_http_v2_header_t *header) |
3223 { | 3224 { |
3224 if (r->schema_start) { | 3225 if (r->schema_start) { |
3225 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | 3226 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, |
3226 "client sent duplicate :schema header"); | 3227 "client sent duplicate :scheme header"); |
3227 | 3228 |
3228 return NGX_DECLINED; | 3229 return NGX_DECLINED; |
3229 } | 3230 } |
3230 | 3231 |
3231 if (header->value.len == 0) { | 3232 if (header->value.len == 0) { |
3232 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | 3233 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, |
3233 "client sent empty :schema header"); | 3234 "client sent empty :scheme header"); |
3234 | 3235 |
3235 return NGX_DECLINED; | 3236 return NGX_DECLINED; |
3236 } | 3237 } |
3237 | 3238 |
3238 r->schema_start = header->value.data; | 3239 r->schema_start = header->value.data; |