# Response code 400 for prematurely closed connection

**URL:** <https://www.ruby-forum.com/t/response-code-400-for-prematurely-closed-connection/226179>\
**Category:** NGINX\
**Created:** [December 16, 2010, 11:22am UTC](https://www.ruby-forum.com/t/response-code-400-for-prematurely-closed-connection/226179 "2010-12-16T11:22:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![denis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@denis](https://www.ruby-forum.com/u/denis)\
**Post date:** [December 16, 2010, 11:22am UTC](https://www.ruby-forum.com/t/response-code-400-for-prematurely-closed-connection/226179/1 "2010-12-16T11:22:17Z")

</div>

Hello!

Please correct me if I’m wrong, but I noticed if you open and  
immediately close a TCP connection to HTTP port without sending any HTTP  
headers or anything, it ends up as  
xxx.xxx.xxx.xxx - - [16/Dec/2010:18:14:34 +0900] “-” 400 0 “-” “-”  
in accesslog. Not that it’s a huge problem, but it confuses our log  
analyser/statistics a bit.

Is there a way to disabled those log messages in this case or am I  
missing something here?

Many thanks!  
Denis.

Posted at Nginx Forum:

> **[Response code 400 for prematurely closed connection](https://forum.nginx.org/read.php?2,159071,159071#msg-159071)**
>
> Hello! Please correct me if I'm wrong, but I noticed if you open and immediately close a TCP connection to HTTP port without sending any HTTP headers or anything, it ends up as xxx.xxx.xxx.xxx - - \[16/Dec/2010:18:14:34 +0900\] "-" 400 0...
