Mercurial > hg > nginx
view docs/xsls/changes.xsls @ 9229:28fbf78841dc
MIME: changed type for bmp to image/bmp.
At least Chrome, Safari, and Edge do no show image/x-ms-bmp when requested
directly (and instead show a download dialog), but do so for IANA-registered
MIME type image/bmp. Mozilla considers doing the same
(https://bugzilla.mozilla.org/show_bug.cgi?id=1422725).
Further, Apache uses image/bmp since the bmp extension was added to mime.types
in Apache 1.3.6 (and also used it at least since 1.3.0 in magic-based type
detection).
The bmp extensions with the image/x-ms-bmp type was added in 863:57cb2052dcc6
(nginx 0.4.14), as a part of a large mime.types change, and it is not clear
why image/x-ms-bmp was used instead of image/bmp.
As such, changed MIME type for bmp files to image/bmp.
Requested by Yuriy Izorkin.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 21 Mar 2024 22:50:11 +0300 |
parents | e79c7521aaf4 |
children |
line wrap: on
line source
X:stylesheet { X:output method="text"; X:param lang="'en'"; X:param configuration="'../xml/change_log_conf.xml'"; X:var conf = "document($configuration)/configuration"; X:var start = "$conf/start"; X:var indent = "$conf/indent"; X:var max = "$conf/length"; X:var br = {<br>} X:template = "/" { !! "change_log"; } X:template = "change_log" { !! "section"; } X:template = "section" { !! "changes"; } X:template = "changes" { X:text { } !{substring(concat($conf/changes[@lang=$lang]/title, ../@title, ' ', @ver, ' '), 1, $conf/changes[@lang=$lang]/length)} X:if "$lang='ru'" { !{substring(@date, 9, 2)} X:text {.} !{substring(@date, 6, 2)} X:text {.} !{substring(@date, 1, 4)} } X:if "$lang='en'" { !{substring(@date, 9, 2)} !{$conf/changes[@lang=$lang]/month[number(substring(current()/@date, 6, 2))]} !{substring(@date, 1, 4)} } X:text { } !! "change"; X:text { } } X:template = "change" { X:var prefix = "$conf/changes[@lang=$lang]/*[local-name(.)=current()/@type]" X:var postfix = { X:if "$prefix" { X:text {: } } } !! "para[@lang=$lang]" (prefix = "concat($start, $prefix, $postfix)"); } X:template para(prefix) = "para" { X:var text = { !!; } X:text { } !wrap(text = "normalize-space($text)", prefix = { X:if "position() = 1" { !{$prefix} } else { !{$indent} } }) } X:template wrap(text, prefix) { X:if "$text" { X:var offset = { X:choose { X:when "starts-with($text, concat($br, ' '))" { !{string-length($br) + 2} } X:when "starts-with($text, $br)" { !{string-length($br) + 1} } X:otherwise { 1 } } } X:var length = { !length(text = "substring($text, $offset)", prefix = "string-length($prefix)", length = "$max") } !{$prefix} !{normalize-space(translate(substring($text, $offset, $length), ' ', ' '))} X:text { } !wrap(text = "substring($text, $length + $offset)", prefix = "$indent") } } X:template length(text, prefix, length) { X:var break = "substring-before(substring($text, 1, $length - $prefix + string-length($br)), $br)" X:choose { X:when "$break" { !{string-length($break)} } X:when "$length = 0" { !{$max - $prefix} } X:when "string-length($text) + $prefix <= $length" { !{$length - $prefix} } X:when "substring($text, $length - $prefix + 1, 1) = ' '" { !{$length - $prefix + 1} } X:otherwise { !length(text = "$text", prefix = "$prefix", length = "$length - 1") } } } X:template = "at" {@} X:template = "br" { !{$br} } X:template = "nobr" { !{translate(., ' ', ' ')} } }