fix to reture respnse for synchronous request.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33949 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-10-07 09:17:14 +00:00
parent aae4782eb3
commit f7280475ff
4 changed files with 88 additions and 96 deletions

View file

@ -30,11 +30,14 @@ int main()
PASS(connection != nil,
"NSURLConnection +connectionWithRequest: delegate: with nil as delegate returns a instance");
response = nil;
data = [NSURLConnection sendSynchronousRequest: mutable
returningResponse: &response
error: &error];
PASS(data != nil && [data length] > 0,
"NSURLConnection synchronously load data from an http URL");
PASS(response != nil && [response statusCode] > 0,
"NSURLConnection synchronous load returns a response");
path = [[NSFileManager defaultManager] currentDirectoryPath];
path = [path stringByAppendingPathComponent: @"basic.m"];