From 37d767bc3656b5c9b82aa0813255920b7ada44ac Mon Sep 17 00:00:00 2001 From: helge Date: Tue, 14 Nov 2006 12:28:23 +0000 Subject: [PATCH] detect Sunbird UA git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1378 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 5 +++++ sope-appserver/NGObjWeb/Version | 4 ++++ sope-appserver/NGObjWeb/WEClientCapabilities.m | 15 +++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 6a9d09ee..d833dda3 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,8 @@ +2006-11-14 Helge Hess + + * WEClientCapabilities.m: added Sunbird as a known user-agent + (v4.5.256) + 2006-11-08 Helge Hess * DynamicElements/WOCopyValue.m: fixed an uninitialized local diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 249bf6e0..8d291ac6 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,10 @@ # version file +ifeq ($(GNUSTEP_HOST_VENDOR),apple) # linker overflow SUBMINOR_VERSION:=255 +else +SUBMINOR_VERSION:=256 +endif # v4.5.234 requires libDOM v4.5.21 # v4.5.214 requires libNGExtensions v4.5.179 diff --git a/sope-appserver/NGObjWeb/WEClientCapabilities.m b/sope-appserver/NGObjWeb/WEClientCapabilities.m index b857c564..cdb6950b 100644 --- a/sope-appserver/NGObjWeb/WEClientCapabilities.m +++ b/sope-appserver/NGObjWeb/WEClientCapabilities.m @@ -72,6 +72,7 @@ #define WEUA_PerlHTTPDAV 41 #define WEUA_Google 42 #define WEUA_WebDrive 43 +#define WEUA_Sunbird 44 #define WEOS_UNKNOWN 0 #define WEOS_WINDOWS 1 @@ -155,6 +156,17 @@ self->browserMajorVersion = combinedVersion / 100; } } + else if ((tmp = strstr(ua, "Sunbird/"))) { + /* Sunbird says it is a Mozilla */ + self->browser = WEUA_Sunbird; + tmp += 8; /* skip "Sunbird/" */ + + self->browserMajorVersion = atoi(tmp); + if ((tmp = index(tmp, '.'))) { + tmp++; + self->browserMinorVersion = atoi(tmp); + } + } else if (strstr(ua, "Outlook-Express/")) { /* Outlook Express 5.5 mailbox access via http */ self->browser = WEUA_MSOutlookExpress; @@ -456,6 +468,7 @@ case WEUA_PerlHTTPDAV: return @"PerlHTTPDAV"; case WEUA_Google: return @"Google"; case WEUA_WebDrive: return @"WebDrive"; + case WEUA_Sunbird: return @"Sunbird"; default: return @"unknown"; } } @@ -615,6 +628,7 @@ if (self->browser == WEUA_Goliath) return YES; if (self->browser == WEUA_PerlHTTPDAV) return YES; if (self->browser == WEUA_WebDrive) return YES; + if (self->browser == WEUA_Sunbird) return YES; return NO; } @@ -672,6 +686,7 @@ case WEUA_Evolution: case WEUA_SOUP: case WEUA_Morgul: + case WEUA_Sunbird: /* browser so new, that they always supported UTF-8 ... */ return YES; case WEUA_IE: -- 2.39.5