Permalink
Browse files

Fixes 258492

Sparkle can now handle appending parameters to URLs which already have parameters (like http://foo.org/baz?bat=4)
  • Loading branch information...
1 parent c21e1ab commit 68e2cd67d1242e9408044b8ac6748104fac65a3e @andymatuschak andymatuschak committed Aug 17, 2008
Showing with 3 additions and 0 deletions.
  1. +3 −0 SUUpdater.m
View
@@ -323,6 +323,9 @@ - (NSURL *)parameterizedFeedURL
while ((currentProfileInfo = [profileInfoEnumerator nextObject]))
[parameterStrings addObject:[NSString stringWithFormat:@"%@=%@", [currentProfileInfo objectForKey:@"key"], [currentProfileInfo objectForKey:@"value"]]];
+ NSString *separatorCharacter = @"?";
+ if ([baseFeedURL query])
+ separatorCharacter = @"&"; // In case the URL is already http://foo.org/baz.xml?bat=4
NSString *appcastStringWithProfile = [NSString stringWithFormat:@"%@?%@", [baseFeedURL absoluteString], [parameterStrings componentsJoinedByString:@"&"]];
// Clean it up so it's a valid URL

0 comments on commit 68e2cd6

Please sign in to comment.