Mercurial > hg > nginx
comparison src/http/ngx_http_spdy.c @ 5903:571e66f7c12c
SPDY: improved debug logging of inflate() calls.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Fri, 07 Nov 2014 17:19:12 +0300 |
parents | 234c5ecb00c0 |
children | abb466a57a22 |
comparison
equal
deleted
inserted
replaced
5902:b7a37f6a25ea | 5903:571e66f7c12c |
---|---|
1063 | 1063 |
1064 z = sc->zstream_in.avail_in ? inflate(&sc->zstream_in, Z_NO_FLUSH) | 1064 z = sc->zstream_in.avail_in ? inflate(&sc->zstream_in, Z_NO_FLUSH) |
1065 : Z_OK; | 1065 : Z_OK; |
1066 } | 1066 } |
1067 | 1067 |
1068 if (z != Z_OK) { | |
1069 return ngx_http_spdy_state_inflate_error(sc, z); | |
1070 } | |
1071 | |
1072 ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1068 ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1073 "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d", | 1069 "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d", |
1074 sc->zstream_in.next_in, sc->zstream_in.next_out, | 1070 sc->zstream_in.next_in, sc->zstream_in.next_out, |
1075 sc->zstream_in.avail_in, sc->zstream_in.avail_out, | 1071 sc->zstream_in.avail_in, sc->zstream_in.avail_out, |
1076 z); | 1072 z); |
1073 | |
1074 if (z != Z_OK) { | |
1075 return ngx_http_spdy_state_inflate_error(sc, z); | |
1076 } | |
1077 | 1077 |
1078 sc->length -= sc->zstream_in.next_in - pos; | 1078 sc->length -= sc->zstream_in.next_in - pos; |
1079 pos = sc->zstream_in.next_in; | 1079 pos = sc->zstream_in.next_in; |
1080 | 1080 |
1081 buf->last = sc->zstream_in.next_out; | 1081 buf->last = sc->zstream_in.next_out; |
1162 /* one byte is reserved for null-termination */ | 1162 /* one byte is reserved for null-termination */ |
1163 sc->zstream_in.avail_out = buf->end - buf->last - 1; | 1163 sc->zstream_in.avail_out = buf->end - buf->last - 1; |
1164 | 1164 |
1165 z = inflate(&sc->zstream_in, Z_NO_FLUSH); | 1165 z = inflate(&sc->zstream_in, Z_NO_FLUSH); |
1166 | 1166 |
1167 ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | |
1168 "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d", | |
1169 sc->zstream_in.next_in, sc->zstream_in.next_out, | |
1170 sc->zstream_in.avail_in, sc->zstream_in.avail_out, | |
1171 z); | |
1172 | |
1167 if (z != Z_OK) { | 1173 if (z != Z_OK) { |
1168 return ngx_http_spdy_state_inflate_error(sc, z); | 1174 return ngx_http_spdy_state_inflate_error(sc, z); |
1169 } | 1175 } |
1170 | 1176 |
1171 sc->length -= sc->zstream_in.next_in - pos; | 1177 sc->length -= sc->zstream_in.next_in - pos; |
1262 while (sc->zstream_in.avail_in) { | 1268 while (sc->zstream_in.avail_in) { |
1263 sc->zstream_in.next_out = buffer; | 1269 sc->zstream_in.next_out = buffer; |
1264 sc->zstream_in.avail_out = NGX_SPDY_SKIP_HEADERS_BUFFER_SIZE; | 1270 sc->zstream_in.avail_out = NGX_SPDY_SKIP_HEADERS_BUFFER_SIZE; |
1265 | 1271 |
1266 n = inflate(&sc->zstream_in, Z_NO_FLUSH); | 1272 n = inflate(&sc->zstream_in, Z_NO_FLUSH); |
1273 | |
1274 ngx_log_debug5(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0, | |
1275 "spdy inflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d", | |
1276 sc->zstream_in.next_in, sc->zstream_in.next_out, | |
1277 sc->zstream_in.avail_in, sc->zstream_in.avail_out, | |
1278 n); | |
1267 | 1279 |
1268 if (n != Z_OK) { | 1280 if (n != Z_OK) { |
1269 return ngx_http_spdy_state_inflate_error(sc, n); | 1281 return ngx_http_spdy_state_inflate_error(sc, n); |
1270 } | 1282 } |
1271 } | 1283 } |