Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 406243

Summary: www-servers/thttpd - Default to application/octet-stream for unknown file types
Product: Gentoo Linux Reporter: Roc Vallès <vallesroc>
Component: [OLD] ServerAssignee: Anthony Basile <blueness>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch against thttpd-2.25b that changes default type to application/octet-stream
Patch against thttpd-2.25b that changes default type to application/octet-stream

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.