Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Fisheye - How to access the raw file contents with a suitable content-type set

Martin Lichtin March 17, 2015

I understand a file can be accessed in "raw" mode via

 http://<fisheye-url-and-context>/browse/~raw,r=HEAD/<repository-name>/<full-file-path>

Now the problem I have with this is that the Content-Type is text/plain.

Is there a way to specify the content type, such that, for example, when the file is HTML,
then FishEye would return the contents with a Content-Type set to text/html?

3 answers

1 accepted

0 votes
Answer accepted
Felipe Kraemer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 19, 2015

Hi Martin,

I've reproduced this locally and discussed about this with our development team, and I was suggested to raise an improvement request so that this issue could be investigated further:

https://jira.atlassian.com/browse/FE-5581

Feel free to vote for the issue and/or leave a comment to describe your use-case in more detail. It will help our development team to build a solution that meets your needs.

If you want to know more about how we prioritise feature requests, take a look at our policy.

If this answer was helpful, please allow me to ask you to mark my answer as accepted in order to have it in the top of the thread, also helping other customers.

Thanks in advance!

Kind regards,
Felipe Kraemer

0 votes
Martin Lichtin March 18, 2015

Hi Felipe

I see the raw-mime.types file, it hasn't been modified and does contain the entry for html,htm file endings:

text/html                       html htm

And the file is called CHANGES.html so it should return the text/html content type. However, it doesn't, I can see when checking with curl that Fisheye returns

Content-Type: text/plain;charset=UTF-8

It's a Git repository. Fisheye version 3.1.3.

 

0 votes
Felipe Kraemer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2015

Hello Martin,

According to the FISHEYE_HOME/raw-mime.types file, this should be happening already. Unless you've modified anything in this file, when the file extension is 'html' or 'htm' the file MIME type should be 'text/html'.

Can you check that the extension of the file you're trying to see really is 'html' or 'htm'?

Also, the file MIME type can be coming from your repository. Do you use SVN by any chance? FishEye uses the SVN properties to fetch the MIME type. The command executed by FishEye is:

svn propget svn:mime-type http://svnrepourl/path/to/file.ext

The output might be different from 'text/html' for that specific file, causing the issue, because the MIME type of the file in the repository takes precedence to what's configured in the FISHEYE_HOME/raw-mime.types file.

If this answer was helpful, please allow me to ask you to mark my answer as accepted in order to have it in the top of the thread, also helping other customers.

Thanks in advance!

Kind regards,
Felipe Kraemer

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events