use safer port numbers

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39461 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2016-03-05 16:13:44 +00:00
parent 86e8a7b27d
commit 6468dcfd1a
15 changed files with 141 additions and 138 deletions

View file

@ -58,7 +58,7 @@
isSecure = [[defs stringForKey: @"Secure"] boolValue];
if (port == 0) port = 54321;
if (port == 0) port = 1234;
file = [defs stringForKey: @"FileName"];
RETAIN(file);

View file

@ -40,7 +40,7 @@
NSString *file;
int port = [[defs stringForKey: @"Port"] intValue];
if (port == 0) port = 54321;
if (port == 0) port = 1234;
count = [[defs stringForKey: @"Count"] intValue];
if (count <= 0) count = 1;

View file

@ -30,7 +30,7 @@ int main()
arguments: [NSArray arrayWithObjects:
@"-FileName", @"Chunked.dat",
@"-FileHdrs", @"YES", // Headers are in file
@"-Port", @"54321",
@"-Port", @"1234",
@"-Count", @"1",
nil]];
if (t != nil)
@ -43,7 +43,7 @@ int main()
// Pause to allow server subtask to set up.
[NSThread sleepUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.5]];
u = [NSURL URLWithString: @"http://localhost:54321/chunked"];
u = [NSURL URLWithString: @"http://localhost:1234/chunked"];
// Talk to server.
data = [u resourceDataUsingCache: NO];
// Get status code
@ -58,7 +58,7 @@ int main()
arguments: [NSArray arrayWithObjects:
@"-FileName", @"Chunked.dat",
@"-FileHdrs", @"YES", // Headers are in file
@"-Port", @"54321",
@"-Port", @"1234",
@"-Count", @"1",
nil]];
if (t != nil)
@ -74,7 +74,7 @@ int main()
// Pause to allow server subtask to set up.
[NSThread sleepUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.5]];
u = [NSURL URLWithString: @"http://localhost:54321/chunked"];
u = [NSURL URLWithString: @"http://localhost:1234/chunked"];
request = [NSURLRequest requestWithURL: u];
response = nil;
@ -91,7 +91,7 @@ int main()
[t waitUntilExit];
}
url = [NSURL URLWithString: @"http://localhost:54321/"];
url = [NSURL URLWithString: @"http://localhost:1234/"];
/* Ask the 'respond' helper to send back a response containing
* 'hello' and to shrink the write buffer size it uses on each
@ -134,7 +134,7 @@ int main()
* that loads work when handles are flushed from the cache.
*/
u = [NSURL URLWithString: [NSString stringWithFormat:
@"http://localhost:54321/%d", i % 18]];
@"http://localhost:1234/%d", i % 18]];
// Talk to server.
data = [u resourceDataUsingCache: NO];
// Get status code

View file

@ -44,7 +44,7 @@ int main()
// remove the captured data from a possible previous run
[fm removeItemAtPath: file error: NULL];
// making a POST request
url = [NSURL URLWithString: @"http://localhost:54321/"];
url = [NSURL URLWithString: @"http://localhost:1234/"];
request = [NSMutableURLRequest requestWithURL: url];
data = [m dataUsingEncoding: NSUTF8StringEncoding];
[request setHTTPBody: data];
@ -86,7 +86,7 @@ int main()
// remove the captured data from a possible previous run
[fm removeItemAtPath: file error: NULL];
// making a POST request
url = [NSURL URLWithString: @"https://localhost:54321/"];
url = [NSURL URLWithString: @"https://localhost:1234/"];
request = [NSMutableURLRequest requestWithURL: url];
data = [m dataUsingEncoding: NSUTF8StringEncoding];
[request setHTTPBody: data];