Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

[PATCH] Fix "$upstream_response_length" for upstream requests with buffering off

$
0
0
Hey,
the value of "$upstream_response_length" variable is being incorrectly
reported as "0" for upstream requests with buffering off.

Attached patch fixes this.

Best regards,
Piotr Sikora


diff -r 482fda984556 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Wed Apr 10 17:07:44 2013 +0000
+++ b/src/http/ngx_http_upstream.c Wed Apr 10 21:29:59 2013 -0700
@@ -3307,7 +3307,7 @@
u->state->response_sec = tp->sec - u->state->response_sec;
u->state->response_msec = tp->msec - u->state->response_msec;

- if (u->pipe) {
+ if (u->pipe->read_length) {
u->state->response_length = u->pipe->read_length;
}
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>