Reputation: 6423
I have checked in javadocs(html files) into svn. But, when I access the html files thru a browser, it gets interpreted as text. How, do I fix this ?
Upvotes: 14
Views: 6294
Reputation: 522
If you don't want to change the behaviour in general, you may be able to modify the mime type with your SVN client. E.g. for Tortoise SVN do the following:
This way you can define the behaviour per file which is sometimes very usefull.
Upvotes: 0
Reputation: 13327
SVN is not a webserver. I guess you are talking about Subversion's Apache module!? If you want to view .html files as HTML then you should set svn:mime-type=text/html
:
svn propset svn:mime-type text/html *.html
See Properties in the SVN Book.
Also, if the
svn:mime-type
property is set, then the Subversion Apache module will use its value to populate theContent-type:
HTTP header when responding to GET requests. This gives a crucial clue about how to display a file when perusing your repository with a web browser.
Maybe you can configure your subversion client or server with the following lines in the config file:
[miscellany]
### Automatic properties are defined in the section 'auto-props'.
enable-auto-props = yes
### Section for configuring automatic properties.
[auto-props]
*.html = svn:mime-type=text/html
This will automatically set the properties for new files.
Upvotes: 14