Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Feb 2004 18:05:57 -0500
From:      "Gordon Henriksen" <gordon@iclub.com>
To:        =?iso-8859-1?Q?'Ville_Skytt=E4'?= <scop@FreeBSD.org>
Cc:        freebsd-cvsweb@FreeBSD.org
Subject:   RE: [PATCH] Minimal support for paths with spaces
Message-ID:  <001101c3ec3c$9d3a1c50$d454e8c7@domain.ma.iclub.com>
In-Reply-To: <1076021678.22286.64.camel@bobcat.mine.nu>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Ville Skyttä wrote:

> On Thu, 2004-02-05 at 22:05, Gordon Henriksen wrote:
> > The attached patch allows me to use cvsweb.cgi to browse 
> > folders and view/download files from my CVS repository which 
> > contain spaces in their filenames.
> [...]
> 
> You did not mention which version of CVSweb the patch was 
> against (and the patch did not make it through to the list 
> copy of the message I received, nor it is in the list 
> archives).  Anyway, basic use of files and dirs with spaces 
> in their names is working fine here, using the latest 
> FreeBSD-CVSweb beta, 2.9.2.  Lots of work in proper path (and 
> other general) escaping has been done in the 2.9.x betas.
> 
> Make sure that your patch is against that version (or CVS 
> HEAD), and if it is still applicable, please resubmit.  More 
> info: http://www.freebsd.org/projects/cvsweb.html

Ah! I've reattached it.

Wonderful. No, I doubt it's still applicable, since it is quite
a grossly basic fix against the stable release, cvsweb-2.0.6--
which I perhaps foolishly had opted for since I was just setting 
up a  service and didn't want to get embroiled in tracking 
development for yet another utility... :)

Are the betas roughly stable? I'm sure the escaping fixes are 
grossly superior to this hack, but I also don't want to be 
hitting 500's left and right.

-- 

Gordon Henriksen
IT Manager
ICLUBcentral Inc.
gordon@iclub.com

[-- Attachment #2 --]
--- cvsweb.cgi	Thu Sep 26 16:56:05 2002
+++ /home/intra/cgi-bin/cvsweb.cgi	Thu Feb  5 14:49:09 2004
@@ -258,6 +258,8 @@
 $verbose       = $v;
 $checkoutMagic = "~checkout~";
 $pathinfo      = defined($ENV{PATH_INFO}) ? $ENV{PATH_INFO} : '';
+$pathinfo =~ y/+/ /;
+$pathinfo =~ s/%(..)/sprintf("%c", hex($1))/ge;    # unquote %-quoted
 $where         = $pathinfo;
 $doCheckout = ($where =~ m|^/$checkoutMagic/|);
 $where =~ s|^/$checkoutMagic/|/|;

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001101c3ec3c$9d3a1c50$d454e8c7>