From 22668b6b43f9fe9c07efd5ed620ddf280e3b6a68 Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Wed, 28 Apr 2010 02:22:43 -0700 Subject: [PATCH] Use 127.0.0.1 instead of localhost in case localhost != loopback. --- Tools/NativeHost/AppController.m | 2 +- Tools/NativeHost/NSURL+Additions.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/NativeHost/AppController.m b/Tools/NativeHost/AppController.m index b751d0135..aeb2362d3 100644 --- a/Tools/NativeHost/AppController.m +++ b/Tools/NativeHost/AppController.m @@ -155,7 +155,7 @@ NSString *SERVER_USER = nil; } else if (prependServer) { - initialURL = [NSString stringWithFormat:@"http://localhost:%d/%@", SERVER_PORT, initialURL]; + initialURL = [NSString stringWithFormat:@"http://127.0.0.1:%d/%@", SERVER_PORT, initialURL]; } NHLog(@"STARTUP", [initialURL description]); diff --git a/Tools/NativeHost/NSURL+Additions.m b/Tools/NativeHost/NSURL+Additions.m index 8597da97a..39cabb1a3 100644 --- a/Tools/NativeHost/NSURL+Additions.m +++ b/Tools/NativeHost/NSURL+Additions.m @@ -15,7 +15,7 @@ { if ([[self scheme] caseInsensitiveCompare:@"file"] == NSOrderedSame) return [[[NSURL alloc] initWithScheme:@"http" - host:[NSString stringWithFormat:@"localhost:%d", SERVER_PORT] + host:[NSString stringWithFormat:@"127.0.0.1:%d", SERVER_PORT] path:[@"/filesystem/" stringByAppendingString:[self path]]] autorelease]; return [[self copy] autorelease];