Friday, March 5, 2010

Hosting html files on Google Code SVN

By default, the file is served with HTTP header Content-type: text/plain

To change it to text/html so that the client's web browser renders it,

1. Checkout your SVN repo.
2. svn propset svn:mime-type 'text/html' somehtmlfile.html
3. Commit


PNG image files (and other binary files in SVN) are served with Content-type: application/octet-stream .
So for a PNG image replace step 2 above with:
svn propset svn:mime-type 'image/png' file.png