From 9432aa4e2f47a68486387015a21d9a01a8926b75 Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 18 Nov 2004 00:32:16 +0000 Subject: [PATCH] removed double click hack git-svn-id: http://svn.opengroupware.org/SOPE/trunk@393 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 9 ++++ sope-appserver/NGObjWeb/Version | 2 +- sope-appserver/NGObjWeb/WORequestHandler.m | 61 +++------------------- 3 files changed, 17 insertions(+), 55 deletions(-) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 30b88ec9..7dea7b8c 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,8 @@ +2004-11-18 Helge Hess + + * WORequestHandler.m: removed double click hack, not necessary anymore + (v4.5.90) + 2004-11-17 Helge Hess * WORequestHandler.m: added 'WOUseGlobalCookiePath' default to @@ -53,6 +58,10 @@ * use Version file for install directory location +2004-11-04 Helge Hess + + * branched 4.3 into 4.4 and 4.5 + 2004-11-03 Marcus Mueller * DynamicElements/*.api: provided formal specifications for all diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 7a1ddcc8..6f8d2f66 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=89 +SUBMINOR_VERSION:=90 # v4.5.84 required libNGExtensions v4.5.127 # v4.3.42 requires libNGExtensions v4.3.116 diff --git a/sope-appserver/NGObjWeb/WORequestHandler.m b/sope-appserver/NGObjWeb/WORequestHandler.m index 78cc2935..4a96f5c8 100644 --- a/sope-appserver/NGObjWeb/WORequestHandler.m +++ b/sope-appserver/NGObjWeb/WORequestHandler.m @@ -193,18 +193,14 @@ static Class NSDateClass = Nil; if (response != nil) /* some kind of error response from above ... */ goto responseDone; - - /* check double click browser cache ... */ - if ((response = [self doubleClickResponseForContext:context])) - goto responseDone; - + if (session == nil) { /* session autocreation .. */ if ([self autocreateSessionForRequest:_request]) { if (![app isRefusingNewSessions]) { session = [app _initializeSessionInContext:context]; - - [self logWithFormat:@"autocreated session: %@", session]; + + [self debugWithFormat:@"autocreated session: %@", session]; if (session == nil) response =[app handleSessionRestorationErrorInContext:context]; @@ -240,7 +236,7 @@ static Class NSDateClass = Nil; if (session != nil) { if ([session storesIDsInCookies]) { - [self logInfoWithFormat:@"add cookie to session: %@", session]; + [self debugWithFormat:@"add cookie to session: %@", session]; [self addCookiesForSession:session toResponse:response inContext:context]; @@ -252,7 +248,7 @@ static Class NSDateClass = Nil; application:app]; } else - [self logInfoWithFormat:@"no session to store."]; + [self debugWithFormat:@"no session to store."]; } NS_HANDLER { response = [app handleException:localException inContext:context]; @@ -374,17 +370,7 @@ static Class NSDateClass = Nil; @implementation WORequest(DblClickBrowser) - (BOOL)isDoubleClickBrowser { - NSString *ua; - - if ((ua = [self headerForKey:@"user-agent"]) == nil) - return NO; - - if ([ua rangeOfString:@"Konqueror"].length > 0) - return YES; - else if ([ua rangeOfString:@"MSIE"].length > 0) - return [ua rangeOfString:@"Mac"].length > 0 ? YES : NO; - else - return NO; + return NO; } @end /* WORequest(DblClickBrowser) */ @@ -392,30 +378,7 @@ static Class NSDateClass = Nil; @implementation WORequestHandler(Support) - (WOResponse *)doubleClickResponseForContext:(WOContext *)_ctx { - /* HACK check for duplicate requests send out by Konqueror and MacIE */ - WORequest *rq; - NSArray *hack; /* 0: uri, 1: response */ - - rq = [_ctx request]; - - if (![rq isDoubleClickBrowser]) - return nil; - - if (![_ctx hasSession]) - return nil; - - /* look into page cache */ - hack = [(WOSession *)[_ctx session] objectForKey:@"_lastResponseCacheHack"]; - if (hack == nil) - return nil; - - if ([[hack objectAtIndex:0] isEqualToString:[rq uri]]) { - [[WOApplication application] - logWithFormat: - @"using response from dblclick cache hack ..."]; - return [hack objectAtIndex:1]; - } - + // DEPRECATED return nil; } @@ -434,16 +397,6 @@ static Class NSDateClass = Nil; [_app saveSessionForContext:_ctx]; - /* store response if strange double-click browser */ - if (_response != nil) { - if ([[_ctx request] isDoubleClickBrowser]) { - NSArray *hack; /* 0: uri, 1: response */ - - hack = [NSArray arrayWithObjects:[[_ctx request] uri], _response, nil]; - [_session setObject:hack forKey:@"_lastResponseCacheHack"]; - } - } - if (perflog) { NSTimeInterval rt; rt = [[NSDate date] timeIntervalSince1970] - startSaveSn; -- 2.39.5