Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,273
Community Members
 
Community Events
168
Community Groups

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

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

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
Community showcase
Published in Jira

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

205 views 1 6
Read article

Atlassian Community Events