From 1c128a224f9c62a33cd8374983a0ae06dda4ada4 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 4 Sep 2012 17:46:23 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 635c9e7117554059bb6df5357a9f71f448867b55 Monotone-Revision: 31dc3dd102c504ce978c1809310a4924273fc57b Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-09-04T17:46:23 --- ChangeLog | 6 ++++++ SoObjects/SOGo/WORequest+SOGo.m | 30 ++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0899c1fe0..77a3a08d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-09-04 Francis Lachapelle + + * SoObjects/SOGo/WORequest+SOGo.m (-isMacOSXAddressBookApp): + recognize OS X 10.8 useragent. + (-isICal4): idem. + 2012-08-27 Francis Lachapelle * SoObjects/Appointments/SOGoAptMailInvitation.m, diff --git a/SoObjects/SOGo/WORequest+SOGo.m b/SoObjects/SOGo/WORequest+SOGo.m index b972f22e2..d554bd5a0 100644 --- a/SoObjects/SOGo/WORequest+SOGo.m +++ b/SoObjects/SOGo/WORequest+SOGo.m @@ -136,21 +136,32 @@ } // -// sogod[22188] -[WEClientCapabilities initWithRequest:]: Unknown WebClient: user-agent='CalendarStore/5.0.1 (1139.14); iCal/5.0.1 (1547.4); Mac OS X/10.7.2 (11C74)' -// +// CalendarStore/5.0.1 (1139.14); iCal/5.0.1 (1547.4); Mac OS X/10.7.2 (11C74) +// CalendarStore/5.0.3 (1204.1); iCal/5.0.3 (1605.3); Mac OS X/10.7.4 (11E53) +// Mac OS X/10.8 (12A269) Calendar/1639 +// Mac OS X/10.8 (12A269) CalendarAgent/47 +// Mac OS X/10.8.1 (12B19) CalendarAgent/47 // - (BOOL) isICal4 { return ([self isAppleDAVWithSubstring: @"iCal/4."] || [self isAppleDAVWithSubstring: @"iCal/5."] - || [self isAppleDAVWithSubstring: @"CoreDAV/"]); + || [self isAppleDAVWithSubstring: @"CoreDAV/"] + || [self isAppleDAVWithSubstring: @"Calendar/"] + || [self isAppleDAVWithSubstring: @"CalendarAgent/"]); } // -// Starting from 10.7, we see something like: +// For 10.7, we see: // -// sogod[27330] -[WEClientCapabilities initWithRequest:]: Unknown WebClient: user-agent='AddressBook/6.1 (1062) CardDAVPlugin/196 CFNetwork/520.2.5 Mac_OS_X/10.7.2 (11C74)' +// AddressBook/6.1 (1062) CardDAVPlugin/196 CFNetwork/520.2.5 Mac_OS_X/10.7.2 (11C74) +// AddressBook/6.1.2 (1090) CardDAVPlugin/200 CFNetwork/520.4.3 Mac_OS_X/10.7.4 (11E53) +// +// For 10.8, we see: +// +// Mac OS X/10.8 (12A269) AddressBook/1143 +// Mac OS X/10.8.1 (12B19) AddressBook/1143 // - (BOOL) isMacOSXAddressBookApp { @@ -159,9 +170,12 @@ cc = [self clientCapabilities]; - b = [[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound && - ([[cc userAgent] rangeOfString: @"Darwin"].location != NSNotFound || - [[cc userAgent] rangeOfString: @"AddressBook"].location != NSNotFound); + b = [[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound + && [[cc userAgent] rangeOfString: @"Darwin"].location != NSNotFound + || ( [[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound + || [[cc userAgent] rangeOfString: @"Mac OS X"].location != NSNotFound ) + && [[cc userAgent] rangeOfString: @"AddressBook"].location != NSNotFound; + return b; }