git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] gitweb: dirty patch to make url rewriting involving '+' working

From
Sylvain Rabot <sylvain@abstraction.fr>
Date
Mar 29, 2010, 22:34 UTC
Message-ID
<1269902043-11134-2-git-send-email-sylvain@abstraction.fr>
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
Previous: Sylvain RabotNext: Sylvain Rabot
Message 6 of 7 in “gitweb: readme fixed regarding per user project root repository”
  1. gitweb: readme fixed regarding per user project root repositorySylvain Rabot, Mar 22, 2010
  2. gitweb: readme fixed regarding per user project root repositorySylvain Rabot, Mar 22, 2010
  3. Junio C HamanoMar 26, 2010
  4. Sylvain RabotMar 29, 2010
  5. 0/2 gitweb: updates regaring pêr user project root directorySylvain Rabot, Mar 29, 2010
  6. 1/2 gitweb: dirty patch to make url rewriting involving '+' workingSylvain Rabot, Mar 29, 2010
  7. 2/2 gitweb: readme fixed regarding per user project root repositorySylvain Rabot, Mar 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.