Page MenuHomePhabricator

Debian Stretch lighttpd does not allow overriding existing mimetype.assign values
Open, Stalled, LowestPublic

Description

Lighttpd 1.4.40 made overriding keys in an existing array a hard error. The Stretch version of lighttpd is 1.4.45. This change in the upstream application makes the advice at https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web/Lighttpd#Header,_mimetype,_character_encoding,_error_handler for replacing existing mime-type mappings with new local versions obsolete.


Prior to Debian I set the txt files on betacommand-dev to "".txt" => "text/plain;charset=UTF-8"," while the default config is '".txt" => "text/plain",'

This creates an issue with some UTF-8 files as web browsers render it as "Western" encoding

"Jean_Prouvé_(1981).jpg" is rendered as "Jean_Prouvé_(1981).jpg" See this report: https://tools.wmflabs.org/betacommand-dev/reports/Multichill_files.txt

This is an issue with Debian because I can no longer override the default setting, instead I get an error message about having a duplicate key.

Event Timeline

Reedy renamed this task from Debian Stretch lighttpd issue with txt file encoiding to Debian Stretch lighttpd issue with txt file encoding.Feb 9 2019, 8:37 PM
bd808 renamed this task from Debian Stretch lighttpd issue with txt file encoding to Debian Stretch lighttpd does not allow overriding existing mimetype.assign values.Feb 9 2019, 8:47 PM
bd808 updated the task description. (Show Details)

Change 489409 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[operations/software/tools-webservice@master] Set custom mime-types

https://gerrit.wikimedia.org/r/489409

Change 489409 merged by jenkins-bot:
[operations/software/tools-webservice@master] Set custom mime-types

https://gerrit.wikimedia.org/r/489409

Mentioned in SAL (#wikimedia-cloud) [2019-02-20T23:30:52Z] <zhuyifei1999_> begin rebuilding all docker images T178601 T193646 T215683

bd808 changed the task status from Open to Stalled.Feb 21 2019, 1:09 AM
bd808 triaged this task as Lowest priority.
bd808 edited projects, added Upstream; removed Patch-For-Review.

This is an upstream change, but we have now completed T178601: Add charset=utf-8 by default to lighttpd which at least tries to set some sane character encodings by default.

lighttpd.conf has allowed overridding values since lighttpd 1.4.46, released Oct 2017. e.g. mimetype.assign := ...