[PATCH] Accept file://localhost/ style urls as local

Jonathan S. Shapiro shap at eros-os.com
Thu Sep 6 22:16:53 CDT 2007

On Thu, 2007-09-06 at 19:28 -0700, Brendan Cully wrote:
> I'd be tempted to just skip over the host part of a file: URL --
> anything other than a local hostname is probably useless anyway.

Unfortunately, this does not satisfy the URI specification. The intended
use of hostnames in file: URIs is to allow a sanity check that you are
making the local access on the intended host.

>  I think we should at least look for localhost
> and statically before doing any address lookup. That saves
> any silly DNS lookups for 99% of the time.

Good idea. We should probably also check if the "hostname" is actually
an IP number already.
Jonathan S. Shapiro
Managing Director
The EROS Group, LLC
www.coyotos.org, www.eros-os.org

More information about the Mercurial-devel mailing list