# Can nginx calculate the content-length header for fastcgi proxied requests

**URL:** <https://www.ruby-forum.com/t/can-nginx-calculate-the-content-length-header-for-fastcgi-proxied-requests/213185>\
**Category:** NGINX\
**Created:** [October 25, 2011, 11:10pm UTC](https://www.ruby-forum.com/t/can-nginx-calculate-the-content-length-header-for-fastcgi-proxied-requests/213185 "2011-10-25T23:10:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [October 25, 2011, 11:10pm UTC](https://www.ruby-forum.com/t/can-nginx-calculate-the-content-length-header-for-fastcgi-proxied-requests/213185/1 "2011-10-25T23:10:45Z")

</div>

i’m not sure whether this question even makes sense. i don’t know  
whether nginx is buffering responses that it receives from proxying  
requests to a fastcgi process or its streaming that back to the  
client.

but i would like to be able to have nginx calculate the content-length  
header for requests that are fastcgi\_pass-ed. couldn’t find anything  
online or in the documentation relating to this.

thanks!  
amb

---

<div class="post-metadata">

**Author:** ![bfsog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/71c47a/32.png) [@bfsog](https://www.ruby-forum.com/u/bfsog)\
**Post date:** [October 25, 2011, 11:29pm UTC](https://www.ruby-forum.com/t/can-nginx-calculate-the-content-length-header-for-fastcgi-proxied-requests/213185/2 "2011-10-25T23:29:54Z")

</div>

On Wed, Oct 26, 2011 at 12:09 AM, Andrew B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i’m not sure whether this question even makes sense. i don’t know  
> whether nginx is buffering responses that it receives from proxying  
> requests to a fastcgi process or its streaming that back to the  
> client.

> but i would like to be able to have nginx calculate the content-length  
> header for requests that are fastcgi\_pass-ed. couldn’t find anything  
> online or in the documentation relating to this.

Well, there is nothing to find. Nginx cannot do this.
