All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: "Jonathan Nieder" <jrnieder@gmail.com>,
	"Torsten Bögershausen" <tboegi@web.de>
Cc: "Kyle J. McKay" <mackyle@gmail.com>,
	Git mailing list <git@vger.kernel.org>
Subject: Re: git_inetd_server: run git-http-backend using inetd
Date: Sun, 20 Jul 2014 08:10:44 +0200	[thread overview]
Message-ID: <53CB5D64.9060801@web.de> (raw)
In-Reply-To: <20140719170623.GA29072@google.com>

On 07/19/2014 07:06 PM, Jonathan Nieder wrote:
> Torsten Bögershausen wrote:
>
>> Jonathan, (I'm good in searching, but bad in finding)
>> could you point out where the source code for the git package for
>> debian is ?
>>
>> I recently learned about mDNS, and will probably do some tests
>> and experiments later, and would like to test the lookup feature
>> of "0010".
> Thanks.  It's at git://git.debian.org/~jrnieder-guest/git branch
> release+patches and mirrored at http://repo.or.cz/r/git/debian
With my limited reading of the RFC and the code, and without having
test environment, my spontanous (and probably incomplete) change could 
look like this:
- Treat "host:9418" the same as "host"
- When the hosts ends with .local, do not use DNS.

static int git_tcp_connect_sock(char *host, int flags)
{
     struct strbuf error_message = STRBUF_INIT;
     int sockfd = -1, gai = 0;
     const char *port = NULL;
     struct host *hosts = NULL;
     int j, n = 0;

     get_host_and_port(&host, &port);
     if (!port)
         port = STR(DEFAULT_GIT_PORT);

     n = get_srv(host, &hosts);
     if ((n <= 0) && ends_with(host, ".local")) {
         /*
           host.local is really local, do not send it to a DNS resolver
           The user may try host without .local
          */
         die("Unable to look up %s", host);
     }
     if (!n) {
         hosts = xmalloc(sizeof(*hosts));
         hosts[0].hostname = xstrdup(host);
         hosts[0].port = xstrdup(port);
[snip]

  reply	other threads:[~2014-07-20  6:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 21:28 git_inetd_server: run git-http-backend using inetd Kyle J. McKay
2014-07-17 22:10 ` Jonathan Nieder
2014-07-17 23:38   ` Kyle J. McKay
2014-07-18  2:22     ` Jonathan Nieder
2014-07-18  6:48       ` Kyle J. McKay
2014-07-18 17:16         ` Jonathan Nieder
2014-07-19  0:08           ` Kyle J. McKay
2014-07-19  0:19             ` Jonathan Nieder
2014-07-19  1:54               ` Kyle J. McKay
2014-07-19  6:21   ` Torsten Bögershausen
2014-07-19 17:06     ` Jonathan Nieder
2014-07-20  6:10       ` Torsten Bögershausen [this message]
2014-07-20 15:25         ` Torsten Bögershausen

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=53CB5D64.9060801@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=mackyle@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.