Mercurial > hg > nginx
comparison src/http/ngx_http_huff_decode.c @ 9185:c458cd00bb0b
Adjusted Huffman coding debug logging, missed in 7977:336084ff943b.
Spotted by XingY Wang.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 14 Nov 2023 14:50:03 +0400 |
parents | 336084ff943b |
children |
comparison
equal
deleted
inserted
replaced
9184:7ec761f0365f | 9185:c458cd00bb0b |
---|---|
2655 | 2655 |
2656 if (ngx_http_huff_decode_bits(state, &ending, ch >> 4, dst) | 2656 if (ngx_http_huff_decode_bits(state, &ending, ch >> 4, dst) |
2657 != NGX_OK) | 2657 != NGX_OK) |
2658 { | 2658 { |
2659 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, log, 0, | 2659 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, log, 0, |
2660 "http2 huffman decoding error at state %d: " | 2660 "http huffman decoding error at state %d: " |
2661 "bad code 0x%Xd", *state, ch >> 4); | 2661 "bad code 0x%Xd", *state, ch >> 4); |
2662 | 2662 |
2663 return NGX_ERROR; | 2663 return NGX_ERROR; |
2664 } | 2664 } |
2665 | 2665 |
2666 if (ngx_http_huff_decode_bits(state, &ending, ch & 0xf, dst) | 2666 if (ngx_http_huff_decode_bits(state, &ending, ch & 0xf, dst) |
2667 != NGX_OK) | 2667 != NGX_OK) |
2668 { | 2668 { |
2669 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, log, 0, | 2669 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, log, 0, |
2670 "http2 huffman decoding error at state %d: " | 2670 "http huffman decoding error at state %d: " |
2671 "bad code 0x%Xd", *state, ch & 0xf); | 2671 "bad code 0x%Xd", *state, ch & 0xf); |
2672 | 2672 |
2673 return NGX_ERROR; | 2673 return NGX_ERROR; |
2674 } | 2674 } |
2675 } | 2675 } |
2676 | 2676 |
2677 if (last) { | 2677 if (last) { |
2678 if (!ending) { | 2678 if (!ending) { |
2679 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, | 2679 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, |
2680 "http2 huffman decoding error: " | 2680 "http huffman decoding error: " |
2681 "incomplete code 0x%Xd", ch); | 2681 "incomplete code 0x%Xd", ch); |
2682 | 2682 |
2683 return NGX_ERROR; | 2683 return NGX_ERROR; |
2684 } | 2684 } |
2685 | 2685 |