# Headers at the html page

**URL:** <https://www.ruby-forum.com/t/headers-at-the-html-page/237682>\
**Category:** NGINX\
**Created:** [November 23, 2013, 7:48pm UTC](https://www.ruby-forum.com/t/headers-at-the-html-page/237682 "2013-11-23T19:48:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [November 23, 2013, 7:48pm UTC](https://www.ruby-forum.com/t/headers-at-the-html-page/237682/1 "2013-11-23T19:48:40Z")

</div>

Hello All,

I have erlang web application with cowboy web server and i launched it  
behind nginx reverse proxy.

My nginx configuration:

server {  
listen 9090;

location /test {  
proxy\_pass [http://localhost:8080](http://localhost:8080);  
proxy\_http\_version 1.1;  
}  
}

Where [http://localhost:8080](http://localhost:8080) is my cowboy web server. When i’m openning:  
[http://localhost:8080/test](http://localhost:8080/test) i see my html page, it’s ok,

Browser shows response headers:

Transfer-Encoding:chunked

Server:nginx/1.2.6 (Ubuntu)

Content-Type:text/html

Content-Encoding:gzip

Connection:keep-alive

It’s normal, but… I see the following string right on the my html  
page:

“HTTP/1.1 204 No Content connection: close server: Cowboy  
content-length: 0”

Why nginx adds this string with headers to the html page? And it occurs  
only if i set up Content-Type: text/html header.

Thank you.

–  
best regards,

twitter: @0xAX [https://twitter.com/0xAX](https://twitter.com/0xAX)  
github: 0xAX [https://github.com/](https://github.com/)

---

<div class="post-metadata">

**Author:** ![Alex\_toyer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@Alex\_toyer](https://www.ruby-forum.com/u/Alex_toyer)\
**Post date:** [November 25, 2013, 3:21pm UTC](https://www.ruby-forum.com/t/headers-at-the-html-page/237682/2 "2013-11-25T15:21:01Z")

</div>

Hello!

On Sun, Nov 24, 2013 at 12:47:57AM +0600, Alex toyer wrote:

> location /test {  
> Transfer-Encoding:chunked
> 
> “HTTP/1.1 204 No Content connection: close server: Cowboy content-length: 0”
> 
> Why nginx adds this string with headers to the html page? And it occurs  
> only if i set up Content-Type: text/html header.

Looks like your backend returns malformed response for some  
reason. You may try digging further into what your backend  
returns.

–  
Maxim D.  
[http://nginx.org/en/donation.html](http://nginx.org/en/donation.html)
