+2004-11-18 Helge Hess <helge.hess@opengroupware.org>
+
+ * WORequestHandler.m: removed double click hack, not necessary anymore
+ (v4.5.90)
+
2004-11-17 Helge Hess <helge.hess@opengroupware.org>
* WORequestHandler.m: added 'WOUseGlobalCookiePath' default to
* use Version file for install directory location
+2004-11-04 Helge Hess <helge.hess@skyrix.com>
+
+ * branched 4.3 into 4.4 and 4.5
+
2004-11-03 Marcus Mueller <znek@mulle-kybernetik.com>
* DynamicElements/*.api: provided formal specifications for all
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];
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];
application:app];
}
else
- [self logInfoWithFormat:@"no session to store."];
+ [self debugWithFormat:@"no session to store."];
}
NS_HANDLER {
response = [app handleException:localException inContext:context];
@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) */
@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;
}
[_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;