Headers at the html page

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;
proxy_http_version 1.1;
}
}

Where http://localhost:8080 is my cowboy web server. When i’m openning:
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
github: 0xAX https://github.com/

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs