https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292017-05-19T05:50:43ZRedmineRedmine - Feature #25357: "Raw view" of a file in repositoryhttps://www.redmine.org/issues/25357?journal_id=786932017-05-19T05:50:43ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/25999">Feature #25999</a>: View repository content by default (instead of the history)</i> added</li></ul> Redmine - Feature #25357: "Raw view" of a file in repositoryhttps://www.redmine.org/issues/25357?journal_id=786942017-05-19T06:02:36ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/18362">integrate-with-feature-25999@2x.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/18362/integrate-with-feature-25999@2x.png">integrate-with-feature-25999@2x.png</a> added</li></ul><p>I think we can integrate this feature with <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: View repository content by default (instead of the history) (Closed)" href="https://www.redmine.org/issues/25999">#25999</a>.</p>
<p><img src="https://www.redmine.org/attachments/download/18362/integrate-with-feature-25999@2x.png" srcset="https://www.redmine.org/attachments/download/18362/integrate-with-feature-25999@2x.png 2x" style="width: 360px;" alt="" /></p> Redmine - Feature #25357: "Raw view" of a file in repositoryhttps://www.redmine.org/issues/25357?journal_id=786952017-05-19T06:57:01ZVasili Korol
<ul></ul><p>Looks good!</p> Redmine - Feature #25357: "Raw view" of a file in repositoryhttps://www.redmine.org/issues/25357?journal_id=789412017-06-01T21:40:01ZMischa The Evil
<ul><li><strong>Target version</strong> set to <i>Unplanned backlogs</i></li></ul><p>This feature would be a very nice addition indeed. However, the by Go MAEDA proposed link location would conflict with <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: More visually consistent download links (Closed)" href="https://www.redmine.org/issues/26035">#26035</a>. I also don't think that it's a good idea to place the link in the contextual area too — like proposed for the download link in <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: More visually consistent download links (Closed)" href="https://www.redmine.org/issues/26035">#26035</a>, since it would clutter up that space with too many links IMHO.</p>
<p>@Go MAEDA: do you have actual code integrating such a 'raw view' or is it just a mockup?</p> Redmine - Feature #25357: "Raw view" of a file in repositoryhttps://www.redmine.org/issues/25357?journal_id=789422017-06-01T21:40:42ZMischa The Evil
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/26035">Feature #26035</a>: More visually consistent download links</i> added</li></ul> Redmine - Feature #25357: "Raw view" of a file in repositoryhttps://www.redmine.org/issues/25357?journal_id=789502017-06-02T03:52:06ZGo MAEDA
<ul></ul><p>Mischa The Evil wrote:</p>
<blockquote>
<p>@Go MAEDA: do you have actual code integrating such a 'raw view' or is it just a mockup?</p>
</blockquote>
<p>No, I have not wrote any code yet. The screenshot is just a rough sketch made with a developer tool of a web browser. I will be happy to see new ideas.</p> Redmine - Feature #25357: "Raw view" of a file in repositoryhttps://www.redmine.org/issues/25357?journal_id=789922017-06-02T16:51:49ZHolger Just
<ul></ul><p>When implementing this, we have to make sure to not introduce subtle security issues:</p>
<ul>
<li>All raw files have to be served either as <code>text/plain</code> for text files or <code>application/octet-stream</code> for binary files. Probably, we shouldn't even offer the raw display of binary files since they couldn't be meaningfully displayed by the browser anyway, but use the "download" option there instead.</li>
<li>We have to make sure that browsers don't attempt to guess the content type of the file on their own, using response headers like <code>X-Content-Type-Options: nosniff</code></li>
</ul>
<p>If we serve raw files with their own content types inline, we would re-introduce the problems previously fixed in <a class="changeset" title="Always send images user-uploaded images with Content-Disposition: attachment (#24199). Patch by ..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/16285">r16285</a>.</p>