From d2c9f51a5fa9b3028eec909c60a77102745d2113 Mon Sep 17 00:00:00 2001 From: mguesdon Date: Tue, 6 Apr 2004 11:10:11 +0000 Subject: [PATCH] o implemented -debugWithFormat: o implemented -_debugWithString: o Manage termination in -appendCookieToResponse: git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@19039 72102866-910b-0410-8b05-ffd578937521 --- GSWeb.framework/GSWSession.m | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/GSWeb.framework/GSWSession.m b/GSWeb.framework/GSWSession.m index d3d5b6b..4e00e26 100644 --- a/GSWeb.framework/GSWSession.m +++ b/GSWeb.framework/GSWSession.m @@ -601,6 +601,7 @@ RCS_ID("$Id$") LOGObjectFnStop(); }; +//-------------------------------------------------------------------- -(void)_terminateByTimeout { _wasTimedOut = YES; @@ -639,9 +640,13 @@ RCS_ID("$Id$") @implementation GSWSession (GSWSessionDebugging) //-------------------------------------------------------------------- --(void)debugWithFormat:(NSString*)format,... +-(void)debugWithFormat:(NSString*)aFormat,... { - LOGObjectFnNotImplemented(); //TODOFN + va_list ap=NULL; + va_start(ap,aFormat); + [GSWApp debugWithFormat:aFormat + arguments:ap]; + va_end(ap); }; @end @@ -652,7 +657,7 @@ RCS_ID("$Id$") //-------------------------------------------------------------------- -(void)_debugWithString:(NSString*)string { - LOGObjectFnNotImplemented(); //TODOFN + [GSWApp debugWithString:string]; }; @end @@ -880,15 +885,23 @@ RCS_ID("$Id$") //-------------------------------------------------------------------- -(void)appendCookieToResponse:(GSWResponse*)aResponse { - //OK LOGObjectFnStart(); if ([self storesIDsInCookies]) { - //TODO VERIFY NSString* domainForIDCookies=[self domainForIDCookies]; - NSString* sessionID=[self sessionID]; + NSString* sessionID=nil; int instance=-1; - NSDate* anExpireDate=[self expirationDateForIDCookies]; + NSDate* anExpireDate=nil; + if ([self isTerminating]) + { + sessionID=@""; + anExpireDate=[NSDate date]; //expire now ! + } + else + { + sessionID=[self sessionID]; + anExpireDate=[self expirationDateForIDCookies]; + }; // SessionID cookie [aResponse addCookie:[GSWCookie cookieWithName:GSWKey_SessionID[GSWebNamingConv]