Skip to content

Commit 7395aec

Browse files
stigitoto
authored andcommitted
Streaming only remembers redirect URLs it gets from GET requests
1 parent fb5fb89 commit 7395aec

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Sources/SoundCloudAPI/SCAudioStream.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,14 @@ - (void)oauthConnection:(NXOAuth2Connection *)fetcher didFailWithError:(NSError
447447
}
448448
}
449449

450-
- (void)oauthConnection:(NXOAuth2Connection *)connection didReceiveRedirectToURL:(NSURL *)aRedirectURL;
450+
- (void)oauthConnection:(NXOAuth2Connection *)fetcher didReceiveRedirectToURL:(NSURL *)aRedirectURL;
451451
{
452-
[redirectURL release];
453-
redirectURL = [aRedirectURL retain];
452+
[redirectURL release]; redirectURL = nil;
453+
454+
id context = [[fetcher.context retain] autorelease];
455+
if ([context isEqualToString:SCAudioStream_HTTPStreamContext]) {
456+
redirectURL = [aRedirectURL retain];
457+
}
454458
}
455459

456460

0 commit comments

Comments
 (0)