Andy Fowler
Committed by Ben Copsey

Don't step on a previously-specified user-agent

Signed-off-by: Ben Copsey <ben@allseeing-i.com>
... ... @@ -391,6 +391,7 @@ static NSError *ASITooMuchRedirectionError;
// Set a logical user agent (on iPhones, for now)
#if TARGET_OS_IPHONE
if ([[self requestHeaders] objectForKey:@"User-Agent"] == nil) {
UIDevice *device = [UIDevice currentDevice];
NSBundle *bundle = [NSBundle mainBundle];
NSLocale *locale = [NSLocale currentLocale];
... ... @@ -405,6 +406,7 @@ static NSError *ASITooMuchRedirectionError;
];
[self addRequestHeader:@"User-Agent" value:userAgent];
}
#endif
// Accept a compressed response
... ...