git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 20, 2007, 08:07 UTC
Message-ID
<7vlk8tl4pv.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1195484054-18164-1-git-send-email-jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 12 quoted lines
> 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 <jnareb@gmail.com>
> ---
> 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.

Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 3 in “gitweb: Try to sanitize mimetype for 'blob_plain' view”
  1. gitweb: Try to sanitize mimetype for 'blob_plain' viewJakub Narebski, Nov 19, 2007
  2. Junio C HamanoNov 20, 2007
  3. Jakub NarebskiNov 20, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.