git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] remote-curl: ensure that URLs do not have a trailing slash

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Apr 7, 2010, 15:57 UTC
Message-ID
<p2ube6fef0d1004070857j874c2b60z6a4794d472b0ee8a@mail.gmail.com>
In-Reply-To
<7viq83e1pd.fsf@alter.siamese.dyndns.org>
Hi,
On Wed, Apr 7, 2010 at 11:12 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> The code does not look like it is making sure things do not have a
> trailing slash.  For example, if svc has trailing slash, either %s/%s or
> strbuf_addf() would have the last character of svc in rpc->service_url.
>
> You are fixing something else.
>
> The new code avoids duplicated slashes in the middle if "url" can but does
> not necessarily end with a slash.  Is that what you are trying to fix?
the commit message is misleading, yes. I'll have another go at it.
>  I
> wonder if it makes more sense to make sure "url" always ends with a slash
> at the calling sites where it is obtained from either the end user or from
> the running environment...
Good idea.
-- 
Cheers,
Ray Chuan
Previous: Junio C HamanoNext: Tay Ray Chuan
Message 3 of 10 in “remote-curl: ensure that URLs do not have a trailing slash”
  1. remote-curl: ensure that URLs do not have a trailing slashTay Ray Chuan, Apr 7, 2010
  2. Junio C HamanoApr 7, 2010
  3. Tay Ray ChuanApr 7, 2010
  4. 1/2 http: make end_url_with_slash() publicTay Ray Chuan, Apr 7, 2010
  5. 1/2 http: make end_url_with_slash() publicTay Ray Chuan, Apr 7, 2010
  6. 2/2 remote-curl: ensure that URLs have a trailing slashTay Ray Chuan, Apr 7, 2010
  7. Junio C HamanoApr 7, 2010
  8. 1/3 t5541-http-push: add test for URLs with trailing slashTay Ray Chuan, Apr 8, 2010
  9. 2/3 http: make end_url_with_slash() publicTay Ray Chuan, Apr 8, 2010
  10. 3/3 remote-curl: ensure that URLs have a trailing slashTay Ray Chuan, Apr 8, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.