# Log Entire HTTP request (including body)

**URL:** <https://www.ruby-forum.com/t/log-entire-http-request-including-body/183780>\
**Category:** NGINX\
**Created:** [February 19, 2010, 11:38pm UTC](https://www.ruby-forum.com/t/log-entire-http-request-including-body/183780 "2010-02-19T23:38:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WSandrew\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d07c76/32.png) [@WSandrew\_L](https://www.ruby-forum.com/u/WSandrew_L)\
**Post date:** [February 19, 2010, 11:38pm UTC](https://www.ruby-forum.com/t/log-entire-http-request-including-body/183780/1 "2010-02-19T23:38:10Z")

</div>

I have flash clients POSTing file uploads to a cluster fronted by  
nginx. I see nginx logging 400 and 408 errors to these requests with a  
high frequency and would like to inspect the requests to be sure Flash  
isn’t sending malformed data.

What $http variable holds the entire request, and can I simply copy  
the buffered file easily? If there isn’t a single variable can I just  
log $http\_request\_headers and $http\_request\_body? I would setup a  
specific location for 400 and 408s so not every request would be  
logged.
