Merge lp:~jeremiah-boyle/sparkle/useragent-bugfix into lp:sparkle

Proposed by jeremiah
Status: Merged
Merged at revision: 348
Proposed branch: lp:~jeremiah-boyle/sparkle/useragent-bugfix
Merge into: lp:sparkle
Diff against target: None lines
To merge this branch: bzr merge lp:~jeremiah-boyle/sparkle/useragent-bugfix
Reviewer Review Type Date Requested Status
Andy Matuschak Approve
Review via email: mp+6382@code.launchpad.net
To post a comment you must log in.
Revision history for this message
jeremiah (jeremiah-boyle) wrote :

fixed cstring bug causing User-Agent to have trailing garbage

Revision history for this message
Andy Matuschak (andymatuschak) wrote :

Thanks for the fix.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'SUBasicUpdateDriver.m'
2--- SUBasicUpdateDriver.m 2009-01-10 02:57:29 +0000
3+++ SUBasicUpdateDriver.m 2009-05-09 21:31:35 +0000
4@@ -32,7 +32,7 @@
5 [appcast setDelegate:self];
6 NSString *userAgent = [NSString stringWithFormat: @"%@/%@ Sparkle/%@", [aHost name], [aHost displayVersion], ([SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"] ?: nil)];
7 NSData * cleanedAgent = [userAgent dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
8- userAgent = [NSString stringWithCString:[cleanedAgent bytes] encoding:NSASCIIStringEncoding];
9+ userAgent = [[[NSString alloc] initWithData:cleanedAgent encoding:NSASCIIStringEncoding] autorelease];
10 [appcast setUserAgentString:userAgent];
11 [appcast fetchAppcastFromURL:URL];
12 }

Subscribers

People subscribed via source and target branches