It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 votes
Answer accepted

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

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
Community showcase
Posted in Data Center

Calling Community members who have upgraded to Data Center (or are thinking about it)

Hey Community, my name is Jacob and I’m a Product Marketing Manager on the Data Center team. We want to hear from you! We understand that the move to our Data Center products doesn’t happen overnight...

100 views 5 7
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you