comparison src/http/modules/ngx_http_proxy_module.c @ 6480:f01ab2dbcfdc

Fixed logging.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 31 Mar 2016 02:33:57 +0300
parents 91c8d990fb45
children 1d0e03db9f8e
comparison
equal deleted inserted replaced
6479:dc92298b1852 6480:f01ab2dbcfdc
1557 cl = in; 1557 cl = in;
1558 fl = ll; 1558 fl = ll;
1559 1559
1560 for ( ;; ) { 1560 for ( ;; ) {
1561 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 1561 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1562 "proxy output chunk: %d", ngx_buf_size(cl->buf)); 1562 "proxy output chunk: %O", ngx_buf_size(cl->buf));
1563 1563
1564 size += ngx_buf_size(cl->buf); 1564 size += ngx_buf_size(cl->buf);
1565 1565
1566 if (cl->buf->flush 1566 if (cl->buf->flush
1567 || cl->buf->sync 1567 || cl->buf->sync
1915 if (ctx == NULL) { 1915 if (ctx == NULL) {
1916 return NGX_ERROR; 1916 return NGX_ERROR;
1917 } 1917 }
1918 1918
1919 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 1919 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1920 "http proxy filter init s:%d h:%d c:%d l:%O", 1920 "http proxy filter init s:%ui h:%d c:%d l:%O",
1921 u->headers_in.status_n, ctx->head, u->headers_in.chunked, 1921 u->headers_in.status_n, ctx->head, u->headers_in.chunked,
1922 u->headers_in.content_length_n); 1922 u->headers_in.content_length_n);
1923 1923
1924 /* as per RFC2616, 4.4 Message Length */ 1924 /* as per RFC2616, 4.4 Message Length */
1925 1925
2123 2123
2124 return NGX_ERROR; 2124 return NGX_ERROR;
2125 } 2125 }
2126 2126
2127 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 2127 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
2128 "http proxy chunked state %d, length %d", 2128 "http proxy chunked state %ui, length %O",
2129 ctx->chunked.state, p->length); 2129 ctx->chunked.state, p->length);
2130 2130
2131 if (b) { 2131 if (b) {
2132 b->shadow = buf; 2132 b->shadow = buf;
2133 b->last_shadow = 1; 2133 b->last_shadow = 1;
2297 2297
2298 buf->last = buf->pos; 2298 buf->last = buf->pos;
2299 2299
2300 for (cl = u->out_bufs; cl; cl = cl->next) { 2300 for (cl = u->out_bufs; cl; cl = cl->next) {
2301 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 2301 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
2302 "http proxy in memory %p-%p %uz", 2302 "http proxy in memory %p-%p %O",
2303 cl->buf->pos, cl->buf->last, ngx_buf_size(cl->buf)); 2303 cl->buf->pos, cl->buf->last, ngx_buf_size(cl->buf));
2304 2304
2305 if (buf->last == cl->buf->pos) { 2305 if (buf->last == cl->buf->pos) {
2306 buf->last = cl->buf->last; 2306 buf->last = cl->buf->last;
2307 continue; 2307 continue;