From: Jakub Narebski <jnareb@gmail.com>
To: Wincent Colaiuta <win@wincent.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [RFC/PATCH] gitweb: Try to sanitize mimetype for 'blob_plain' view
Date: Tue, 20 Nov 2007 11:58:04 +0100 [thread overview]
Message-ID: <200711201158.06029.jnareb@gmail.com> (raw)
In-Reply-To: <4BAE81C8-EFF3-473D-B243-B7D0F66F131B@wincent.com>
Wincent Colaiuta wrote:
> So yes, this is discarding information -- in a sense it is actually
> removing *correct* configuration from the server side to work around
> undesired behaviour on the client side -- but it gave the behaviour I
> wanted. So I think this patch is actually a good idea, because the
> behaviour (the user experience) is more important than adhering to a
> standard just because its a standard.
Modifying gitweb to work around not configured web browser and
mime.types not written for gitweb like in this RFC patch is one way of
solving this. Is it good way? That is why it is an RFC... well that
and details of sanitization.
Another would be to use mime.types crafted specially for gitweb, and use
it for $mimetypes_file (gitweb falls back to /etc/mime.types if it is
not defined or not present). This might be better solution.
QUESTION: Currently gitweb checks if $mimetypes_file is relative path
(using nonportable m!^/! instead of File::Spec::file_name_is_absolute),
and if it is then it is used as relative to project. Does anyone use
this feature to provide per-project mimetypes? Would perhaps using
relative path as-is (i.e. relative to gitweb script) be better
solution, and checking for gitweb.mimetypes repo configuration variable
for per-repo relative to project if relative?
--
Jakub Narebski
Poland
prev parent reply other threads:[~2007-11-20 10:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-19 14:54 [RFC/PATCH] gitweb: Try to sanitize mimetype for 'blob_plain' view Jakub Narebski
2007-11-20 8:07 ` Junio C Hamano
[not found] ` <4BAE81C8-EFF3-473D-B243-B7D0F66F131B@wincent.com>
2007-11-20 10:58 ` Jakub Narebski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711201158.06029.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=win@wincent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).