Quoting Peter Samuelson <peter_at_p12n.org>:
>> > Merge r36720 from trunk.
> [C. Michael Pilato]
>> Sorry if/that I missed the discussion, but how was
>> "application/octet-stream" chosen as the appropriate substitution here? In
>> Apache 2.2, DEFAULT_CONTENT_TYPE is set (by default) to "text/plain", and
>> the default value of DefaultType configuration directive is "text/plain".
>> Did this change in 2.4?
Yes. The DefaultType has been disabled in 2.3. This was discussed
over the course of a few years in Apache issue 13986.
The latest comment:
Roy T. Fielding 2009-01-30 11:26:55 PST
Fixed in trunk with rev 739382.
Disabled DefaultType directive and removed ap_default_type()
from core. We now exclude Content-Type from responses for which
a media type has not been configured via mime.types, AddType,
ForceType, or some other mechanism
I guess the mainstream browsers are taking the mime-type they're
> I didn't see any "discussion", but Greg's original log explains:
> | If we can't figure out a good mime type to use, then we'll default to
> | a bag o' bytes: application/octet-stream.
> Certainly application/octet-stream is a reasonable way to express "this
> is a byte stream that we don't know anything about". At the same time,
> it's reasonable for a web server to default to "text/plain", if it is
> serving mostly content that is viewable in a web browser.
> The question then is whether the content and expectations of a typical
> static HTTP root are significantly different from the content and
> expectations of a typical Subversion repository.
In olden times, if a file's svn:mime-type property was not set,
Subversion's mod_dav_svn set its mime-type to 'text/plain'.
In r14262 this was changed to let mod_mime attempt to set the
mime-type. The fallback was still 'text/plain'.
It was suggested to use Apache's ap_default_type() (IIUC, the
DefaultType directive) as the fallback, instead of 'text/plain'.
Recorded as issue 2304 and fixed for 1.5.0 in r22897.
In r36720 this was changed to use 'application/octet-stream' as the
fallback, because ap_default_type() is gone.
If I understand the Apache issue above, when mod_dav_svn is running
in Apache 2.3+, it shouldn't set a fallback mime-type. At least,
ideally it wouldn't. I don't suppose we have an equivalent to
APR_VERSION_AT_LEAST for Apache?
Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
Received on 2009-08-05 18:53:41 CEST