All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Siju George <sgeorge.ml@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: XML Parsing Error: junk after document element
Date: Thu, 11 Feb 2010 03:01:36 -0800 (PST)	[thread overview]
Message-ID: <m3ocjw82ai.fsf@localhost.localdomain> (raw)
In-Reply-To: <b713df2c1002102347g70cc212et21d507d44bb5aead@mail.gmail.com>

Siju George <sgeorge.ml@gmail.com> writes:

> Hi,
> 
> I get this error when I take gitweb in a browser.
> 
> XML Parsing Error: junk after document element
> Location: http://172.16.3.27/cgi-bin/gitweb.cgi
> Line Number 28, Column 8:</html><!DOCTYPE HTML PUBLIC "-//IETF//DTD
> HTML 2.0//EN">
> -------^
> 
> How can I solve it?

Which version of gitweb?[1]  Which version of git?[2]  What web server?
Which version of CGI.pm is used by web server?[3]

The included fragment after closing '</html>' tag doesn't look like
something coming from gitweb, as gitweb uses XHTML 1.0 DTD since it's
first version.

Try to view source, or use different web browser that doesn't do
strict XML validation to find the source of this error.

If everything else fals, you can always edit gitweb.cgi to comment out
content-type negotiation, to always serve as text/html mimetype -
which should torn off XML validation, as below:

	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.
	# Disable content-type negotiation when caching (use mimetype good for all).
	#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';
	#}


The commands below are _examples_ only:
[1] grep -F 'our $version' /var/www/cgi-bin/gitweb.cgi
[2] git --version
[3] perl -MCGI -le 'print $CGI::VERSION'
-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2010-02-11 11:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11  7:47 XML Parsing Error: junk after document element Siju George
2010-02-11 11:01 ` Jakub Narebski [this message]
2010-02-12  4:23   ` Siju George
2010-02-12 10:48     ` Jakub Narebski
2010-02-17  9:46       ` Siju George

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=m3ocjw82ai.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sgeorge.ml@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.