Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406243 - www-servers/thttpd - Default to application/octet-stream for unknown file types
Summary: www-servers/thttpd - Default to application/octet-stream for unknown file types
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-02-29 05:47 UTC by Roc Vallès
Modified: 2012-03-24 03:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against thttpd-2.25b that changes default type to application/octet-stream (thttpd_default_mime_octet-stream.patch,447 bytes, text/plain)
2012-02-29 05:47 UTC, Roc Vallès
Details
Patch against thttpd-2.25b that changes default type to application/octet-stream (thttpd_default_mime_octet-stream.patch,470 bytes, patch)
2012-02-29 05:55 UTC, Roc Vallès
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roc Vallès 2012-02-29 05:47:58 UTC
Created attachment 303675 [details]
Patch against thttpd-2.25b that changes default type to application/octet-stream

By default, thttpd does serve all content it can't recognise as text/plain. This will cause webbrowsers to display garbage when trying to download any file that isn't plain text and has a file extension that thttpd doesn't recognise.

The attached patch changes that to application/octet-stream, which doesn't have that problem. This is the behaviour of most other web servers, and can reasonably be considered the expected behaviour.

Patch is by myself and applies against thttpd-2.25b.
Comment 1 Roc Vallès 2012-02-29 05:55:38 UTC
Created attachment 303677 [details, diff]
Patch against thttpd-2.25b that changes default type to application/octet-stream
Comment 2 Anthony Basile gentoo-dev 2012-03-24 03:01:22 UTC
Fixed in thttpd-2.25b-r9.  Please reopen if this is still a problem.