* gitweb not friendly to firefox?
@ 2007-03-01 10:57 Li Yang-r58472
2007-03-01 11:34 ` Andy Parkins
2007-03-01 13:34 ` Raimund Bauer
0 siblings, 2 replies; 29+ messages in thread
From: Li Yang-r58472 @ 2007-03-01 10:57 UTC (permalink / raw)
To: git
Hi,
I'm using gitweb from latest git tree. I can't view any objects with my
firefox browser, but it works ok with my IE. The error is like this:
XML Parsing Error: not well-formed
Location:
http://10.193.20.133/gitweb/?p=linux-2.6.git;a=commit;h=c0051ec763eca4c1
adfcb8d461243d0a7b444bb7
Line Number 43, Column 38:<tr><td>author</td><td>Li Yang
<LeoLi@freescale.com></td></tr>
-------------------------------------^
Would it be anything wrong with my gitweb configuration or apache setup?
Thanks,
Leo
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: gitweb not friendly to firefox?
2007-03-01 10:57 gitweb not friendly to firefox? Li Yang-r58472
@ 2007-03-01 11:34 ` Andy Parkins
2007-03-01 11:54 ` Li Yang-r58472
2007-03-01 11:56 ` Junio C Hamano
2007-03-01 13:34 ` Raimund Bauer
1 sibling, 2 replies; 29+ messages in thread
From: Andy Parkins @ 2007-03-01 11:34 UTC (permalink / raw)
To: git; +Cc: Li Yang-r58472
On Thursday 2007 March 01 10:57, Li Yang-r58472 wrote:
> XML Parsing Error: not well-formed
> Location:
> http://10.193.20.133/gitweb/?p=linux-2.6.git;a=commit;h=c0051ec763eca4c1
> adfcb8d461243d0a7b444bb7
> Line Number 43, Column 38:<tr><td>author</td><td>Li Yang
> <LeoLi@freescale.com></td></tr>
> -------------------------------------^
>
>
> Would it be anything wrong with my gitweb configuration or apache setup?
When I've had errors like that in the past it has been because:
a) Firefox installation corrupt; try running with a new profile
(firefox -ProfileManager)
b) Firefox has been upgraded but you haven't restarted it since.
c) An extension is incompatible with your current version, but doesn't know
it
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: gitweb not friendly to firefox?
2007-03-01 11:34 ` Andy Parkins
@ 2007-03-01 11:54 ` Li Yang-r58472
2007-03-01 11:56 ` Junio C Hamano
1 sibling, 0 replies; 29+ messages in thread
From: Li Yang-r58472 @ 2007-03-01 11:54 UTC (permalink / raw)
To: Andy Parkins, git
> -----Original Message-----
> From: Andy Parkins [mailto:andyparkins@gmail.com]
> Sent: Thursday, March 01, 2007 7:34 PM
> To: git@vger.kernel.org
> Cc: Li Yang-r58472
> Subject: Re: gitweb not friendly to firefox?
>
> On Thursday 2007 March 01 10:57, Li Yang-r58472 wrote:
>
> > XML Parsing Error: not well-formed
> > Location:
> >
http://10.193.20.133/gitweb/?p=linux-2.6.git;a=commit;h=c0051ec763eca4c1
> > adfcb8d461243d0a7b444bb7
> > Line Number 43, Column 38:<tr><td>author</td><td>Li Yang
> > <LeoLi@freescale.com></td></tr>
> > -------------------------------------^
> >
> >
> > Would it be anything wrong with my gitweb configuration or apache
setup?
>
> When I've had errors like that in the past it has been because:
> a) Firefox installation corrupt; try running with a new profile
> (firefox -ProfileManager)
I have reinstalled my firefox and updated to 2.0.0.2
> b) Firefox has been upgraded but you haven't restarted it since.
It is restarted.
> c) An extension is incompatible with your current version, but
doesn't know
> it
I have disabled all the add-ons
And the problem still exists. :(
- Leo
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: gitweb not friendly to firefox?
2007-03-01 11:34 ` Andy Parkins
2007-03-01 11:54 ` Li Yang-r58472
@ 2007-03-01 11:56 ` Junio C Hamano
1 sibling, 0 replies; 29+ messages in thread
From: Junio C Hamano @ 2007-03-01 11:56 UTC (permalink / raw)
To: Andy Parkins; +Cc: git, Li Yang-r58472
Andy Parkins <andyparkins@gmail.com> writes:
> On Thursday 2007 March 01 10:57, Li Yang-r58472 wrote:
>
>> XML Parsing Error: not well-formed
>> Location:
>> http://10.193.20.133/gitweb/?p=linux-2.6.git;a=commit;h=c0051ec763eca4c1
>> adfcb8d461243d0a7b444bb7
>> Line Number 43, Column 38:<tr><td>author</td><td>Li Yang
>> <LeoLi@freescale.com></td></tr>
>> -------------------------------------^
>>
>>
>> Would it be anything wrong with my gitweb configuration or apache setup?
>
> When I've had errors like that in the past it has been because:
> a) Firefox installation corrupt; try running with a new profile
> (firefox -ProfileManager)
> b) Firefox has been upgraded but you haven't restarted it since.
> c) An extension is incompatible with your current version, but doesn't know
> it
I've seen another one.
d) gitweb does not like your name (your name is not encoded in
UTF-8 while gitweb incorrectly assumes it is), and spits out
malformed output.
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: gitweb not friendly to firefox?
2007-03-01 10:57 gitweb not friendly to firefox? Li Yang-r58472
2007-03-01 11:34 ` Andy Parkins
@ 2007-03-01 13:34 ` Raimund Bauer
2007-03-01 14:00 ` Eygene Ryabinkin
1 sibling, 1 reply; 29+ messages in thread
From: Raimund Bauer @ 2007-03-01 13:34 UTC (permalink / raw)
To: 'Li Yang-r58472', git
> XML Parsing Error: not well-formed
> Location:
>
http://10.193.20.133/gitweb/?p=linux-2.6.git;a=commit;h=c0051ec763eca4c1adfc
b8d461243d0a7b444bb7
> Line Number 43, Column 38:<tr><td>author</td><td>Li Yang
<LeoLi@freescale.com></td></tr> -------------------------------------^
Try to save the output and verify it with some other xml-parser. The
"<LeoLi@freescale.com>" seems to be the culprit here, since "@" is no
allowed character for a xml-tag, and there maybe is some html-escaping of
the email address missing?
> Would it be anything wrong with my gitweb configuration or apache setup?
I think IE just chooses to ignore the error.
> Thanks,
> Leo
--
best regards
Ray
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: gitweb not friendly to firefox?
2007-03-01 13:34 ` Raimund Bauer
@ 2007-03-01 14:00 ` Eygene Ryabinkin
2007-03-01 14:26 ` Raimund Bauer
2007-03-02 2:28 ` Li Yang-r58472
0 siblings, 2 replies; 29+ messages in thread
From: Eygene Ryabinkin @ 2007-03-01 14:00 UTC (permalink / raw)
To: Raimund Bauer; +Cc: 'Li Yang-r58472', git
> > Line Number 43, Column 38:<tr><td>author</td><td>Li Yang
> <LeoLi@freescale.com></td></tr> -------------------------------------^
>
> Try to save the output and verify it with some other xml-parser. The
> "<LeoLi@freescale.com>" seems to be the culprit here, since "@" is no
> allowed character for a xml-tag, and there maybe is some html-escaping of
> the email address missing?
I think that the situation is simpler: <LeoLi@....> is taken as the
XML/HTML tag and it
- does not closed anywhere,
- has the wrong syntax, since "@" and "." can not live inside the
tag name if memory serves me right.
The proper thing is to replace "<" with "<" and ">" with ">".
--
Eygene
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: gitweb not friendly to firefox?
2007-03-01 14:00 ` Eygene Ryabinkin
@ 2007-03-01 14:26 ` Raimund Bauer
2007-03-02 2:28 ` Li Yang-r58472
1 sibling, 0 replies; 29+ messages in thread
From: Raimund Bauer @ 2007-03-01 14:26 UTC (permalink / raw)
To: 'Eygene Ryabinkin'; +Cc: 'Li Yang-r58472', git
> I think that the situation is simpler: <LeoLi@....> is taken
> as the XML/HTML tag and it
> - does not closed anywhere,
> - has the wrong syntax, since "@" and "." can not live inside
> the tag name if memory serves me right.
>
> The proper thing is to replace "<" with "<" and ">" with ">".
Yes ... I should learn to write out what I mean and not only hint at it ;-)
--
best regards
Ray
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: gitweb not friendly to firefox?
2007-03-01 14:00 ` Eygene Ryabinkin
2007-03-01 14:26 ` Raimund Bauer
@ 2007-03-02 2:28 ` Li Yang-r58472
2007-03-02 4:40 ` Junio C Hamano
1 sibling, 1 reply; 29+ messages in thread
From: Li Yang-r58472 @ 2007-03-02 2:28 UTC (permalink / raw)
To: rea-git, Raimund Bauer; +Cc: git
> -----Original Message-----
> From: rea-git@codelabs.ru [mailto:rea-git@codelabs.ru]
> Sent: Thursday, March 01, 2007 10:01 PM
> To: Raimund Bauer
> Cc: Li Yang-r58472; git@vger.kernel.org
> Subject: Re: gitweb not friendly to firefox?
>
> > > Line Number 43, Column 38:<tr><td>author</td><td>Li Yang
> > <LeoLi@freescale.com></td></tr>
-------------------------------------^
> >
> > Try to save the output and verify it with some other xml-parser. The
> > "<LeoLi@freescale.com>" seems to be the culprit here, since "@" is
no
> > allowed character for a xml-tag, and there maybe is some
html-escaping of
> > the email address missing?
>
> I think that the situation is simpler: <LeoLi@....> is taken as the
> XML/HTML tag and it
> - does not closed anywhere,
> - has the wrong syntax, since "@" and "." can not live inside the
> tag name if memory serves me right.
>
> The proper thing is to replace "<" with "<" and ">" with ">".
Yes, you are right. But why gitweb didn't do that for me? I observed
that some early version of gitweb doesn't have this problem. Is it
possible that some new change caused this?
- Leo
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: gitweb not friendly to firefox?
2007-03-02 2:28 ` Li Yang-r58472
@ 2007-03-02 4:40 ` Junio C Hamano
2007-03-02 6:47 ` Li Yang-r58472
0 siblings, 1 reply; 29+ messages in thread
From: Junio C Hamano @ 2007-03-02 4:40 UTC (permalink / raw)
To: Li Yang-r58472; +Cc: rea-git, Raimund Bauer, git
"Li Yang-r58472" <LeoLi@freescale.com> writes:
>> The proper thing is to replace "<" with "<" and ">" with ">".
>
> Yes, you are right. But why gitweb didn't do that for me? I observed
> that some early version of gitweb doesn't have this problem. Is it
> possible that some new change caused this?
It's very possible.
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: gitweb not friendly to firefox?
2007-03-02 4:40 ` Junio C Hamano
@ 2007-03-02 6:47 ` Li Yang-r58472
2007-03-02 6:51 ` Junio C Hamano
0 siblings, 1 reply; 29+ messages in thread
From: Li Yang-r58472 @ 2007-03-02 6:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: rea-git, Raimund Bauer, git
> -----Original Message-----
> From: Junio C Hamano [mailto:junkio@cox.net]
> Sent: Friday, March 02, 2007 12:41 PM
> To: Li Yang-r58472
> Cc: rea-git@codelabs.ru; Raimund Bauer; git@vger.kernel.org
> Subject: Re: gitweb not friendly to firefox?
>
> "Li Yang-r58472" <LeoLi@freescale.com> writes:
>
> >> The proper thing is to replace "<" with "<" and ">" with ">".
> >
> > Yes, you are right. But why gitweb didn't do that for me? I
observed
> > that some early version of gitweb doesn't have this problem. Is it
> > possible that some new change caused this?
>
> It's very possible.
Well, I had found out that the escapeHTML() is not functioning on my
server. It leaves the "<", ">", "@" unchanged. Does anyone have a clue
about it? I'm using Redhat 9.0 full installation.
- Leo
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: gitweb not friendly to firefox?
2007-03-02 6:47 ` Li Yang-r58472
@ 2007-03-02 6:51 ` Junio C Hamano
2007-03-02 9:36 ` Li Yang-r58472
0 siblings, 1 reply; 29+ messages in thread
From: Junio C Hamano @ 2007-03-02 6:51 UTC (permalink / raw)
To: Li Yang-r58472; +Cc: rea-git, Raimund Bauer, git, Jakub Narebski
"Li Yang-r58472" <LeoLi@freescale.com> writes:
>> > Yes, you are right. But why gitweb didn't do that for me? I
> observed
>> > that some early version of gitweb doesn't have this problem. Is it
>> > possible that some new change caused this?
>>
>> It's very possible.
>
> Well, I had found out that the escapeHTML() is not functioning on my
> server. It leaves the "<", ">", "@" unchanged. Does anyone have a clue
> about it? I'm using Redhat 9.0 full installation.
I am not sure offhand if escapeHTML implementation is wrong or
the call site is calling escapeHTML when it should be using some
other kinds of escape.
The person who knows about this issue the best, if I have to
guess, would be Jakub Narebski.
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: gitweb not friendly to firefox?
2007-03-02 6:51 ` Junio C Hamano
@ 2007-03-02 9:36 ` Li Yang-r58472
2007-03-02 10:17 ` Junio C Hamano
0 siblings, 1 reply; 29+ messages in thread
From: Li Yang-r58472 @ 2007-03-02 9:36 UTC (permalink / raw)
To: Junio C Hamano, Jakub Narebski; +Cc: rea-git, Raimund Bauer, git
Hi Jakub,
Problem sovled, using the following patch. I'm not an expert of perl,
so I don't know if it is problem of the gitweb or problem with my perl
environment. My environment is perl-5.8.0 and perl-CGI-2.81.
Signed-off-by: Li Yang<leoli@freecale.com>
---
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 653ca3c..8c9a291 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -591,7 +591,7 @@ sub esc_html ($;%) {
my %opts = @_;
$str = to_utf8($str);
- $str = escapeHTML($str);
+ $str = $cgi->escapeHTML($str);
if ($opts{'-nbsp'}) {
$str =~ s/ / /g;
}
> -----Original Message-----
> From: Junio C Hamano [mailto:junkio@cox.net]
> Sent: Friday, March 02, 2007 2:51 PM
> To: Li Yang-r58472
> Cc: rea-git@codelabs.ru; Raimund Bauer; git@vger.kernel.org; Jakub
Narebski
> Subject: Re: gitweb not friendly to firefox?
>
> "Li Yang-r58472" <LeoLi@freescale.com> writes:
>
> >> > Yes, you are right. But why gitweb didn't do that for me? I
> > observed
> >> > that some early version of gitweb doesn't have this problem. Is
it
> >> > possible that some new change caused this?
> >>
> >> It's very possible.
> >
> > Well, I had found out that the escapeHTML() is not functioning on my
> > server. It leaves the "<", ">", "@" unchanged. Does anyone have a
clue
> > about it? I'm using Redhat 9.0 full installation.
>
> I am not sure offhand if escapeHTML implementation is wrong or
> the call site is calling escapeHTML when it should be using some
> other kinds of escape.
>
> The person who knows about this issue the best, if I have to
> guess, would be Jakub Narebski.
>
^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: gitweb not friendly to firefox?
2007-03-02 9:36 ` Li Yang-r58472
@ 2007-03-02 10:17 ` Junio C Hamano
2007-03-02 10:27 ` Li Yang-r58472
2007-03-02 16:19 ` (Re: gitweb not friendly to firefox?) and unusable in the lynx Oleg Verych
0 siblings, 2 replies; 29+ messages in thread
From: Junio C Hamano @ 2007-03-02 10:17 UTC (permalink / raw)
To: Li Yang-r58472; +Cc: Jakub Narebski, rea-git, Raimund Bauer, git
"Li Yang-r58472" <LeoLi@freescale.com> writes:
> Hi Jakub,
>
> Problem sovled, using the following patch. I'm not an expert of perl,
> so I don't know if it is problem of the gitweb or problem with my perl
> environment. My environment is perl-5.8.0 and perl-CGI-2.81.
>
> Signed-off-by: Li Yang<leoli@freecale.com>
> ---
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 653ca3c..8c9a291 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -591,7 +591,7 @@ sub esc_html ($;%) {
> my %opts = @_;
>
> $str = to_utf8($str);
> - $str = escapeHTML($str);
> + $str = $cgi->escapeHTML($str);
> if ($opts{'-nbsp'}) {
> $str =~ s/ / /g;
> }
>
This is puzzling....
(1) we have two call sites of escapeHTML(), but your patch
touches only one.
(2) we do "use CGI qw(:standard :escapeHTML -nosticky);"
upfront, presumably after doing this when we say
escapeHTML() it means the same as CGI::escapeHTML().
(3) we do "$cgi = new CGI" upfront.
So I am wondering how the patch can have any effect...
I am not saying that I do not believe you when you say the patch
fixes the problem for you. I just do not understand why and I
hate not knowing why something works.
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: gitweb not friendly to firefox?
2007-03-02 10:17 ` Junio C Hamano
@ 2007-03-02 10:27 ` Li Yang-r58472
2007-03-02 16:19 ` (Re: gitweb not friendly to firefox?) and unusable in the lynx Oleg Verych
1 sibling, 0 replies; 29+ messages in thread
From: Li Yang-r58472 @ 2007-03-02 10:27 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jakub Narebski, rea-git, Raimund Bauer, git
> -----Original Message-----
> From: Junio C Hamano [mailto:junkio@cox.net]
> Sent: Friday, March 02, 2007 6:18 PM
> To: Li Yang-r58472
> Cc: Jakub Narebski; rea-git@codelabs.ru; Raimund Bauer;
git@vger.kernel.org
> Subject: Re: gitweb not friendly to firefox?
>
> "Li Yang-r58472" <LeoLi@freescale.com> writes:
>
> > Hi Jakub,
> >
> > Problem sovled, using the following patch. I'm not an expert of
perl,
> > so I don't know if it is problem of the gitweb or problem with my
perl
> > environment. My environment is perl-5.8.0 and perl-CGI-2.81.
> >
> > Signed-off-by: Li Yang<leoli@freecale.com>
> > ---
> > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> > index 653ca3c..8c9a291 100755
> > --- a/gitweb/gitweb.perl
> > +++ b/gitweb/gitweb.perl
> > @@ -591,7 +591,7 @@ sub esc_html ($;%) {
> > my %opts = @_;
> >
> > $str = to_utf8($str);
> > - $str = escapeHTML($str);
> > + $str = $cgi->escapeHTML($str);
> > if ($opts{'-nbsp'}) {
> > $str =~ s/ / /g;
> > }
> >
>
> This is puzzling....
>
> (1) we have two call sites of escapeHTML(), but your patch
> touches only one.
>
> (2) we do "use CGI qw(:standard :escapeHTML -nosticky);"
> upfront, presumably after doing this when we say
> escapeHTML() it means the same as CGI::escapeHTML().
>
> (3) we do "$cgi = new CGI" upfront.
>
> So I am wondering how the patch can have any effect...
>
> I am not saying that I do not believe you when you say the patch
> fixes the problem for you. I just do not understand why and I
> hate not knowing why something works.
Here is the phenomenon I observed. In CGI.pm,
# Escape HTML -- used internally
'escapeHTML' => <<'END_OF_FUNC',
sub escapeHTML {
# hack to work around earlier hacks
push @_,$_[0] if @_==1 && $_[0] eq 'CGI';
my ($self,$toencode,$newlinestoo) = CGI::self_or_default(@_);
return undef unless defined($toencode);
return $toencode if ref($self) && !$self->{'escape'};
$toencode =~ s{&}{&}gso;
$toencode =~ s{<}{<}gso;
$toencode =~ s{>}{>}gso;
$toencode =~ s{"}{"}gso;
my $latin = uc $self->{'.charset'} eq 'ISO-8859-1' ||
uc $self->{'.charset'} eq 'WINDOWS-1252';
if ($latin) { # bug in some browsers
$toencode =~ s{'}{'}gso;
$toencode =~ s{\x8b}{‹}gso;
$toencode =~ s{\x9b}{›}gso;
if (defined $newlinestoo && $newlinestoo) {
$toencode =~ s{\012}{ }gso;
$toencode =~ s{\015}{ }gso;
}
}
return $toencode;
}
END_OF_FUNC
The escapeHTML() returns on " return $toencode if ref($self) &&
!$self->{'escape'};". So the $self->{'ecscape'} = 0. However,
$cgi->{'escape'} = 1. So I know, the $self is not the $cgi in gitweb,
but another CGI with 'escape' undefined.
- Leo
^ permalink raw reply [flat|nested] 29+ messages in thread
* (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-02 10:17 ` Junio C Hamano
2007-03-02 10:27 ` Li Yang-r58472
@ 2007-03-02 16:19 ` Oleg Verych
2007-03-03 2:57 ` Jakub Narebski
1 sibling, 1 reply; 29+ messages in thread
From: Oleg Verych @ 2007-03-02 16:19 UTC (permalink / raw)
To: Junio C Hamano
Cc: Li Yang-r58472, Jakub Narebski, rea-git, Raimund Bauer, git
> From: Junio C Hamano
> Newsgroups: gmane.comp.version-control.git
> Subject: Re: gitweb not friendly to firefox?
> Date: Fri, 02 Mar 2007 02:17:31 -0800
[]
>
> This is puzzling....
Hallo.
Guys, changing content to "application/xhtml+xml" was a bad idea.
Here i see FF doesn't working, but i have lynx not working at all :(
"text/html" is OK, unless you have shiny modern AJAX sh1t on board...
____
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-02 16:19 ` (Re: gitweb not friendly to firefox?) and unusable in the lynx Oleg Verych
@ 2007-03-03 2:57 ` Jakub Narebski
2007-03-03 3:25 ` Nicolas Pitre
2007-03-08 15:31 ` sf
0 siblings, 2 replies; 29+ messages in thread
From: Jakub Narebski @ 2007-03-03 2:57 UTC (permalink / raw)
To: Oleg Verych
Cc: Junio C Hamano, Li Yang-r58472, rea-git, Raimund Bauer, git,
Alp Toker
Oleg Verych wrote:
>> From: Junio C Hamano
>> Newsgroups: gmane.comp.version-control.git
>> Subject: Re: gitweb not friendly to firefox?
>> Date: Fri, 02 Mar 2007 02:17:31 -0800
>[]
>>
>> This is puzzling....
>
> Guys, changing content to "application/xhtml+xml" was a bad idea.
> Here i see FF doesn't working, but i have lynx not working at all :(
>
> "text/html" is OK, unless you have shiny modern AJAX sh1t on board...
Well, change from text/html to (sometimes) application/xhtml+xml was
made in commit f6801d669 by Alp Toker with the following explanation:
"The 'text/html' media type [RFC2854] is primarily for HTML, not for
XHTML. In general, this media type is NOT suitable for XHTML."
This patch makes gitweb use content negotiation to conservatively send
pages as Content-Type 'application/xhtml+xml' when the user agent
explicitly claims to support it.
By "conservatively" it means that it uses 'application/xhtml+xml' only when
client explicitly claims that it accepts its, and it is not due to for
example */* accept globbing.
So if lynx isn't working, it is its damn fault...
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 2:57 ` Jakub Narebski
@ 2007-03-03 3:25 ` Nicolas Pitre
2007-03-03 3:41 ` Jakub Narebski
2007-03-03 13:29 ` Junio C Hamano
2007-03-08 15:31 ` sf
1 sibling, 2 replies; 29+ messages in thread
From: Nicolas Pitre @ 2007-03-03 3:25 UTC (permalink / raw)
To: Jakub Narebski
Cc: Oleg Verych, Junio C Hamano, Li Yang-r58472, rea-git,
Raimund Bauer, git, Alp Toker
On Sat, 3 Mar 2007, Jakub Narebski wrote:
> By "conservatively" it means that it uses 'application/xhtml+xml' only when
> client explicitly claims that it accepts its, and it is not due to for
> example */* accept globbing.
>
> So if lynx isn't working, it is its damn fault...
I absolutely don't care.
I use lynx, and lynx worked perfectly fine before. So it is not lynx
that broke it. Please fix gitweb.
Nicolas
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 3:25 ` Nicolas Pitre
@ 2007-03-03 3:41 ` Jakub Narebski
2007-03-03 3:49 ` Nicolas Pitre
2007-03-03 13:29 ` Junio C Hamano
1 sibling, 1 reply; 29+ messages in thread
From: Jakub Narebski @ 2007-03-03 3:41 UTC (permalink / raw)
To: Nicolas Pitre
Cc: Oleg Verych, Junio C Hamano, Li Yang-r58472, rea-git,
Raimund Bauer, git, Alp Toker
Nicolas Pitre wrote:
> On Sat, 3 Mar 2007, Jakub Narebski wrote:
>
>> By "conservatively" it means that it uses 'application/xhtml+xml' only when
>> client explicitly claims that it accepts its, and it is not due to for
>> example */* accept globbing.
>>
>> So if lynx isn't working, it is its damn fault...
>
> I absolutely don't care.
>
> I use lynx, and lynx worked perfectly fine before. So it is not lynx
> that broke it. Please fix gitweb.
WORKSFORME.
Lynx Version 2.8.5rel.1 (04 Feb 2004)
libwww-FM 2.14, SSL-MM 1.4.1, OpenSSL 0.9.7f
git web interface version 1.5.0.rc3.gc0bbd
(and application/xhtml+xml is _not_ among Accept's).
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 3:41 ` Jakub Narebski
@ 2007-03-03 3:49 ` Nicolas Pitre
2007-03-03 3:58 ` Jakub Narebski
2007-03-03 5:09 ` Nicolas Pitre
0 siblings, 2 replies; 29+ messages in thread
From: Nicolas Pitre @ 2007-03-03 3:49 UTC (permalink / raw)
To: Jakub Narebski
Cc: Oleg Verych, Junio C Hamano, Li Yang-r58472, rea-git,
Raimund Bauer, git, Alp Toker
On Sat, 3 Mar 2007, Jakub Narebski wrote:
> Nicolas Pitre wrote:
> > On Sat, 3 Mar 2007, Jakub Narebski wrote:
> >
> >> By "conservatively" it means that it uses 'application/xhtml+xml' only when
> >> client explicitly claims that it accepts its, and it is not due to for
> >> example */* accept globbing.
> >>
> >> So if lynx isn't working, it is its damn fault...
> >
> > I absolutely don't care.
> >
> > I use lynx, and lynx worked perfectly fine before. So it is not lynx
> > that broke it. Please fix gitweb.
>
> WORKSFORME.
>
> Lynx Version 2.8.5rel.1 (04 Feb 2004)
> libwww-FM 2.14, SSL-MM 1.4.1, OpenSSL 0.9.7f
>
> git web interface version 1.5.0.rc3.gc0bbd
>
> (and application/xhtml+xml is _not_ among Accept's).
This is Lynx 2.8.5rel.1 (04 Feb 2004) on Fedora Core 6:
$ lynx http://www.kernel.org/git
[...]
application/xhtml+xml D)ownload, or C)ancel
Nicolas
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 3:49 ` Nicolas Pitre
@ 2007-03-03 3:58 ` Jakub Narebski
2007-03-03 4:34 ` Nicolas Pitre
2007-03-03 5:09 ` Nicolas Pitre
1 sibling, 1 reply; 29+ messages in thread
From: Jakub Narebski @ 2007-03-03 3:58 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: git
[some Cc dropped]
Nicolas Pitre wrote:
> On Sat, 3 Mar 2007, Jakub Narebski wrote:
>> Nicolas Pitre wrote:
>>> On Sat, 3 Mar 2007, Jakub Narebski wrote:
>>>
>>>> By "conservatively" it means that it uses 'application/xhtml+xml' only when
>>>> client explicitly claims that it accepts its, and it is not due to for
>>>> example */* accept globbing.
>>>>
>>>> So if lynx isn't working, it is its damn fault...
>>>
>>> I absolutely don't care.
>>>
>>> I use lynx, and lynx worked perfectly fine before. So it is not lynx
>>> that broke it. Please fix gitweb.
>>
>> WORKSFORME.
>>
>> Lynx Version 2.8.5rel.1 (04 Feb 2004)
>> libwww-FM 2.14, SSL-MM 1.4.1, OpenSSL 0.9.7f
>>
>> git web interface version 1.5.0.rc3.gc0bbd
>>
>> (and application/xhtml+xml is _not_ among Accept's).
>
> This is Lynx 2.8.5rel.1 (04 Feb 2004) on Fedora Core 6:
>
> $ lynx http://www.kernel.org/git
> [...]
> application/xhtml+xml D)ownload, or C)ancel
$ lynx http://www.kernel.org/git
[...]
# Kernel.org - Git Repo (p1 of 26)
#Kernel.org - Git Repo projects list Kernel.org - Git Repo projects feeds
[...]
Could you check if "application/xhtml+xml" is in "Accept:"
HTTP Request Header sent by _your_ lynx, e.g. as seen via
http://web-sniffer.net/?url=http://www.kernel.org/git
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 3:58 ` Jakub Narebski
@ 2007-03-03 4:34 ` Nicolas Pitre
2007-03-04 0:49 ` Jakub Narebski
0 siblings, 1 reply; 29+ messages in thread
From: Nicolas Pitre @ 2007-03-03 4:34 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
On Sat, 3 Mar 2007, Jakub Narebski wrote:
> Could you check if "application/xhtml+xml" is in "Accept:"
> HTTP Request Header sent by _your_ lynx, e.g. as seen via
> http://web-sniffer.net/?url=http://www.kernel.org/git
Accept: text/html, text/plain, application/pdf, application/msword, audio/mod, image/*, application/postscript, text/sgml, */*;q=0.01[CRLF]
User-Agent: Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.8b
Nicolas
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 3:49 ` Nicolas Pitre
2007-03-03 3:58 ` Jakub Narebski
@ 2007-03-03 5:09 ` Nicolas Pitre
2007-03-03 13:04 ` Oleg Verych
2007-03-03 13:25 ` Johannes Schindelin
1 sibling, 2 replies; 29+ messages in thread
From: Nicolas Pitre @ 2007-03-03 5:09 UTC (permalink / raw)
To: Jakub Narebski
Cc: Oleg Verych, Junio C Hamano, Li Yang-r58472, rea-git,
Raimund Bauer, git, Alp Toker
On Fri, 2 Mar 2007, Nicolas Pitre wrote:
> This is Lynx 2.8.5rel.1 (04 Feb 2004) on Fedora Core 6:
>
> $ lynx http://www.kernel.org/git
> [...]
> application/xhtml+xml D)ownload, or C)ancel
I also tried with elinks and it works fine.
Then I tried links2 and it gives:
|?? Unknown type
|????????????????????????????????????????????????????????????????
|
|Content type is application/xhtml+xml.
|Do you want to save or display this file?
|
|[ Save ] [ Display ] [ Cancel ]
So gitweb is now broken for 2 out of 3 text based browsers that used to
just work fine before.
Nicolas
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 5:09 ` Nicolas Pitre
@ 2007-03-03 13:04 ` Oleg Verych
2007-03-03 13:25 ` Johannes Schindelin
1 sibling, 0 replies; 29+ messages in thread
From: Oleg Verych @ 2007-03-03 13:04 UTC (permalink / raw)
To: Nicolas Pitre
Cc: Jakub Narebski, Junio C Hamano, Li Yang-r58472, rea-git,
Raimund Bauer, git, Alp Toker
On Sat, Mar 03, 2007 at 12:09:02AM -0500, Nicolas Pitre wrote:
[]
> So gitweb is now broken for 2 out of 3 text based browsers that used to
> just work fine before.
Maybe there's a patch to have xhtml to be as html.
In the Debian i have:
,-*- bash -*-
|olecom@flower:/tmp$ nc -l -p 8888 localhost
|GET / HTTP/1.0
|Host: localhost:8888
|Accept: text/html, text/plain, application/x-troff-man,
|application/x-tar, application/x-gtar, application/ogg, image/gif,
|image/jpeg, image/pjpeg, image/png, image/tiff, image/bmp, text/*,
|application/x-debian-package, audio/basic, */*;q=0.01
|Accept-Encoding: gzip, compress
|Accept-Language: en, ru, cs
|Accept-Charset: koi8-r, iso-8859-1;q=0.01, us-ascii;q=0.01
|User-Agent: Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/1.4.4
`-*-
All additional content types, e.g application/*, image/*, are handled by
external software of course.
And maybe this: "*/*;q=0.01" is handled somehow wrong, i.e out of priority.
____
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 5:09 ` Nicolas Pitre
2007-03-03 13:04 ` Oleg Verych
@ 2007-03-03 13:25 ` Johannes Schindelin
1 sibling, 0 replies; 29+ messages in thread
From: Johannes Schindelin @ 2007-03-03 13:25 UTC (permalink / raw)
To: Nicolas Pitre
Cc: Jakub Narebski, Oleg Verych, Junio C Hamano, Li Yang-r58472,
rea-git, Raimund Bauer, git, Alp Toker
Hi,
On Sat, 3 Mar 2007, Nicolas Pitre wrote:
> On Fri, 2 Mar 2007, Nicolas Pitre wrote:
>
> > This is Lynx 2.8.5rel.1 (04 Feb 2004) on Fedora Core 6:
> >
> > $ lynx http://www.kernel.org/git
> > [...]
> > application/xhtml+xml D)ownload, or C)ancel
>
> I also tried with elinks and it works fine.
>
> Then I tried links2 and it gives:
>
> |?? Unknown type
> |????????????????????????????????????????????????????????????????
> |
> |Content type is application/xhtml+xml.
> |Do you want to save or display this file?
> |
> |[ Save ] [ Display ] [ Cancel ]
>
> So gitweb is now broken for 2 out of 3 text based browsers that used to
> just work fine before.
Just to fuel the fire: w3m also wants to download index.html. It also used
to work fine before. That makes 3 out of 4.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 3:25 ` Nicolas Pitre
2007-03-03 3:41 ` Jakub Narebski
@ 2007-03-03 13:29 ` Junio C Hamano
2007-03-03 14:19 ` Oleg Verych
1 sibling, 1 reply; 29+ messages in thread
From: Junio C Hamano @ 2007-03-03 13:29 UTC (permalink / raw)
To: Nicolas Pitre
Cc: Jakub Narebski, Oleg Verych, Li Yang-r58472, rea-git,
Raimund Bauer, git, Alp Toker
Nicolas Pitre <nico@cam.org> writes:
> On Sat, 3 Mar 2007, Jakub Narebski wrote:
>
>> By "conservatively" it means that it uses 'application/xhtml+xml' only when
>> client explicitly claims that it accepts its, and it is not due to for
>> example */* accept globbing.
>>
>> So if lynx isn't working, it is its damn fault...
>
> I absolutely don't care.
>
> I use lynx, and lynx worked perfectly fine before. So it is not lynx
> that broke it. Please fix gitweb.
I think the real question is if gitweb output need to be XHTML.
If everybody's browser is happier with text/html and we do not
have to use things only in xhtml, sending text/html out (both as
content-type and the actual contents) feels like the right thing
to do from compatibility point of view.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 13:29 ` Junio C Hamano
@ 2007-03-03 14:19 ` Oleg Verych
0 siblings, 0 replies; 29+ messages in thread
From: Oleg Verych @ 2007-03-03 14:19 UTC (permalink / raw)
To: Junio C Hamano
Cc: Nicolas Pitre, Jakub Narebski, Li Yang-r58472, rea-git,
Raimund Bauer, git, Alp Toker
On Sat, Mar 03, 2007 at 05:29:22AM -0800, Junio C Hamano wrote:
> Nicolas Pitre <nico@cam.org> writes:
>
> > On Sat, 3 Mar 2007, Jakub Narebski wrote:
> >
> >> By "conservatively" it means that it uses 'application/xhtml+xml' only when
> >> client explicitly claims that it accepts its, and it is not due to for
> >> example */* accept globbing.
> >>
> >> So if lynx isn't working, it is its damn fault...
> >
> > I absolutely don't care.
> >
> > I use lynx, and lynx worked perfectly fine before. So it is not lynx
> > that broke it. Please fix gitweb.
>
> I think the real question is if gitweb output need to be XHTML.
> If everybody's browser is happier with text/html and we do not
> have to use things only in xhtml, sending text/html out (both as
> content-type and the actual contents) feels like the right thing
> to do from compatibility point of view.
>
Right XML (XHTML) isn't a tags soup as HTML is, so it's better. But
"application/xml+xml+xml" is very silly, unless site's content uses
dynamics, DOM, etc. As far as i can see, gitweb is not going to have
javascript and such yet (because of compatibility/usability).
Thus, fixing of http content negotiation is needed, or whatever is used
in Perl for this.
____
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 4:34 ` Nicolas Pitre
@ 2007-03-04 0:49 ` Jakub Narebski
2007-03-04 9:47 ` Uwe Kleine-König
0 siblings, 1 reply; 29+ messages in thread
From: Jakub Narebski @ 2007-03-04 0:49 UTC (permalink / raw)
To: Nicolas Pitre, git
Cc: James Cloos, Johannes Schindelin, Oleg Verych, Junio C Hamano,
Li Yang-r58472, rea-git, Raimund Bauer, Alp Toker
Nicolas Pitre wrote:
> On Sat, 3 Mar 2007, Jakub Narebski wrote:
>
>> Could you check if "application/xhtml+xml" is in "Accept:"
>> HTTP Request Header sent by _your_ lynx, e.g. as seen via
>> http://web-sniffer.net/?url=http://www.kernel.org/git
>
> Accept: text/html, text/plain, application/pdf, application/msword,
> audio/mod, image/*, application/postscript, text/sgml, */*;q=0.01
> [CRLF]
> User-Agent: Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.8b
I'm adding back everybody which participated in this thread...
There are two complications: first, sometimes http://www.kernel.org/git
works with lynx (and links2, and w3m), and sometimes do not. I have
reported lynx working with it, but when I tried to repeat this I got
not understood (by lynx) "application/xhtml+xml" instead of correct
"text/html".
Second, the code responsible for setting correct content type is:
my $content_type;
# require explicit support from the UA if we are to send the page as
# 'application/xhtml+xml', otherwise send it as plain old 'text/html'.
# we have to do this because MSIE sometimes globs '*/*', pretending to
# support xhtml+xml but choking when it gets what it asked for.
if (defined $cgi->http('HTTP_ACCEPT') &&
$cgi->http('HTTP_ACCEPT') =~ m/(,|;|\s|^)application\/xhtml\+xml(,|;|\s|$)/ &&
$cgi->Accept('application/xhtml+xml') != 0) {
$content_type = 'application/xhtml+xml';
} else {
$content_type = 'text/html';
}
As you can see lynx _does not_ include 'application/xhtml+xml' among
accepted content types, and gitweb requires to have it set explicitely
(i.e. having */* is not enough).
BUT I have an idea: this might be caused by the gitweb _used by
kernel.org_. http://www.kernel.org/git says that it use "git web interface
version 1.4.5-rc0.GIT" while using "git core binaries version 1.5.0.1"
which is a bit suspicious... and right so, because IIRC kernel.org uses
caching version of gitweb by John 'Warthog9'
http://www.kernel.org/git/?p=git/warthog9/gitweb.git;a=summary
(I think it should use different identification, perhaps "caching git web
interface", or "git web interface (caching)"). I guess that it caches
too aggresively, caching also HTTP response (including content type).
That of course might not be true, but check if for example
http://repo.or.cz (which also does not run vanilla gitweb, by the way)
also gives the same problems to lynx or w3m.
Oleg Verych wrote:
> On Sat, Mar 03, 2007 at 05:29:22AM -0800, Junio C Hamano wrote:
>>
>> I think the real question is if gitweb output need to be XHTML.
>> If everybody's browser is happier with text/html and we do not
>> have to use things only in xhtml, sending text/html out (both as
>> content-type and the actual contents) feels like the right thing
>> to do from compatibility point of view.
>
> Right XML (XHTML) isn't a tags soup as HTML is, so it's better. But
> "application/xml+xml+xml" is very silly, unless site's content uses
> dynamics, DOM, etc. As far as i can see, gitweb is not going to have
> javascript and such yet (because of compatibility/usability).
It would be nice to AJAX-ize blame view in gitweb (if it is enabled).
> Thus, fixing of http content negotiation is needed, or whatever is
> used in Perl for this.
By the way, the change to use 'application/xhtml+xml' is by Alp Toker,
made in commit f6801d669 with the following explanation:
"The 'text/html' media type [RFC2854] is primarily for HTML, not for
XHTML. In general, this media type is NOT suitable for XHTML."
This patch makes gitweb use content negotiation to conservatively send
pages as Content-Type 'application/xhtml+xml' when the user agent
explicitly claims to support it.
Please discuss it with Alp, if is available.
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-04 0:49 ` Jakub Narebski
@ 2007-03-04 9:47 ` Uwe Kleine-König
0 siblings, 0 replies; 29+ messages in thread
From: Uwe Kleine-König @ 2007-03-04 9:47 UTC (permalink / raw)
To: Jakub Narebski
Cc: Nicolas Pitre, git, James Cloos, Johannes Schindelin, Oleg Verych,
Junio C Hamano, Li Yang-r58472, rea-git, Raimund Bauer, Alp Toker
Hello,
Jakub Narebski wrote:
> There are two complications: first, sometimes http://www.kernel.org/git
> works with lynx (and links2, and w3m), and sometimes do not.
www.kernel.org is provided by 2 machines. Some time ago I could fetch
from the one but not from the other. Maybe you want to try to address
them explicitly?
Best regards
Uwe
--
Uwe Kleine-König
http://www.google.com/search?q=e+%5E+%28i+pi%29
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: (Re: gitweb not friendly to firefox?) and unusable in the lynx
2007-03-03 2:57 ` Jakub Narebski
2007-03-03 3:25 ` Nicolas Pitre
@ 2007-03-08 15:31 ` sf
1 sibling, 0 replies; 29+ messages in thread
From: sf @ 2007-03-08 15:31 UTC (permalink / raw)
To: Jakub Narebski
Cc: Oleg Verych, Junio C Hamano, Li Yang-r58472, rea-git,
Raimund Bauer, git, Alp Toker
Jakub Narebski wrote:
...
> By "conservatively" it means that it uses 'application/xhtml+xml' only when
> client explicitly claims that it accepts its, and it is not due to for
> example */* accept globbing.
You may need something like the (not tested and line wrapped) patch
below as well.
Regards
Stephan
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 27b5970..6cc5c20 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1714,7 +1714,8 @@ sub git_header_html {
$content_type = 'text/html';
}
print $cgi->header(-type=>$content_type, -charset => 'utf-8',
- -status=> $status, -expires => $expires);
+ -status=> $status, -expires => $expires,
+ -Vary=> 'Accept');
my $mod_perl_version = $ENV{'MOD_PERL'} ? " $ENV{'MOD_PERL'}" : '';
print <<EOF;
<?xml version="1.0" encoding="utf-8"?>
^ permalink raw reply related [flat|nested] 29+ messages in thread
end of thread, other threads:[~2007-03-08 15:39 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01 10:57 gitweb not friendly to firefox? Li Yang-r58472
2007-03-01 11:34 ` Andy Parkins
2007-03-01 11:54 ` Li Yang-r58472
2007-03-01 11:56 ` Junio C Hamano
2007-03-01 13:34 ` Raimund Bauer
2007-03-01 14:00 ` Eygene Ryabinkin
2007-03-01 14:26 ` Raimund Bauer
2007-03-02 2:28 ` Li Yang-r58472
2007-03-02 4:40 ` Junio C Hamano
2007-03-02 6:47 ` Li Yang-r58472
2007-03-02 6:51 ` Junio C Hamano
2007-03-02 9:36 ` Li Yang-r58472
2007-03-02 10:17 ` Junio C Hamano
2007-03-02 10:27 ` Li Yang-r58472
2007-03-02 16:19 ` (Re: gitweb not friendly to firefox?) and unusable in the lynx Oleg Verych
2007-03-03 2:57 ` Jakub Narebski
2007-03-03 3:25 ` Nicolas Pitre
2007-03-03 3:41 ` Jakub Narebski
2007-03-03 3:49 ` Nicolas Pitre
2007-03-03 3:58 ` Jakub Narebski
2007-03-03 4:34 ` Nicolas Pitre
2007-03-04 0:49 ` Jakub Narebski
2007-03-04 9:47 ` Uwe Kleine-König
2007-03-03 5:09 ` Nicolas Pitre
2007-03-03 13:04 ` Oleg Verych
2007-03-03 13:25 ` Johannes Schindelin
2007-03-03 13:29 ` Junio C Hamano
2007-03-03 14:19 ` Oleg Verych
2007-03-08 15:31 ` sf
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).