Спасибо! У меня на тесте работает. следующее "решение" для passenger:
--- a/ext/nginx/ContentHandler.c.orig 2011-10-19 22:44:40.000000000 +0400
+++ b/ext/nginx/ContentHandler.c 2011-10-30 00:58:06.700129856 +0400
@@ -920,6 +920,7 @@
}
u = r->upstream;
+ u->headers_in.content_length_n = r->headers_out.content_length_n;
if (rc == NGX_HTTP_SCGI_PARSE_NO_HEADER) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
@@ -984,6 +985,7 @@
} state;
u = r->upstream;
+ u->headers_in.content_length_n = r->headers_out.content_length_n;
state = r->state;
@@ -1409,6 +1411,7 @@
/* Setup upstream stuff and prepare sending the request to the backend. */
u = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_t));
+ u->headers_in.content_length_n = r->headers_out.content_length_n;
if (u == NULL) {
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}