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

Re: git daemon directory munging?

From
Junio C Hamano <junkio@cox.net>
Date
Jun 4, 2006, 06:27 UTC
Message-ID
<7vverhcu5n.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0606031722340.5498@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 12 quoted lines
> diff --git a/connect.c b/connect.c
> index 54f7bf7..36c5d04 100644
> --- a/connect.c
> +++ b/connect.c
> @@ -374,7 +374,7 @@ static int git_tcp_connect(int fd[2], co
>  
>  	fd[0] = sockfd;
>  	fd[1] = sockfd;
> -	packet_write(sockfd, "%s %s\n", prog, path);
> +	packet_write(sockfd, "%s %s%c%s%c%s\n", prog, path, 0, host, 0, port);
>  	return 0;
>  }

Adding host like HTTP does with Host: header makes sense but I think the accept side can usually tell what the port it accepted the connection to is.

Previous: Linus TorvaldsNext: H. Peter Anvin
Message 3 of 5 in “git daemon directory munging?”
  1. Jon LoeligerJun 4, 2006
  2. Linus TorvaldsJun 4, 2006
  3. Junio C HamanoJun 4, 2006
  4. H. Peter AnvinJun 4, 2006
  5. H. Peter AnvinJun 4, 2006

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.