Hi, I need to send back a redirect for a specific location. This is easy but I need the reply to the client to be encoded as chuncked. This is because we have a client with a firmware that only understands chunked content and expects a chunked encoding for each reply it gets.
The usual redirect comes as
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Thu, 21 Sep 2023 14:53:13 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive
Location: https://xxx.yyy.zzz/redirectme
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
With the content-length header.
Is it possible to force the use of a chunked encoding in this case? I searched for some way to limit the size of body chunks, thinking to use something like 16 to force chunking, but I only see configurations involving proxied configurations and for data streams.
I need to chunk a 3xx reply.
Is it even possible to send back to the client a pre-canned reply, including headers? In this way I'll prepare the static reply as is always the same, and I'll include also the (fake) chunked encoding.
Thanks