From: Sylvain Rabot <sylvain@abstraction.fr>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Sylvain Rabot <sylvain@abstraction.fr>
Subject: [PATCH 1/2] gitweb: dirty patch to make url rewriting involving '+' working
Date: Tue, 30 Mar 2010 00:34:02 +0200 [thread overview]
Message-ID: <1269902043-11134-2-git-send-email-sylvain@abstraction.fr> (raw)
In-Reply-To: <1269902043-11134-1-git-send-email-sylvain@abstraction.fr>
CGI::url method replaces '+' character by '%20', this patch reverts
this behavior to make url rewriting involving '+' in the base url working
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
---
gitweb/gitweb.perl | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a2d2283..486996e 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -33,6 +33,10 @@ our $version = "++GIT_VERSION++";
our $my_url = $cgi->url();
our $my_uri = $cgi->url(-absolute => 1);
+# dirty patch to make url rewriting with '+' character working
+$my_url =~ s/(.*)%20(.*)/$1+$2/g;
+$my_uri =~ s/(.*)%20(.*)/$1+$2/g;
+
# Base URL for relative URLs in gitweb ($logo, $favicon, ...),
# needed and used only for URLs with nonempty PATH_INFO
our $base_url = $my_url;
--
1.7.0.3
next prev parent reply other threads:[~2010-03-29 22:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 22:15 [PATCH] gitweb: readme fixed regarding per user project root repository Sylvain Rabot
2010-03-22 22:15 ` Sylvain Rabot
2010-03-26 18:52 ` Junio C Hamano
2010-03-29 20:43 ` Sylvain Rabot
2010-03-29 22:34 ` [PATCH 0/2] gitweb: updates regaring pêr user project root directory Sylvain Rabot
2010-03-29 22:34 ` Sylvain Rabot [this message]
2010-03-29 22:34 ` [PATCH 2/2] gitweb: readme fixed regarding per user project root repository Sylvain Rabot
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=1269902043-11134-2-git-send-email-sylvain@abstraction.fr \
--to=sylvain@abstraction.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).