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

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 vote

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 vote

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

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.

 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

499 views 6 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you