r854336 | sussman | 2005-04-17 02:38:01 +0000 (Sun, 17 Apr 2005)
Make autoversioning more friendly, by cooperating with httpd's mod_mime.
- let mod_mime attempt to set 'svn:mime-type' during an autoversioning PUT.
- let mod_mime attempt to set the Content-type: header when a
non-svn DAV client does a GET (and only when 'svn:mime-type' isn't set.)
In order to make the PUT part work, set 'ModMimeUsePathInfo on'.
In order to make the GET part work, set 'TypesConfig conf/mime.types'.
Patch by: C. Michael Pilato <cmpilato@collab.net>
me
Suggested by: Dorian Taylor <dorian@foobarsystems.com>
See issue #2049.
* subversion/mod_dav_svn/repos.c
(dav_svn_open_stream): if a file is created/changed via
autoversioning, then allow mod_mime to possibly set the
svn:mime-type property.
(dav_svn_set_headers): if retrieving a file for a non-svn DAV client
and no svn:mime-type is present, let mod_mime guess at the
content-type before returning 'text/plain'.
* subversion/mod_dav_svn/liveprops.c
(dav_svn_insert_prop): if retrieving a file for a non-svn DAV client
and no svn:mime-type is present, let mod_mime guess at the
content-type before returning 'text/plain'. Also, re-org the
mime-type handling code to better match what dav_svn_open_stream
is doing.