Welcome! Log In Create A New Profile

Advanced

response body is mangled, contains headers

Posted by joeybones 
response body is mangled, contains headers
May 24, 2021 02:34PM
We have a node app running on port 3000 upstream of a nginx running in a Docker container on 80. (It's a simple passthrough from 80->3000). This has been working for a number of years until folks (locally) have upgraded from macOS 10.14 to 11.1 and we started to see an issue crop up where viewing the app on port 3000 in a browser is fine, but hitting the nginx server on 80 produces a strange effect:

1. The HTML body is output as plaintext, and also, strangely in chunks out of order and cut off (screenshot attached)
2. The body also contains HTTP headers as plaintext
3. nginx is reporting this in the console

2021/05/18 19:52:16 [error] 8#0: *1 upstream sent no valid HTTP/1.0 header while reading response header from upstream, client: [redacted], server: , request: "GET /my-path HTTP/1.1", upstream: "[redacted]:3000/my-path", host: [redacted]

We've tried the following things:
1. Upgrading nginx in the docker container
2. Upgrading the base image on the Docker container (was Centos6 now 7)
3. Upgrading Docker on the host machines
4. Disabling keepalive in the nginx conf
5. Dumping a number of http headers in the response but nginx still reports "no valid header"

Although this started occurring after an OS upgrade, I'm wondering if this can be solved with either nginx tuning or tuning on the node app. Any ideas as to what's going on are greatly appreciated.

Thanks!
Attachments:
open | download - nginxdump.png (497.2 KB)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 68
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready