Ticket #801 (new defect)

Opened 2 years ago

Last modified 2 years ago

Lighttpd ignores Content-Type extattr

Reported by: erik.swanson@gmail.com Assigned to: jan
Priority: normal Milestone:
Component: core Version: 1.4.11
Severity: normal Keywords: mimetype.use-xattr mimetype use-xattr extattr freebsd
Cc: Blocking:
Need Feedback:

Description

The Problem

Lighttpd ignores the Content-Type extattr on a file ("wpad.dat") despite being set to use them.

$ getextattr user Content-Type wpad.dat 
wpad.dat        application/x-javascript-config
$ wget http://sabertooth.lan/wpad.dat
--18:39:59--  http://sabertooth.lan/wpad.dat
           => `wpad.dat'
Resolving sabertooth.lan... 10.0.0.1
Connecting to sabertooth.lan|10.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 186 [application/octet-stream]

100%[====================================>] 186           --.--K/s             

18:39:59 (8.45 MB/s) - `wpad.dat' saved [186/186]

My Configuration

$ uname -a
FreeBSD sabertooth.techpuppy.org 6.1-RELEASE-p3 FreeBSD 6.1-RELEASE-p3 #1: Sat Jul 29 21:43:24 UTC 2006     root@sabertooth.techpuppy.org:/usr/obj/usr/src/sys/SABERTOOTH  amd64
$ lighttpd -V
lighttpd-1.4.11 (ssl) - a light and fast webserver
Build-Date: Jul 29 2006 22:15:10

Event Handlers:

        + select (generic)
        + poll (Unix)
        - rt-signals (Linux 2.4+)
        - epoll (Linux 2.6)
        - /dev/poll (Solaris)
        + kqueue (FreeBSD)

Network handler:

        + sendfile

Features:

        + IPv6 support
        + zlib support
        + bzip2 support
        + crypt support
        - PAM support
        + SSL Support
        + PCRE support
        - mySQL support
        - LDAP support
        - memcached support
        - FAM support
        - LUA support
        - xml support
        - SQLite support
        - GDBM support
$ egrep -v '^#|^[[:space:]]*$' lighttpd.conf
server.modules              = (
                                "mod_access",
                                "mod_userdir",
                                "mod_compress",
                                "mod_accesslog" )
server.document-root        = "/usr/local/www/data/"
server.errorlog             = "/var/log/lighttpd/error.log"
index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm" )
server.event-handler = "freebsd-kqueue" # needed on OS X
mimetype.assign             = (
  ".pdf"          =>      "application/pdf",
  ".sig"          =>      "application/pgp-signature",
  ".spl"          =>      "application/futuresplash",
  ".class"        =>      "application/octet-stream",
  ".ps"           =>      "application/postscript",
  ".torrent"      =>      "application/x-bittorrent",
  ".dvi"          =>      "application/x-dvi",
  ".gz"           =>      "application/x-gzip",
  ".pac"          =>      "application/x-ns-proxy-autoconfig",
  ".swf"          =>      "application/x-shockwave-flash",
  ".tar.gz"       =>      "application/x-tgz",
  ".tgz"          =>      "application/x-tgz",
  ".tar"          =>      "application/x-tar",
  ".zip"          =>      "application/zip",
  ".mp3"          =>      "audio/mpeg",
  ".m3u"          =>      "audio/x-mpegurl",
  ".wma"          =>      "audio/x-ms-wma",
  ".wax"          =>      "audio/x-ms-wax",
  ".ogg"          =>      "application/ogg",
  ".wav"          =>      "audio/x-wav",
  ".gif"          =>      "image/gif",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
  ".xbm"          =>      "image/x-xbitmap",
  ".xpm"          =>      "image/x-xpixmap",
  ".xwd"          =>      "image/x-xwindowdump",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
  ".asc"          =>      "text/plain",
  ".c"            =>      "text/plain",
  ".cpp"          =>      "text/plain",
  ".log"          =>      "text/plain",
  ".conf"         =>      "text/plain",
  ".text"         =>      "text/plain",
  ".txt"          =>      "text/plain",
  ".dtd"          =>      "text/xml",
  ".xml"          =>      "text/xml",
  ".mpeg"         =>      "video/mpeg",
  ".mpg"          =>      "video/mpeg",
  ".mov"          =>      "video/quicktime",
  ".qt"           =>      "video/quicktime",
  ".avi"          =>      "video/x-msvideo",
  ".asf"          =>      "video/x-ms-asf",
  ".asx"          =>      "video/x-ms-asf",
  ".wmv"          =>      "video/x-ms-wmv",
  ".bz2"          =>      "application/x-bzip",
  ".tbz"          =>      "application/x-bzip-compressed-tar",
  ".tar.bz2"      =>      "application/x-bzip-compressed-tar"
 )
mimetype.use-xattr        = "enable"
accesslog.filename          = "/var/log/lighttpd/access.log"
url.access-deny             = ( "~", ".inc" )
$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable"
}
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
server.pid-file            = "/var/run/lighttpd.pid"
dir-listing.activate       = "enable"
server.username            = "www"
server.groupname           = "www"
userdir.path = "public_html"
userdir.exclude-user = ( "root", "toor", "nx", "parker" )

Attachments

xattr_mimetype_ktrace.txt (4.7 kB) - added by erik.swanson@gmail.com on 10/09/2006 04:06:10 PM.
Ktrace of lighttpd serving a request for wpad.dat

Change History

10/09/2006 11:53:14 AM changed by jan

can you attach a strace (see wiki on how to report a bug) for a single request on this file ?

10/09/2006 04:06:10 PM changed by erik.swanson@gmail.com

  • attachment xattr_mimetype_ktrace.txt added.

Ktrace of lighttpd serving a request for wpad.dat


Add/Change #801 (Lighttpd ignores Content-Type extattr)




Change Properties