git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alp Toker <alp@atoker.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: Send XHTML as 'application/xhtml+xml' where possible
Date: Sun, 09 Jul 2006 12:18:12 +0100	[thread overview]
Message-ID: <44B0E5F4.3000604@atoker.com> (raw)
In-Reply-To: <7vwtanm5eb.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
>> It falls back to 'text/html' even if the user agent claims to support
>> 'application/xhtml+xml' by means of a glob in order to work around an
>> insidious Internet Explorer bug.
> 
> I do not care much about IE, but...

That makes the two of us. Still, it's probably worth not blocking out IE 
in case the need arises to check up on repositories from internet cafes 
when on holiday or the like.

>> +	my $content_type = ($cgi->http('HTTP_ACCEPT') =~ m/(,|;|\s|^)application\/xhtml\+xml(,|;|\s|$)/ && $cgi->Accept('application/xhtml+xml') ne 0) ? 'application/xhtml+xml' : 'text/html';
> 
> 1. I would prefer something like this to be written with if-else,
>    not with a conditional expression;

Indeed, this line is a bit unwieldy. Will break it out.

> 2. The "by means of a glob" hack needs to be left as a comment
>    in the code to say why;

Good plan.

> 3. Did you really mean to say "ne 0"?

Well spotted. String comparison works, but != would be more sensible.

A revised patch is in the works.

  reply	other threads:[~2006-07-09 11:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-09  9:41 [PATCH] gitweb: Send XHTML as 'application/xhtml+xml' where possible Alp Toker
2006-07-09 10:36 ` Junio C Hamano
2006-07-09 11:18   ` Alp Toker [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-07-09 14:55 Alp Toker
2006-07-11 10:19 [PATCH] Typo fix Alp Toker
2006-07-11 10:19 ` [PATCH] gitweb: Send XHTML as 'application/xhtml+xml' where possible Alp Toker

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=44B0E5F4.3000604@atoker.com \
    --to=alp@atoker.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).