From: Tay Ray Chuan Date: Tue, 26 Jan 2010 22:53:28 GMT Subject: Re: [PATCH 1/2] Support addresses with ':' in git-daemon Message-ID: In-Reply-To: <1264530282-4783-2-git-send-email-ilari.liusvaara@elisanet.fi> Hi, On Wed, Jan 27, 2010 at 2:24 AM, Ilari Liusvaara wrote: > diff --git a/daemon.c b/daemon.c > index 360635e..6c2bd97 100644 > --- a/daemon.c > +++ b/daemon.c > @@ -399,6 +399,33 @@ static char *xstrdup_tolower(const char *str) >        return dup; >  } > > +static void parse_host_and_port(char *hostport, char **host, > +       char **port) > +{ > +       if (*hostport == '[') { > +               char *end; > + > +               end = strchr(hostport, ']'); > +               if (!end) > +                       die("Invalid reqeuest ('[' without ']')"); s/reqeuest/request/. -- Cheers, Ray Chuan