From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Gal Subject: [PATCH] Don't fail in http-pull if URL is missing a '/' at the end Date: Mon, 25 Apr 2005 09:21:15 -0700 (PDT) Message-ID: References: <3WtO4-5GW-5@gated-at.bofh.it> <3WtXG-5Nh-9@gated-at.bofh.it> <3WtXG-5Nh-7@gated-at.bofh.it> <3WwLT-848-13@gated-at.bofh.it> <3WxeV-5S-9@gated-at.bofh.it> <3WxHT-pv-1@gated-at.bofh.it> <3Wyb3-Sj-33@gated-at.bofh.it> <3WyDZ-1a6-7@gated-at.bofh.it> <3WYRN-5lJ-9@gated-at.bofh.it> <3X0gU-6u6-5@gated-at.bofh.it> <3X1G1-7ug-9@gated-at.bofh.it> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-From: git-owner@vger.kernel.org Mon Apr 25 18:24:30 2005 Return-path: Received: from vger.kernel.org ([12.107.209.244]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DQ6Le-0006ei-QL for gcvg-git@gmane.org; Mon, 25 Apr 2005 18:22:15 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262651AbVDYQ0n (ORCPT ); Mon, 25 Apr 2005 12:26:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262636AbVDYQZO (ORCPT ); Mon, 25 Apr 2005 12:25:14 -0400 Received: from sam.ics.uci.edu ([128.195.38.141]:64183 "EHLO sam.ics.uci.edu") by vger.kernel.org with ESMTP id S262647AbVDYQVR (ORCPT ); Mon, 25 Apr 2005 12:21:17 -0400 Received: from sam.ics.uci.edu (localhost.localdomain [127.0.0.1]) by sam.ics.uci.edu (8.12.11/8.12.11) with ESMTP id j3PGLFrR009191 for ; Mon, 25 Apr 2005 09:21:15 -0700 Received: from localhost (gal@localhost) by sam.ics.uci.edu (8.12.11/8.12.8/Submit) with ESMTP id j3PGLFdC009187 for ; Mon, 25 Apr 2005 09:21:15 -0700 X-Authentication-Warning: sam.ics.uci.edu: gal owned process doing -bs X-X-Sender: gal@sam.ics.uci.edu To: Git Mailing List In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org http-pull fails if the URL doesn't end with a '/'. This patch adds one if needed. Signed-off-by: Andreas Gal --- http-pull.c 2005-04-25 09:15:45.000000000 -0700 +++ /home/gal/src/git/git-bit/http-pull.c 2005-04-25 09:09:54.000000000 -0700 @@ -76,6 +76,8 @@ url = malloc(strlen(base) + 50); strcpy(url, base); posn = url + strlen(base); + if (posn[-1] != '/') + *posn++ = '/'; strcpy(posn, "objects/"); posn += 8; memcpy(posn, hex, 2);