Book Image

Lighttpd

By : Andre Bogus
Book Image

Lighttpd

By: Andre Bogus

Overview of this book

Table of Contents (20 chapters)
Lighttpd
Credits
About the Author
About the Reviewer
Preface
HTTP Status Codes

Mime Types


To give the client a hint of what to do with a file, the HTTP protocol defines that each file should be sent with a Mime type. A Mime type consists of a Content type and a subtype. The Content type is one of application, audio, example, image, message, model, multipart, text, and video. Subtypes can be registered with IANA by a Web form. The Internet Assigned Numbers Authority (IANA) maintains a list of mime types. Most Linux or BSD systems have a local list at /etc/mime.types. The authoritative list can be found at http://www.iana.org/assignments/media-types.

Note

All mime types

You can download a mime-types.py python script that uses the mime type module to create a mime type mapping suitable for inclusion in a Lighttpd configuration at http://packtpub.com/files/code/2103_Code.zip. Start the script with python mime-types.py and it writes a mime-types.conf file in the current directory.

If you do not have a python interpreter, get one from http://www.python.org.

For a single web...