git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Lea Wiemann <lewiemann@gmail.com>
Subject: Re: [PATCH] gitweb: Add charset info to "raw" blob output
Date: Sun, 1 Jun 2008 14:16:56 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.1.10.0806011415270.4055@fbirervta.pbzchgretzou.qr> (raw)
In-Reply-To: <alpine.LNX.1.10.0806011413110.4055@fbirervta.pbzchgretzou.qr>


On Sunday 2008-06-01 14:15, Jan Engelhardt wrote:
>On Sunday 2008-06-01 13:06, Jakub Narebski wrote:
>>> +	# Type specific postprocessing can be added as needed...
>>> +	if ($mime =~ /^text\//i &&
>>> +	    $mime !~ /charset=/i && $default_text_plain_charset) {
>>> +		$mime .=  '; charset='.$default_text_plain_charset;
>>> +	}
>>> +
>>> +	return $mime;
>>
>>I'm not sure about it.  I worry a bit about text/html, which can, and
>>usually do, contain charset info inside the document.  I'm not sure
>>what happens when charset information from HTTP headers contradict
>>charset information from presented file.
>
>The HTTP header takes -- as stupid as it looks -- precedence
>over the HTML header. As such, a charset in the HTTP Response Header
>should ONLY be sent if the file is guaranteed to be text/plain only.

Minor correction; s/file/output/. gitweb normaly produces HTML for
all its normal views, so no Charset header here; but when it
outputs "raw", it should provide one.

  reply	other threads:[~2008-06-01 12:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 18:04 gitweb forgets to send utf8 header for raw blob views Jan Engelhardt
2008-05-29 11:32 ` Lea Wiemann
2008-05-30  8:18 ` Jakub Narebski
2008-05-31 11:27   ` [PATCH] gitweb: Add charset info to "raw" blob output Jakub Narebski
2008-05-31 18:22     ` Junio C Hamano
2008-06-01 11:06       ` Jakub Narebski
2008-06-01 12:15         ` Jan Engelhardt
2008-06-01 12:16           ` Jan Engelhardt [this message]
2008-06-03 14:47         ` [PATCH v2] gitweb: Add charset info to "raw" output of 'text/plain' blobs Jakub Narebski
2008-05-31 15:04   ` gitweb forgets to send utf8 header for raw blob views Jan Engelhardt
2008-05-31 22:39     ` Jakub Narebski
2008-06-01  2:08       ` Jan Engelhardt

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.1.10.0806011415270.4055@fbirervta.pbzchgretzou.qr \
    --to=jengelh@medozas.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=lewiemann@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).