# $request\_header\_length and $request\_body\_length?

**URL:** <https://www.ruby-forum.com/t/request-header-length-and-request-body-length/245736>\
**Category:** NGINX\
**Created:** [July 9, 2013, 4:20am UTC](https://www.ruby-forum.com/t/request-header-length-and-request-body-length/245736 "2013-07-09T04:20:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [July 9, 2013, 4:20am UTC](https://www.ruby-forum.com/t/request-header-length-and-request-body-length/245736/1 "2013-07-09T04:20:51Z")

</div>

Hello,

I am trying to diagnose a weird 408 error problem on nginx.

My theory is that the client might be using some kind of crack making  
the  
request body too short for Content-Length header, so nginx waits more  
data  
and ultimately fails at 60 seconds timeout.

I tried to add few more log options, like $content\_length and  
$request\_length, however, the $request\_length includes all the header  
and  
body length, thus can not get actuall body length.

Does nginx provide variables like $request\_header\_length and  
$request\_body\_length?

Thanks in advance!

Posted at Nginx Forum:

> **[$request\_header\_length and $request\_body\_length?](https://forum.nginx.org/read.php?2,240681,240681#msg-240681)**
>
> Hello, I am trying to diagnose a weird 408 error problem on nginx. My theory is that the client might be using some kind of crack making the request body too short for Content-Length header, so nginx waits more data and ultimately fails at 60 seconds...

---

<div class="post-metadata">

**Author:** ![est](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/74df32/32.png) [@est](https://www.ruby-forum.com/u/est)\
**Post date:** [July 9, 2013, 2:03pm UTC](https://www.ruby-forum.com/t/request-header-length-and-request-body-length/245736/2 "2013-07-09T14:03:58Z")

</div>

Hello!

On Mon, Jul 08, 2013 at 10:20:08PM -0400, est wrote:

> body length, thus can not get actuall body length.
> 
> Does nginx provide variables like $request\_header\_length and  
> $request\_body\_length?

No, there is no such variables.

For debugging purposes there is debug log provided, see  
[A debugging log](http://nginx.org/en/docs/debugging_log.html).

–  
Maxim D.

> **[nginx: donation](http://nginx.org/en/donation.html)**
