summaryrefslogtreecommitdiff
path: root/CyteKit/extern.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-03-10 22:34:52 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-03-10 22:34:52 -0800
commitd60043e4dfdcd8321f94720ef885c55ad59a2b3d (patch)
tree424dd0054b0d1208a2eca11b26ab0737e2cfc5a6 /CyteKit/extern.mm
parent2db33ea12fcfa87654ecf0ba54db21786f1fe821 (diff)
Support compound user-agents using CyteInitialize.
Diffstat (limited to 'CyteKit/extern.mm')
-rw-r--r--CyteKit/extern.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/CyteKit/extern.mm b/CyteKit/extern.mm
index aad3626..42317e1 100644
--- a/CyteKit/extern.mm
+++ b/CyteKit/extern.mm
@@ -58,7 +58,7 @@ bool CyteIsReachable(const char *name) {
;
}
-void CyteInitialize(NSString *app, NSString *version) {
+void CyteInitialize(NSString *agent) {
UIScreen *screen([UIScreen mainScreen]);
if ([screen respondsToSelector:@selector(scale)])
ScreenScale_ = [screen scale];
@@ -96,7 +96,7 @@ void CyteInitialize(NSString *app, NSString *version) {
safari = [info objectForKey:@"CFBundleVersion"];
}
- NSString *agent([NSString stringWithFormat:@"%@/%@ CyF/%.2f", app, version, kCFCoreFoundationVersionNumber]);
+ agent = [NSString stringWithFormat:@"%@ CyF/%.2f", agent, kCFCoreFoundationVersionNumber];
if (RegEx match = RegEx("([0-9]+(\\.[0-9]+)+).*", safari))
agent = [NSString stringWithFormat:@"Safari/%@ %@", match[1], agent];