<div dir="ltr">Hello,<div><br></div><div>I've noticed a recent change in behavior that occurred between releases 1.22.1 and 1.23.4, and I'm unable to find this particular change documented.</div><div><br></div><div>If an upstream proxy sends a response with duplicate Content-Length headers, both of the same value, nginx 1.22.1 allows the response to be sent to the client, removing the duplicate. However, nginx 1.23.4 (and 1.24.0) responds to the client with a 502. I did not explicitly test with any other versions.</div><div><br></div><div>I won't try to make any claims on the correctness of either behavior, but it is a change that may affect some workloads.</div><div><br></div><div>Here is an example response that exhibits the change:</div><div><br></div><div>"""</div><div>HTTP/1.1 200 OK</div><div>Server: http_tcp</div><div>Content-Length: 12</div><div>Content-Length: 12</div><div>Connection: Closed</div><div><br></div><div>Hello World\n<br></div><div>"""</div><div>------</div><div><br></div><div>jstimpson:[~/dev/c/nginx-1.22.1]: curl -i localhost<br>HTTP/1.1 200 OK<br>Server: nginx/1.22.1<br>Date: Wed, 19 Apr 2023 12:17:05 GMT<br>Content-Length: 12<br>Connection: keep-alive<br><br>Hello World<br></div><div><br></div><div>-----</div><div><br></div><div><br></div><div>jstimpson:[~/dev/c/nginx-1.23.4]: curl -i localhost<br>HTTP/1.1 502 Bad Gateway<br>Server: nginx/1.23.4<br>Date: Wed, 19 Apr 2023 12:13:09 GMT<br>Content-Type: text/html<br>Content-Length: 497<br>Connection: keep-alive<br>ETag: "643fd39e-1f1"<br></div><div><br></div><div>...<snip>...</div><div><br></div><div><br></div><div>---------</div><div><br></div><div>These tests were done with this simple config, the rest of the conf is defaults.</div><div><br></div><div>        location / {<br>            proxy_pass <a href="http://localhost:4040">http://localhost:4040</a>;<br></div><div>        }</div><div><br></div><div><br></div><div>Is this change intentional? Did I overlook it in the Changelog?</div><div><br></div><div>Thanks,</div><div>Jesse</div></div>