Project

General

Profile

Actions

Bug #801

closed

Lighttpd ignores Content-Type extattr

Added by Anonymous over 18 years ago. Updated over 16 years ago.

Status:
Invalid
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

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" )

-- erik.swanson


Files

xattr_mimetype_ktrace.txt (4.66 KB) xattr_mimetype_ktrace.txt Ktrace of lighttpd serving a request for wpad.dat -- erik.swanson Anonymous, 2006-10-09 16:06
Actions #1

Updated by jan over 18 years ago

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

Actions #2

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

I guess you didn't enable xattr while compiling: "--with-attr"

Actions #3

Updated by stbuehler over 16 years ago

  • Status changed from Fixed to Invalid
Actions

Also available in: Atom