Forum OpenACS Q&A: ns_returnz strips charset clause from Content-type: header

Greetings,

Apparently my blog has become rather popular, so popular that I am now concerned about hitting my bandwidth limit. So I enabled ns_returnz to gzip content sent out from AOLserver. In the process I discovered that when you use ns_returnz, the charset part of the content-type header gets stripped. This makes all the "funny characters" come back (c.f. my post at https://openacs.org/forums/message-view?message_id=185738).

Any ideas why this would happen? It looks like I would need to modify ns_returnz itself to fix this, but I'm not sure where the charset part of the content-type header gets set...

With gzip encoding OFF:

$ lynx -head -mime_header http://ncbt.org/family/abbyblog/index
HTTP/1.0 200 OK
Set-Cookie: ad_session_id=640001%2c0%2c0+%7b544+1086709244+3C9DAC425A80584DBCDFD10C55BF0AA24B48A6C5%7d; Path=/; Max-Age=1200
Expires: Tue, 08 Jun 2004 15:20:47 GMT
Pragma: no-cache
Cache-Control: no-cache
MIME-Version: 1.0
Date: Tue, 08 Jun 2004 15:20:47 GMT
Server: AOLserver/4.0
Content-Type: text/html; charset=utf-8
Content-Length: 113834
Connection: close

With gzip encoding ON:

lynx -head -mime_header http://ncbt.org/family/abbyblog/index
HTTP/1.0 200 OK
Set-Cookie: ad_session_id=650102%2c0%2c0+%7b869+1086710346+0FCEE738C75BBB5DE7CAC3A17EA7408B18826015%7d; Path=/; Max-Age=1200
Expires: Tue, 08 Jun 2004 15:39:07 GMT
Pragma: no-cache
Cache-Control: no-cache
Content-Encoding: gzip
MIME-Version: 1.0
Date: Tue, 08 Jun 2004 15:39:07 GMT
Server: AOLserver/4.0
Content-Type: text/html
Content-Length: 31350
Connection: close

(Note also the difference between Content-Length non-gzipped vs gzipped--it's almost 80% smaller!)

Jeff Davis said a while ago that he has version that fixes this bug.