Date: Wed, 13 Oct 2004 20:12:53 +0000 From: Russell Francis <rfrancis@ev.net> To: freebsd-cvsweb@freebsd.org Subject: [BUG] download link doesn't work if path has spaces. Message-ID: <416D8C45.8060303@ev.net>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------040808060201080906070809 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello, I am using CVSweb 3.0.1 and discovered that if any file contained in a CVS module has a space character in it's path, the download link will fail to download the file. The attached patch seems to fix the problem but I am not very familiar with CVSweb so it is really more of a shot in the dark. If you allready know about this issue, I appologize for repeating it. Thanks, Russ --------------040808060201080906070809 Content-Type: text/plain; name="cvsweb.cgi.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cvsweb.cgi.diff" --- cvsweb.cgi.backup Wed Oct 13 19:08:18 2004 +++ cvsweb.cgi Wed Oct 13 19:55:23 2004 @@ -4106,6 +4106,7 @@ if (!defined($mimetype) || $mimetype !~ CVSWEBMARKUP) { my $path = $where; $path =~ s|[^/]+$||; + $path =~ s/ /%20/g; $url = "$scriptname/$CheckoutMagic/${path}$url"; } $url .= '?rev=' . uri_escape($revision); --------------040808060201080906070809--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?416D8C45.8060303>