Bug#904741: lighttpd: create-mime.assign.pl skips mime types with capital letters

2018-07-29 Thread Stefan Bühler
Hi,

this was fixed upstream (in 1.4.36) a long time ago, see:

  
https://github.com/lighttpd/lighttpd1.4/commit/8db141a1b30e5808679e1f341c6ca914be91bed8

We imported the script from debian and extended it heavily.

The debian package is still using the original debian one.

cheers,
Stefan

On 07/27/2018 02:16 PM, chrysn wrote:
> Package: lighttpd
> Version: 1.4.49-1.1
> Severity: normal
> Tags: patch
> 
> The create-mime.assign.pl script can only read mime types without
> capital letters from /etc/mime.types, thus reporting files like .ts or
> .m3u8 as application/octet-stream instead of video/MP2T and
> application/x-mpegURL, respectively.
> 
> The attached patch fixes the issue by accepting capital letters in;
> [^\s] would be an alternative depending on the precise definition of the
> mime.types file.
> 
> Best regards, and thank you for maintaining this package
> chrysn



Bug#904741: lighttpd: create-mime.assign.pl skips mime types with capital letters

2018-07-27 Thread chrysn
Package: lighttpd
Version: 1.4.49-1.1
Severity: normal
Tags: patch

The create-mime.assign.pl script can only read mime types without
capital letters from /etc/mime.types, thus reporting files like .ts or
.m3u8 as application/octet-stream instead of video/MP2T and
application/x-mpegURL, respectively.

The attached patch fixes the issue by accepting capital letters in;
[^\s] would be an alternative depending on the precise definition of the
mime.types file.

Best regards, and thank you for maintaining this package
chrysn

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.16.0-0.bpo.2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages lighttpd depends on:
ii  libattr11:2.4.47-2+b2
ii  libbz2-1.0  1.0.6-8.1
ii  libc6   2.27-3
ii  libfam0 2.7.0-17.2+b1
ii  libldap-2.4-2   2.4.46+dfsg-5
ii  libmariadbclient18  1:10.1.29-6+b1
ii  libpcre32:8.39-9
ii  libssl1.1   1.1.0h-4
ii  lsb-base9.20170808
ii  mime-support3.61
ii  zlib1g  1:1.2.11.dfsg-1

Versions of packages lighttpd recommends:
ii  spawn-fcgi  1.6.4-2

Versions of packages lighttpd suggests:
pn  apache2-utils  
pn  lighttpd-doc   
ii  openssl1.1.0h-4
pn  php-cgi
pn  rrdtool

-- Configuration Files:
/etc/lighttpd/lighttpd.conf changed [not included]

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/lighttpd/create-mime.assign.pl (from lighttpd 
package)

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom
--- a/create-mime.assign.pl  2018-07-27 14:00:49.0 +0200
+++ b/create-mime.assign.pl   2018-07-27 14:00:23.0 +0200
@@ -7,7 +7,7 @@
   chomp;
   s/\#.*//;
   next if /^\w*$/;
-  if(/^([a-z0-9\/+-.]+)\s+((?:[a-z0-9.+-]+[ ]?)+)$/) {
+  if(/^([a-zA-Z0-9\/+-.]+)\s+((?:[a-z0-9.+-]+[ ]?)+)$/) {
 foreach(split / /, $2) {
   # mime.types can have same extension for different
   # mime types


signature.asc
Description: PGP signature