0

I've created the site under /volume1/web/MyWeb and created a custom Nginx configuration under /etc/nginx/conf.d, but I cannot configure it to prevent "Transfer-Encoding: chunked" header in the response.

I must configure it in this way, because I'm migrating this microsite from another Zyxel NAS with and old PHP (5.x), and it will call from a microcontroller with HTTP/1.1 and expects a non-chunked response. Unfortunately I cannot change the microcontroller's code.

I tested, if I call this site with HTTP/1.0, the response is correct, un-chunked. Also tested, if I respond with a static file (not a PHP script), that response is also un-chunked.

But if I write a PHP file with only an 'echo' in it, the response will be chunked. I've tried many PHP configs, Nginx settings, but nothing work.

Which is the correct way/configuration for this?

IMSoP
  • 89,526
  • 13
  • 117
  • 169
  • It's entirely possible that there isn't a way, short of downgrading the request to HTTP/1.0 somewhere - understanding `Transfer-Encoding: chunked` is a requirement for all HTTP/1.1 clients according to the spec, so servers might well use it unconditionally. – IMSoP May 09 '23 at 10:04

0 Answers0