sean Thanks for your response! I did some experimentation and the "Content-Encoding: 8bit" header does only appear on requests to certain files. It appears to be triggered by files that begin with ";;" (two semicolons) and do NOT end with a common extension like ".txt" or ".json". My files exhibiting the problem have ".lisp", but e.g. ".blah" also triggers the header.
Here is a minimal example file that triggers the header:
curl -D - http://api.example.com/ex/update/win64/data/lang/2.blah --output it.txt
Server: nginx
Date: Tue, 14 Jul 2026 14:02:39 GMT
Content-Type: text/plain
Content-Length: 63
Connection: keep-alive
Last-Modified: Tue, 14 Jul 2026 14:02:38 GMT
ETag: "4b-65692a8d6d78a"
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: 8bit
/ex/update/win64/data/lang/2.lisp
;; test test test test test test test test test test test test
Removing the last "test" stops the header from appearing, so there appears to be a minimum content length as well.
UPDATE: I was able to work around the problem by adding AddType text/plain .lisp to my .htaccess file. Still seems like a bug to me though, since "Content-Encoding: 8bit" is not part of http.