From: Andreas Gal <gal@uci.edu>
To: Git Mailing List <git@vger.kernel.org>
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) [thread overview]
Message-ID: <Pine.LNX.4.58.0504250917110.9176@sam.ics.uci.edu> (raw)
In-Reply-To: <E1DQ5nn-0003au-QN@be1.7eggert.dyndns.org>
http-pull fails if the URL doesn't end with a '/'. This patch adds one if
needed.
Signed-off-by: Andreas Gal <gal@uci.edu>
--- 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);
prev parent reply other threads:[~2005-04-25 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3WtO4-5GW-5@gated-at.bofh.it>
[not found] ` <3WtXG-5Nh-9@gated-at.bofh.it>
[not found] ` <3WtXG-5Nh-7@gated-at.bofh.it>
[not found] ` <3WwLT-848-13@gated-at.bofh.it>
[not found] ` <3WxeV-5S-9@gated-at.bofh.it>
[not found] ` <3WxHT-pv-1@gated-at.bofh.it>
[not found] ` <3Wyb3-Sj-33@gated-at.bofh.it>
[not found] ` <3WyDZ-1a6-7@gated-at.bofh.it>
[not found] ` <3WYRN-5lJ-9@gated-at.bofh.it>
[not found] ` <3X0gU-6u6-5@gated-at.bofh.it>
[not found] ` <3X1G1-7ug-9@gated-at.bofh.it>
2005-04-25 15:47 ` Git-commits mailing list feed Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
2005-04-25 16:21 ` Andreas Gal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0504250917110.9176@sam.ics.uci.edu \
--to=gal@uci.edu \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).