Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
asi-http-request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ben Copsey
2009-07-13 12:25:07 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
71e46a9e2f2c0f11610e961127350f9f0812fe5d
71e46a9e
1 parent
ab5f503c
Fix urls in tests
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
Classes/ASIHTTPRequest.m
Classes/Tests/ASIHTTPRequestTests.m
Classes/ASIHTTPRequest.m
View file @
71e46a9
...
...
@@ -549,7 +549,7 @@ static NSError *ASITooMuchRedirectionError;
break
;
}
// See if our NSOperationQueue told us to cancel
or we need to redirect
// See if our NSOperationQueue told us to cancel
if
([
self
isCancelled
])
{
break
;
}
...
...
Classes/Tests/ASIHTTPRequestTests.m
View file @
71e46a9
...
...
@@ -643,7 +643,7 @@
{
// Remove any old session cookies
[
ASIHTTPRequest
clearSession
];
ASIHTTPRequest
*
request
=
[
ASIHTTPRequest
requestWithURL
:[
NSURL
URLWithString
:
@"http://a
si
/ASIHTTPRequest/tests/session_redirect"
]];
ASIHTTPRequest
*
request
=
[
ASIHTTPRequest
requestWithURL
:[
NSURL
URLWithString
:
@"http://a
llseeing-i.com
/ASIHTTPRequest/tests/session_redirect"
]];
[
request
start
];
BOOL
success
=
[[
request
responseString
]
isEqualToString
:
@"Take me to your leader"
];
GHAssertTrue
(
success
,
@"Failed to redirect preserving session cookies"
);
...
...
@@ -652,7 +652,7 @@
-
(
void
)
testTooMuchRedirection
{
// This url will simply send a 302 redirect back to itself
ASIHTTPRequest
*
request
=
[
ASIHTTPRequest
requestWithURL
:[
NSURL
URLWithString
:
@"http://a
si
/ASIHTTPRequest/tests/one_infinite_loop"
]];
ASIHTTPRequest
*
request
=
[
ASIHTTPRequest
requestWithURL
:[
NSURL
URLWithString
:
@"http://a
llseeing-i.com
/ASIHTTPRequest/tests/one_infinite_loop"
]];
[
request
start
];
GHAssertNotNil
([
request
error
],
@"Failed to generate an error when redirection occurs too many times"
);
BOOL
success
=
([[
request
error
]
code
]
==
ASITooMuchRedirectionErrorType
);
...
...
Please
register
or
login
to post a comment