From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J.H." Subject: Re: Make Gitweb behave like Apache mod_userdir Date: Tue, 17 Nov 2009 16:00:26 -0800 Message-ID: <4B03391A.90808@eaglescrag.net> References: <7fce93be0911150204h259b7424md251c54186d05b7d@mail.gmail.com> <7vhbssewm7.fsf@alter.siamese.dyndns.org> <7fce93be0911171224r1cfc438ay7b38b81646154a23@mail.gmail.com> <7vd43gerak.fsf@alter.siamese.dyndns.org> <4B032AC8.4@eaglescrag.net> <7vskccaf4q.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Sylvain Rabot , git , Jakub Narebski To: Junio C Hamano X-From: git-owner@vger.kernel.org Wed Nov 18 01:00:48 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1NAXyZ-0007Z9-77 for gcvg-git-2@lo.gmane.org; Wed, 18 Nov 2009 01:00:47 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752671AbZKRAAg (ORCPT ); Tue, 17 Nov 2009 19:00:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752649AbZKRAAf (ORCPT ); Tue, 17 Nov 2009 19:00:35 -0500 Received: from shards.monkeyblade.net ([198.137.202.13]:54772 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752289AbZKRAAf (ORCPT ); Tue, 17 Nov 2009 19:00:35 -0500 Received: from voot-cruiser.eaglescrag.net (c-71-202-189-206.hsd1.ca.comcast.net [71.202.189.206]) (authenticated bits=0) by shards.monkeyblade.net (8.14.1/8.14.1) with ESMTP id nAI00ROD013985 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Nov 2009 16:00:34 -0800 User-Agent: Thunderbird 2.0.0.23 (X11/20090825) In-Reply-To: <7vskccaf4q.fsf@alter.siamese.dyndns.org> X-Enigmail-Version: 0.95.6 X-Virus-Scanned: ClamAV 0.88.7/10030/Mon Nov 16 18:38:41 2009 on shards.monkeyblade.net X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.1.1 (shards.monkeyblade.net [198.137.202.13]); Tue, 17 Nov 2009 16:00:37 -0800 (PST) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Junio C Hamano wrote: > "J.H." writes: > >> For starters I think overriding the /~ (specifically the ~ here) >> is going to be a bad idea no matter what you do and gives the wrong >> impression about what / how the request is being responded to. You >> might want to try and pick a different delimiter or re-work the rule >> so that you could have something like: >> >> http://git.kernel.org/ >> http://git.kernel.org/user/ > > I am not objecting but showing my ignorance, but why is it a bad idea to > allow > > http://git.kernel.org/~junio/git.git > > to map to /home/junio/pubilic_git/git.git when > > http://www.kernel.org/~junio/index.html > > maps to /home/junio/public_html/index.html already? I'm not objecting to the mapping, I'm objecting to the use of the ~ specifically, since that's the default for mod_userdir - it's more or less a race condition waiting to happen with respect to does mod_rewrite get to and process it first or does mod_userdir. Case in point should: assuming that www.example.com (to get away from the specifics of kernel.org) is running gitweb but you also wanted to allow users to show their ~/public_html directories then http://www.example.org/~junio/ could be ambiguous as to what should / is servicing the url. Now in reality it should work because of how apache is setup, but I would argue it's a bad practice to overload the '~' designator like that for use in gitweb specifically. If you have mod_userdir disabled / not available this isn't an issue, but making that assumption might be a bad idea. - John 'Warthog9' Hawley