I am running a subversion server with access via http using webdav. I have noticed that when I access the repository with a browser, sometimes the pdf files in the repository show up as plain text (as if you viewed the pdf with a text editor like emacs, vim, or notepad) instead of being downloaded, or opened with some pdf reader. If you save the page, then open it with a pdf reader, it works fine. Any ideas why this might be happening? It seems to be somewhat browser dependent, and doesn't happen with all files. The file below seems to have this problem a lot though: http://robfelty.com/subversion/ling5200/slides/ling5200-all-notes.pdf
+1
A:
Maybe the file has the wrong mime type? It should be something like "application/octet-stream".
sbi
2009-10-30 14:45:17
+3
A:
Set the svn property svn:mime-type
to application/octed-stream
, or better yet to application/pdf
.
Stefan
2009-10-30 15:05:20
Thanks a bunch. That did the trick. Why doesn't apache do this automatically for subversion webdav stuff like it does for files in the normal file system?
Robert Felty
2009-11-02 01:36:42
It's the svn_mod_dav apache module that's responsible for this. And that module only uses the svn:mime-type properties and doesn't use the extension/mimetype config file.
Stefan
2009-11-03 15:09:13