Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC/PATCH] gitweb: Try to sanitize mimetype for 'blob_plain' view

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:52

Jakub Narebski [off-list ref] writes:
Use 'text/plain' for files which are text and can be viewed in a
browser, and are not among a few 'text/*' mimetypes universally
recognized by web browsers.  This means files with 'text/*' which are
not text/html, text/css, text/sgml or text/xml, and files with
'application/x-*' mimetype which are nevertheless text: javascript,
shell, Perl, Tcl, (La)TeX,...

Signed-off-by: Jakub Narebski <redacted>
---
Tired of my web browser (Mozilla) asking me what I want to do with
shell script, Perl script or LaTeX document when using 'blob_plain'
(raw) view,...
I admit that I share the irritation, but I've felt that solving
it this way by discarding information is going backwards, and
the kosher solution is to tell the browser what to do with these
unknown mimetypes.  Unfortunately this needs to be done by the
user -- I do not think the server can.

On the other hand, maybe the people who are browsing the plain
view from the browser do not need to have the content marked as
written in what programming language.  I dunno.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help