]> granicus.if.org Git - cgit/commit
plain: don't append charset for binary MIME types
authorJohn Keeping <john@keeping.me.uk>
Sun, 6 Oct 2013 11:14:41 +0000 (12:14 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 8 Jan 2014 13:59:38 +0000 (14:59 +0100)
commit407f71cc061564d63b7358dd36a5bfebda05b15a
tree9691450ae35a95e27fe0ff9d782a84675cad7681
parentd76c438eada18cd3fd2980c9555f542cbe636479
plain: don't append charset for binary MIME types

When outputting the Content-Type HTTP header we print the MIME type and
then append "; charset=<charset>" if the charset variable is non-null.

We don't want a charset when we have selected "application/octet-stream"
or when the user has specified a custom MIME type, since they may have
specified their own charset.  To avoid this, make sure we set the page's
charset to NULL in ui-plain before we generate the HTTP headers.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
ui-plain.c