[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Downloading a file using a web browser

From: Toby Johnson <toby_at_etjohnson.us>
Date: 2004-05-14 01:32:19 CEST

Carmela Stuart wrote:

> When I browse the repository using my web browser, the contents of a
> text file are rendered in my browser. Is there an easy way to have
> the file downloaded to my local machine from the server instead of
> rendering it in my browser using only my browser (without using the
> svn client directly).?
>
> Thanks,
>
> Carmela
>
>

When determining whether to display or download a file, your web browser
looks at its MIME type as reported by the server in the "Content-Type"
HTTP header. Assuming you're using Apache as your server, you can modify
Apache's config to send different MIME types for different files, and/or
use the "svn:mime-type" property
(http://svnbook.red-bean.com/svnbook/book.html#svn-ch-7-sect-2.3.2) of
individual files to tell Apache how to set the Content-Type header.

However, setting these to a non-text setting will cause Subversion to
treat these files as binary, which probably isn't what you want. I would
definitely look into having Apache override the MIME types for the
specific locations you're interested in.

toby
Received on Fri May 14 01:33:59 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.