Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2.c @ 7108:2bf605c6edf7
HTTP/2: shortened some debug log messages.
This ensures slightly more readable debug logs on 80-character-wide
terminals.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 14 Sep 2017 19:06:06 +0300 |
parents | d77407baccd1 |
children | b6dc472299da |
comparison
equal
deleted
inserted
replaced
7107:d4b031cf32cf | 7108:2bf605c6edf7 |
---|---|
746 pos += NGX_HTTP_V2_FRAME_HEADER_SIZE; | 746 pos += NGX_HTTP_V2_FRAME_HEADER_SIZE; |
747 | 747 |
748 type = ngx_http_v2_parse_type(head); | 748 type = ngx_http_v2_parse_type(head); |
749 | 749 |
750 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, | 750 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, |
751 "process http2 frame type:%ui f:%Xd l:%uz sid:%ui", | 751 "http2 frame type:%ui f:%Xd l:%uz sid:%ui", |
752 type, h2c->state.flags, h2c->state.length, h2c->state.sid); | 752 type, h2c->state.flags, h2c->state.length, h2c->state.sid); |
753 | 753 |
754 if (type >= NGX_HTTP_V2_FRAME_STATES) { | 754 if (type >= NGX_HTTP_V2_FRAME_STATES) { |
755 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, | 755 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, |
756 "http2 frame with unknown type %ui", type); | 756 "http2 frame with unknown type %ui", type); |
1314 | 1314 |
1315 return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); | 1315 return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); |
1316 } | 1316 } |
1317 | 1317 |
1318 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, | 1318 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0, |
1319 "http2 hpack %s string length: %i", | 1319 "http2 %s string, len:%i", |
1320 huff ? "encoded" : "raw", len); | 1320 huff ? "encoded" : "raw", len); |
1321 | 1321 |
1322 h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx, | 1322 h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx, |
1323 ngx_http_v2_module); | 1323 ngx_http_v2_module); |
1324 | 1324 |
1569 if (header->name.data[0] == ':') { | 1569 if (header->name.data[0] == ':') { |
1570 rc = ngx_http_v2_pseudo_header(r, header); | 1570 rc = ngx_http_v2_pseudo_header(r, header); |
1571 | 1571 |
1572 if (rc == NGX_OK) { | 1572 if (rc == NGX_OK) { |
1573 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1573 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1574 "http2 pseudo-header: \":%V: %V\"", | 1574 "http2 header: \":%V: %V\"", |
1575 &header->name, &header->value); | 1575 &header->name, &header->value); |
1576 | 1576 |
1577 return ngx_http_v2_state_header_complete(h2c, pos, end); | 1577 return ngx_http_v2_state_header_complete(h2c, pos, end); |
1578 } | 1578 } |
1579 | 1579 |
1645 goto error; | 1645 goto error; |
1646 } | 1646 } |
1647 } | 1647 } |
1648 | 1648 |
1649 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1649 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1650 "http2 http header: \"%V: %V\"", | 1650 "http2 header: \"%V: %V\"", |
1651 &header->name, &header->value); | 1651 &header->name, &header->value); |
1652 | 1652 |
1653 return ngx_http_v2_state_header_complete(h2c, pos, end); | 1653 return ngx_http_v2_state_header_complete(h2c, pos, end); |
1654 | 1654 |
1655 error: | 1655 error: |
3373 p = ngx_cpymem(p, r->unparsed_uri.data, r->unparsed_uri.len); | 3373 p = ngx_cpymem(p, r->unparsed_uri.data, r->unparsed_uri.len); |
3374 | 3374 |
3375 ngx_memcpy(p, ending, sizeof(ending)); | 3375 ngx_memcpy(p, ending, sizeof(ending)); |
3376 | 3376 |
3377 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 3377 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
3378 "http2 http request line: \"%V\"", &r->request_line); | 3378 "http2 request line: \"%V\"", &r->request_line); |
3379 | 3379 |
3380 return NGX_OK; | 3380 return NGX_OK; |
3381 } | 3381 } |
3382 | 3382 |
3383 | 3383 |