Pdf gets mangled when accessing subversion repository via apache webdav
Question
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
Solution
Set the svn property svn:mime-type
to application/octed-stream
, or better yet to application/pdf
.
OTHER TIPS
Maybe the file has the wrong mime type? It should be something like "application/octet-stream".