2002-07-27 23:48:47 +00:00
|
|
|
/** GSWContext.m - <title>GSWeb: Class GSWContext</title>
|
|
|
|
|
2004-04-06 11:15:53 +00:00
|
|
|
Copyright (C) 1999-2004 Free Software Foundation, Inc.
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
2000-01-22 12:49:49 +00:00
|
|
|
Date: Jan 1999
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
$Revision$
|
|
|
|
$Date$
|
2003-01-19 15:33:07 +00:00
|
|
|
$Id$
|
2002-07-27 23:48:47 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
This file is part of the GNUstep Web Library.
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
<license>
|
2000-01-22 12:49:49 +00:00
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2002-07-27 23:48:47 +00:00
|
|
|
</license>
|
|
|
|
**/
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-03-21 14:32:57 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
RCS_ID("$Id$")
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-01-22 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/Makefile.postamble:
o use $(LN_S) -f in install-WO-headers
o added $(MKDIRS) $(GNUSTEP_HEADERS)/$(GSWExtensions_wo_HEADER_FILES_INSTALL_DIR);
* GSWExtensionsGSW.framework/Makefile.postamble: use $(LN_S) -f in install-WO-headers
2003-01-20 David Ayers <d.ayers@inode.at>
* Makefile.postamble
o added support for make gswnames=(gsw,wo,all) (corrected
typo)
o reinserted support for $(INSTALL_ROOT_DIR)
* config.h.in
o added HAVE_GDL2
* configure
o added support for --with-gswnames=(gsw,wo,all)
o set LIBWRAP during configure
o added config.mak.in as configurable file
* configure.ac
o (see configure)
* config.mak: removed (replaced by config.mak.in)
* config.mak.in: new file
o added support for make gswnames=(gsw,wo,all)
* gsweb.make.in
o add GSANTLR as auxiliary lib
o add gsweb libs to AUXILIARY_GSW_LIBS
o include correct extensions for GSW/WO-libs
* gsweb_wo.make: new file
* GSWeb/GSWConfig.h
o changed support for GSWEB_WONAMES
o conditionally import file GSWWOCompatiblity
here instead of in GSWeb.h
* GSWeb/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o removed reference to unused files:
GSWeb.m, GSWWOCompatibility.m
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWeb/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
o remove Makefile.preamble during distclean
* GSWeb/Makefile.preamble.in
o fixed typo
* GSWeb/GSWeb.h
o moved GSW/WO-Name-mapping to GSWWOCompatibility.h
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWeb.m: removed
* GSWeb/GSWWOCompatibility.h
o changed GSWEB_WONAMES handling
o removed hybrid namespace WO subclasses
o moved & reorganized GSW/WO-Name-mapping from GSWeb.h
o inlucluded missing GSW/WO-Name-mappings
* GSWeb/GSWWOCompatibility.m: removed
* GSWeb/*.m
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWApplication.m
o remove special GSW/WO handling of WOApp
* GSWeb/WebObject/WO*: removed
* GSWeb/WebObject/WebObjects
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWExtensions/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWExtensions/Makefile.preamble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
* GSWExtensions/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
* GSWExtensions/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtWOCompatibility.h"
o replaces inclusions of
<GSWExtensions/file.h> with "file.h"
* GSWExtensions/GSWExtensions.h: new file
* GSWExtensions/WOExtensions.h: new file
* GSWExtensions/GSWExtWOCompatibility.h: new file
* GSWExtensionsGSW/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new file GSWExtGSWWOCompatibility.h
o added support to create WO header files
* GSWExtensionsGSW/Makefile.pramble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
o removed GSWExtensions from ADDITIONAL_LIB_DIRS
* GSWExtensionsGSW/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtGSWWOCompatibility.h"
* GSWExtensions/GSWExtGSWWOCompatibility.h: new file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@15675 72102866-910b-0410-8b05-ffd578937521
2003-01-22 12:24:26 +00:00
|
|
|
#include "GSWeb.h"
|
2005-04-05 14:49:55 +00:00
|
|
|
#include "GSWPrivate.h"
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
static int dontTraceComponentActionURL=0;
|
2004-12-31 14:33:16 +00:00
|
|
|
|
|
|
|
static SEL componentSEL=NULL;
|
|
|
|
static SEL elementIDSEL=NULL;
|
|
|
|
static SEL senderIDSEL=NULL;
|
2005-04-05 14:49:55 +00:00
|
|
|
static SEL contextAndElementIDSEL=NULL;
|
2004-12-31 14:33:16 +00:00
|
|
|
static SEL isParentSenderIDSearchOverSEL=NULL;
|
|
|
|
static SEL isSenderIDSearchOverSEL=NULL;
|
|
|
|
|
|
|
|
// 'Standard' GSWContext class. Used to get IMPs from standardElementIDIMPs
|
|
|
|
static Class standardClass=Nil;
|
|
|
|
|
|
|
|
// List of standardClass IMPs
|
|
|
|
static GSWContextIMPs standardContextIMPs;
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
/** Fill impsPtr structure with IMPs for context **/
|
|
|
|
void GetGSWContextIMPs(GSWContextIMPs* impsPtr,GSWContext* context)
|
|
|
|
{
|
|
|
|
if ([context class]==standardClass)
|
|
|
|
{
|
|
|
|
memcpy(impsPtr,&standardContextIMPs,sizeof(GSWContextIMPs));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
memset(impsPtr,0,sizeof(GSWContextIMPs));
|
|
|
|
|
|
|
|
impsPtr->_incrementLastElementIDComponentIMP =
|
|
|
|
[context methodForSelector:incrementLastElementIDComponentSEL];
|
|
|
|
|
|
|
|
impsPtr->_appendElementIDComponentIMP
|
|
|
|
= [context methodForSelector:appendElementIDComponentSEL];
|
|
|
|
|
|
|
|
impsPtr->_appendZeroElementIDComponentIMP =
|
|
|
|
[context methodForSelector:appendZeroElementIDComponentSEL];
|
|
|
|
|
|
|
|
impsPtr->_deleteAllElementIDComponentsIMP =
|
|
|
|
[context methodForSelector:deleteAllElementIDComponentsSEL];
|
|
|
|
|
|
|
|
impsPtr->_deleteLastElementIDComponentIMP =
|
|
|
|
[context methodForSelector:deleteLastElementIDComponentSEL];
|
|
|
|
|
|
|
|
impsPtr->_elementIDIMP =
|
|
|
|
[context methodForSelector:elementIDSEL];
|
|
|
|
|
|
|
|
impsPtr->_componentIMP =
|
|
|
|
[context methodForSelector:componentSEL];
|
|
|
|
|
|
|
|
impsPtr->_senderIDIMP =
|
|
|
|
[context methodForSelector:senderIDSEL];
|
|
|
|
|
2005-04-05 14:49:55 +00:00
|
|
|
impsPtr->_contextAndElementIDIMP =
|
|
|
|
[context methodForSelector:contextAndElementIDSEL];
|
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
impsPtr->_isParentSenderIDSearchOverIMP =
|
|
|
|
(GSWIMP_BOOL)[context methodForSelector:isParentSenderIDSearchOverSEL];
|
|
|
|
|
|
|
|
impsPtr->_isSenderIDSearchOverIMP =
|
|
|
|
(GSWIMP_BOOL)[context methodForSelector:isSenderIDSearchOverSEL];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
/** functions to accelerate calls of frequently used GSWContext methods **/
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void GSWContext_incrementLastElementIDComponent(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
(*(aContext->_selfIMPs._incrementLastElementIDComponentIMP))
|
|
|
|
(aContext,incrementLastElementIDComponentSEL);
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void GSWContext_appendElementIDComponent(GSWContext* aContext,NSString* component)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
(*(aContext->_selfIMPs._appendElementIDComponentIMP))
|
|
|
|
(aContext,appendElementIDComponentSEL,component);
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void GSWContext_appendZeroElementIDComponent(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
(*(aContext->_selfIMPs._appendZeroElementIDComponentIMP))
|
|
|
|
(aContext,appendZeroElementIDComponentSEL);
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void GSWContext_deleteAllElementIDComponents(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
(*(aContext->_selfIMPs._deleteAllElementIDComponentsIMP))
|
|
|
|
(aContext,deleteAllElementIDComponentsSEL);
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void GSWContext_deleteLastElementIDComponent(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
(*(aContext->_selfIMPs._deleteLastElementIDComponentIMP))
|
|
|
|
(aContext,deleteLastElementIDComponentSEL);
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
NSString* GSWContext_elementID(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
return (*(aContext->_selfIMPs._elementIDIMP))
|
|
|
|
(aContext,elementIDSEL);
|
|
|
|
else
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
NSString* GSWContext_senderID(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
return (*(aContext->_selfIMPs._senderIDIMP))
|
|
|
|
(aContext,senderIDSEL);
|
|
|
|
else
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
2005-04-05 14:49:55 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
NSString* GSWContext_contextAndElementID(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
return (*(aContext->_selfIMPs._contextAndElementIDIMP))
|
|
|
|
(aContext,contextAndElementIDSEL);
|
|
|
|
else
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
GSWComponent* GSWContext_component(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
return (GSWComponent*)(*(aContext->_selfIMPs._componentIMP))
|
|
|
|
(aContext,componentSEL);
|
|
|
|
else
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
GSWEB_EXPORT BOOL GSWContext_isParentSenderIDSearchOver(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
return (*(aContext->_selfIMPs._isParentSenderIDSearchOverIMP))
|
|
|
|
(aContext,isParentSenderIDSearchOverSEL);
|
|
|
|
else
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext)
|
|
|
|
{
|
|
|
|
if (aContext)
|
|
|
|
return (*(aContext->_selfIMPs._isSenderIDSearchOverIMP))
|
|
|
|
(aContext,isSenderIDSearchOverSEL);
|
|
|
|
else
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//====================================================================
|
|
|
|
@implementation GSWContext
|
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
+ (void) initialize
|
|
|
|
{
|
|
|
|
if (self == [GSWContext class])
|
|
|
|
{
|
|
|
|
componentSEL=@selector(component);
|
|
|
|
elementIDSEL=@selector(elementID);
|
|
|
|
senderIDSEL=@selector(senderID);
|
2005-04-05 14:49:55 +00:00
|
|
|
contextAndElementIDSEL=@selector(contextAndElementID);
|
2004-12-31 14:33:16 +00:00
|
|
|
isParentSenderIDSearchOverSEL=@selector(isParentSenderIDSearchOver);
|
|
|
|
isSenderIDSearchOverSEL=@selector(isSenderIDSearchOver);
|
|
|
|
[self setStandardClass:[GSWContext class]];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
+(void)setStandardClass:(Class)aStandardClass
|
|
|
|
{
|
|
|
|
// TODO MultiThread protection
|
|
|
|
standardClass=aStandardClass;
|
|
|
|
|
|
|
|
memset(&standardContextIMPs,0,sizeof(GSWContextIMPs));
|
|
|
|
|
|
|
|
InitializeGSWElementIDSELs();
|
|
|
|
|
|
|
|
standardContextIMPs._incrementLastElementIDComponentIMP =
|
|
|
|
[self instanceMethodForSelector:incrementLastElementIDComponentSEL];
|
|
|
|
|
|
|
|
standardContextIMPs._appendElementIDComponentIMP =
|
|
|
|
[self instanceMethodForSelector:appendElementIDComponentSEL];
|
|
|
|
|
|
|
|
standardContextIMPs._appendZeroElementIDComponentIMP =
|
|
|
|
[self instanceMethodForSelector:appendZeroElementIDComponentSEL];
|
|
|
|
|
|
|
|
standardContextIMPs._deleteAllElementIDComponentsIMP =
|
|
|
|
[self instanceMethodForSelector:deleteAllElementIDComponentsSEL];
|
|
|
|
|
|
|
|
standardContextIMPs._deleteLastElementIDComponentIMP =
|
|
|
|
[self instanceMethodForSelector:deleteLastElementIDComponentSEL];
|
|
|
|
|
|
|
|
standardContextIMPs._elementIDIMP =
|
|
|
|
[self instanceMethodForSelector:elementIDSEL];
|
|
|
|
|
|
|
|
standardContextIMPs._componentIMP =
|
|
|
|
[self instanceMethodForSelector:componentSEL];
|
|
|
|
|
|
|
|
standardContextIMPs._senderIDIMP =
|
|
|
|
[self instanceMethodForSelector:senderIDSEL];
|
|
|
|
|
2005-04-05 14:49:55 +00:00
|
|
|
standardContextIMPs._contextAndElementIDIMP =
|
|
|
|
[self instanceMethodForSelector:contextAndElementIDSEL];
|
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
standardContextIMPs._componentIMP =
|
|
|
|
[self instanceMethodForSelector:componentSEL];
|
|
|
|
|
|
|
|
standardContextIMPs._isParentSenderIDSearchOverIMP =
|
|
|
|
(GSWIMP_BOOL)[self instanceMethodForSelector:isParentSenderIDSearchOverSEL];
|
|
|
|
|
|
|
|
standardContextIMPs._isSenderIDSearchOverIMP =
|
|
|
|
(GSWIMP_BOOL)[self instanceMethodForSelector:isSenderIDSearchOverSEL];
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// init
|
|
|
|
|
|
|
|
-(id)init
|
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
|
|
|
if ((self=[super init]))
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2004-12-31 14:33:16 +00:00
|
|
|
GetGSWContextIMPs(&_selfIMPs,self);
|
2002-07-27 23:48:47 +00:00
|
|
|
[self _initWithContextID:(unsigned int)-1];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
return self;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)dealloc
|
|
|
|
{
|
2000-03-20 15:50:51 +00:00
|
|
|
GSWLogAssertGood(self);
|
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
|
|
|
NSDebugFLog(@"Dealloc GSWContext %p. %@",
|
|
|
|
(void*)self, GSCurrentThread());
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext senderID");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_senderID);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext requestSessionID");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_requestSessionID);
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext requestContextID");
|
|
|
|
DESTROY(_requestContextID);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext elementID");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_elementID);
|
|
|
|
if (_session)
|
2003-01-19 15:33:07 +00:00
|
|
|
{
|
|
|
|
NSDebugFLog(@"sessionCount=%u",[_session retainCount]);
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext session");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_session);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext request");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_request);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext Response");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_response);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext pageElement");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_pageElement);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext pageComponent");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_pageComponent);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext currentComponent");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_currentComponent);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext url");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_url);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext awakePageComponents");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_awakePageComponents);
|
2002-05-16 18:01:40 +00:00
|
|
|
#ifndef NDEBUG
|
|
|
|
DESTROY(_docStructure);
|
|
|
|
DESTROY(_docStructureElements);
|
|
|
|
#endif
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugFLog0(@"Release GSWContext userInfo");
|
|
|
|
DESTROY(_userInfo);
|
2003-11-24 12:13:37 +00:00
|
|
|
DESTROY(_languages);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Dealloc GSWContext super");
|
|
|
|
[super dealloc];
|
|
|
|
NSDebugFLog0(@"end Dealloc GSWContext");
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)initWithRequest:(GSWRequest*)aRequest
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
|
|
|
if ((self=[self init]))
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
|
|
|
[self _setRequest:aRequest];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
return self;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
+(GSWContext*)contextWithRequest:(GSWRequest*)aRequest
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWContext* context=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2003-06-25 15:23:01 +00:00
|
|
|
context=[[[self alloc]
|
2002-07-27 23:48:47 +00:00
|
|
|
initWithRequest:aRequest]
|
|
|
|
autorelease];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return context;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)copyWithZone:(NSZone*)zone
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWContext* clone = [[isa allocWithZone:zone] init];
|
2000-01-22 12:49:49 +00:00
|
|
|
if (clone)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
|
|
|
clone->_contextID=_contextID;
|
|
|
|
ASSIGNCOPY(clone->_senderID,_senderID);
|
|
|
|
ASSIGNCOPY(clone->_requestSessionID,_requestSessionID);
|
2003-01-19 15:33:07 +00:00
|
|
|
ASSIGNCOPY(clone->_requestContextID,_requestContextID);
|
2004-12-31 14:33:16 +00:00
|
|
|
NSLog(@"self=%p clone=%p _elementID=%p",
|
|
|
|
self,clone,_elementID);
|
|
|
|
if (_elementID)
|
|
|
|
{
|
|
|
|
ASSIGNCOPY(clone->_elementID,_elementID);
|
|
|
|
NSLog(@"self=%p clone=%p _elementID=%p clone->_elementID=%p",
|
|
|
|
self,clone,_elementID,clone->_elementID);
|
|
|
|
NSAssert(clone->_elementID,@"No clone elementID");
|
|
|
|
|
|
|
|
GetGSWElementIDIMPs(&clone->_elementIDIMPs,clone->_elementID);
|
|
|
|
NSLog(@"self=%p clone=%p _elementID=%p clone->_elementID=%p _elementIDIMPs._deleteAllElementIDComponentsIMP=%p",
|
|
|
|
self,clone,_elementID,clone->_elementID,_elementIDIMPs._deleteAllElementIDComponentsIMP);
|
|
|
|
};
|
2002-07-27 23:48:47 +00:00
|
|
|
ASSIGN(clone->_session,_session); //TODOV
|
|
|
|
ASSIGN(clone->_request,_request); //TODOV
|
|
|
|
ASSIGN(clone->_response,_response); //TODOV
|
|
|
|
ASSIGN(clone->_pageElement,_pageElement);
|
|
|
|
ASSIGN(clone->_pageComponent,_pageComponent);
|
|
|
|
ASSIGN(clone->_currentComponent,_currentComponent);
|
|
|
|
ASSIGNCOPY(clone->_url,_url);
|
2003-01-19 15:33:07 +00:00
|
|
|
if (_awakePageComponents)
|
|
|
|
clone->_awakePageComponents=[_awakePageComponents mutableCopy];
|
|
|
|
if (_userInfo)
|
|
|
|
clone->_userInfo=[_userInfo mutableCopy];
|
2002-07-27 23:48:47 +00:00
|
|
|
clone->_urlApplicationNumber=_urlApplicationNumber;
|
|
|
|
clone->_isClientComponentRequest=_isClientComponentRequest;
|
|
|
|
clone->_distributionEnabled=_distributionEnabled;
|
|
|
|
clone->_pageChanged=_pageChanged;
|
|
|
|
clone->_pageReplaced=_pageReplaced;
|
|
|
|
clone->_generateCompleteURLs=_generateCompleteURLs;
|
|
|
|
clone->_isInForm=_isInForm;
|
|
|
|
clone->_actionInvoked=_actionInvoked;
|
|
|
|
clone->_formSubmitted=_formSubmitted;
|
|
|
|
clone->_isMultipleSubmitForm=_isMultipleSubmitForm;
|
2005-04-05 14:49:55 +00:00
|
|
|
clone->_isSessionDisabled=_isSessionDisabled;
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
return clone;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)description
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* desc=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
dontTraceComponentActionURL++;
|
2002-07-27 23:48:47 +00:00
|
|
|
desc= [NSString stringWithFormat:
|
2005-04-05 14:49:55 +00:00
|
|
|
@"%s: %p contextID=%@ senderID=%@ elementID=%@ session=%p request=%p response=%p pageElement=%p pageComponent=%p currentComponent=%p url=%@ urlApplicationNumber=%d isClientComponentRequest=%s distributionEnabled=%s isSessionDisabled=%s pageChanged=%s pageReplaced=%s",
|
2002-07-27 23:48:47 +00:00
|
|
|
object_get_class_name(self),
|
|
|
|
(void*)self,
|
|
|
|
[self contextID],
|
|
|
|
[self senderID],
|
|
|
|
[self elementID],
|
|
|
|
(void*)[self existingSession],
|
|
|
|
(void*)[self request],
|
|
|
|
(void*)[self response],
|
|
|
|
(void*)_pageElement,
|
|
|
|
(void*)_pageComponent,
|
|
|
|
(void*)_currentComponent,
|
|
|
|
_url,
|
|
|
|
_urlApplicationNumber,
|
|
|
|
_isClientComponentRequest ? "YES" : "NO",
|
|
|
|
_distributionEnabled ? "YES" : "NO",
|
2005-04-05 14:49:55 +00:00
|
|
|
_isSessionDisabled ? "YES" : "NO",
|
2002-07-27 23:48:47 +00:00
|
|
|
_pageChanged ? "YES" : "NO",
|
|
|
|
_pageReplaced ? "YES" : "NO"];
|
2000-01-22 12:49:49 +00:00
|
|
|
dontTraceComponentActionURL--;
|
2002-07-27 23:48:47 +00:00
|
|
|
return desc;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_isRefusingThisRequest
|
|
|
|
{
|
|
|
|
return _isRefusingThisRequest;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_setIsRefusingThisRequest:(BOOL)yn
|
|
|
|
{
|
|
|
|
_isRefusingThisRequest = yn;
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)setInForm:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_isInForm=flag;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)isInForm
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _isInForm;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)setInEnabledForm:(BOOL)flag
|
|
|
|
{
|
|
|
|
_isInEnabledForm=flag;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)isInEnabledForm
|
|
|
|
{
|
|
|
|
return _isInEnabledForm;
|
|
|
|
};
|
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// Create the elementID and set IMPs
|
|
|
|
-(void)_createElementID
|
|
|
|
{
|
|
|
|
if (!_elementID)
|
|
|
|
_elementID=[GSWElementID new];
|
|
|
|
|
|
|
|
GetGSWElementIDIMPs(&_elementIDIMPs,_elementID);
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// elementID
|
2004-12-14 23:48:51 +00:00
|
|
|
-(NSString*)elementID
|
2004-12-31 14:33:16 +00:00
|
|
|
{
|
|
|
|
if (_elementID)
|
|
|
|
{
|
|
|
|
NSAssert(_elementIDIMPs._elementIDStringIMP,
|
|
|
|
@"No _elementIDIMPs._elementIDStringIMP");
|
|
|
|
return (*_elementIDIMPs._elementIDStringIMP)(_elementID,elementIDStringSEL);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-03-01 16:47:47 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// returns contextID.ElementID
|
|
|
|
-(NSString*)contextAndElementID
|
|
|
|
{
|
2005-04-05 14:49:55 +00:00
|
|
|
static NSString* preBuiltNumPlusDot[] = {
|
|
|
|
@"0.", @"1.", @"2.", @"3.", @"4.", @"5.", @"6.", @"7.", @"8.", @"9.",
|
|
|
|
@"10.", @"11.", @"12.", @"13.", @"14.", @"15.", @"16.", @"17.", @"18.", @"19.",
|
|
|
|
@"20.", @"21.", @"22.", @"23.", @"24.", @"25.", @"26.", @"27.", @"28.", @"29.",
|
|
|
|
@"30.", @"31.", @"32.", @"33.", @"34.", @"35.", @"36.", @"37.", @"38.", @"39.",
|
|
|
|
@"40.", @"41.", @"42.", @"43.", @"44.", @"45.", @"46.", @"47.", @"48.", @"49.",
|
|
|
|
@"50.", @"51.", @"52.", @"53.", @"54.", @"55.", @"56.", @"57.", @"58.", @"59.",
|
|
|
|
@"60.", @"61.", @"62.", @"63.", @"64.", @"65.", @"66.", @"67.", @"68.", @"69." };
|
|
|
|
static int preBuiltNumPlusDotCount = sizeof(preBuiltNumPlusDot)/sizeof(NSString*);
|
|
|
|
if (_contextID>=0 && _contextID<preBuiltNumPlusDotCount)
|
|
|
|
{
|
|
|
|
if (_elementID)
|
|
|
|
return [preBuiltNumPlusDot[_contextID] stringByAppendingString:
|
|
|
|
(*_elementIDIMPs._elementIDStringIMP)(_elementID,elementIDStringSEL)];
|
|
|
|
else
|
|
|
|
return preBuiltNumPlusDot[_contextID];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (_elementID)
|
|
|
|
return [NSString stringWithFormat:@"%u.%@",
|
|
|
|
_contextID,
|
|
|
|
(*_elementIDIMPs._elementIDStringIMP)(_elementID,elementIDStringSEL)];
|
|
|
|
else
|
|
|
|
return [NSString stringWithFormat:@"%u.%@",
|
|
|
|
_contextID,
|
|
|
|
GSWContext_elementID(self)];
|
|
|
|
};
|
2004-03-01 16:47:47 +00:00
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWComponent*)component
|
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
return _currentComponent;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)contextID
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
if (_contextID==(unsigned int)-1)
|
|
|
|
return nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2005-04-05 14:49:55 +00:00
|
|
|
return GSWIntToNSString((int)_contextID);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWComponent*)page
|
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
if ([_pageComponent _isPage])
|
2002-07-27 23:48:47 +00:00
|
|
|
return _pageComponent;
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2003-01-19 15:33:07 +00:00
|
|
|
return nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWRequest*)request
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _request;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWResponse*)response
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _response;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)hasSession
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return (_session!=nil);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2005-04-05 14:49:55 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
/** return YES is session creation|restoration is disabled **/
|
|
|
|
-(BOOL)isSessionDisabled
|
|
|
|
{
|
|
|
|
return _isSessionDisabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
/** pass YES as argument to disable session creation|restoration **/
|
|
|
|
-(void)setIsSessionDisabled:(BOOL)yn
|
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
|
|
|
_isSessionDisabled=yn;
|
|
|
|
NSDebugMLLog(@"sessions",@"_isSessionDisabled=%d",_isSessionDisabled);
|
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
}
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWSession*)_session
|
|
|
|
{
|
2005-04-05 14:49:55 +00:00
|
|
|
if ([self isSessionDisabled])
|
|
|
|
return nil;
|
|
|
|
else
|
|
|
|
return _session;
|
2003-01-19 15:33:07 +00:00
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWSession*)session
|
|
|
|
{
|
2005-04-05 14:49:55 +00:00
|
|
|
GSWSession* session=nil;
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2003-01-19 15:33:07 +00:00
|
|
|
|
2005-04-05 14:49:55 +00:00
|
|
|
if (![self isSessionDisabled])
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2005-04-05 14:49:55 +00:00
|
|
|
if (!_session)
|
|
|
|
{
|
|
|
|
NSString* requestSessionID=[self _requestSessionID];
|
|
|
|
NSDebugMLLog(@"sessions",@"requestSessionID=%@",requestSessionID);
|
|
|
|
if (requestSessionID)
|
|
|
|
[GSWApp restoreSessionWithID:requestSessionID
|
|
|
|
inContext:self];//Application call context _setSession
|
|
|
|
};
|
|
|
|
if (!_session)
|
|
|
|
[GSWApp _initializeSessionInContext:self]; //Application call context _setSession
|
2003-01-19 15:33:07 +00:00
|
|
|
|
2005-04-05 14:49:55 +00:00
|
|
|
NSAssert(_session,@"Unable to create new session");
|
|
|
|
|
|
|
|
session=_session;
|
|
|
|
};
|
|
|
|
NSDebugMLLog(@"sessions",@"session=%p",session);
|
2003-01-19 15:33:07 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2005-04-05 14:49:55 +00:00
|
|
|
|
|
|
|
return session;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)senderID
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _senderID;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2002-05-16 18:01:40 +00:00
|
|
|
#ifndef NDEBUG
|
2004-12-31 14:33:16 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-05-16 18:01:40 +00:00
|
|
|
-(void)incrementLoopLevel //ForDebugging purpose: each repetition increment and next decrement it
|
|
|
|
{
|
|
|
|
_loopLevel++;
|
|
|
|
};
|
2004-12-31 14:33:16 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-05-16 18:01:40 +00:00
|
|
|
-(void)decrementLoopLevel
|
|
|
|
{
|
|
|
|
_loopLevel--;
|
|
|
|
};
|
2002-07-27 23:48:47 +00:00
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-05-16 18:01:40 +00:00
|
|
|
-(BOOL)isInLoop
|
|
|
|
{
|
|
|
|
return _loopLevel>0;
|
|
|
|
};
|
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-05-16 18:01:40 +00:00
|
|
|
-(void)addToDocStructureElement:(id)element
|
|
|
|
{
|
|
|
|
if(GSDebugSet(@"GSWDocStructure"))
|
|
|
|
{
|
|
|
|
NSString* string=nil;
|
2004-12-14 23:48:51 +00:00
|
|
|
int elementIDNb=[_elementID elementsCount];
|
2002-05-16 18:01:40 +00:00
|
|
|
NSMutableData* data=[NSMutableData dataWithCapacity:elementIDNb+1];
|
2002-07-04 11:01:56 +00:00
|
|
|
char* ptab=(char*)[data bytes];
|
2002-05-16 18:01:40 +00:00
|
|
|
if (!_docStructure)
|
|
|
|
_docStructure=[NSMutableString new];
|
|
|
|
if (!_docStructureElements)
|
|
|
|
_docStructureElements=[NSMutableSet new];
|
|
|
|
memset(ptab,'\t',elementIDNb);
|
|
|
|
ptab[elementIDNb]='\0';
|
2004-04-06 11:15:53 +00:00
|
|
|
string=[NSString stringWithFormat:@"%s %@ Element %p Class %@ declarationName=%@\n",
|
2002-05-16 18:01:40 +00:00
|
|
|
ptab,
|
|
|
|
[self elementID],
|
|
|
|
element,
|
|
|
|
[element class],
|
2004-04-06 11:15:53 +00:00
|
|
|
[element declarationName]];
|
2002-05-16 18:01:40 +00:00
|
|
|
if (![_docStructureElements containsObject:string])
|
|
|
|
{
|
|
|
|
[_docStructure appendString:string];
|
|
|
|
[_docStructureElements addObject:string];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-05-16 18:01:40 +00:00
|
|
|
-(void)addDocStructureStep:(NSString*)stepLabel
|
|
|
|
{
|
|
|
|
if(GSDebugSet(@"GSWDocStructure"))
|
|
|
|
{
|
|
|
|
if (!_docStructure)
|
|
|
|
_docStructure=[NSMutableString new];
|
|
|
|
[_docStructureElements removeAllObjects];
|
|
|
|
[_docStructure appendFormat:@"===== %@ =====\n",stepLabel];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-05-16 18:01:40 +00:00
|
|
|
-(NSString*)docStructure
|
|
|
|
{
|
|
|
|
if(GSDebugSet(@"GSWDocStructure"))
|
|
|
|
return _docStructure;
|
|
|
|
else
|
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWContext (GSWURLGeneration)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
urlPrefix:(NSString*)urlPrefix
|
2002-07-27 23:48:47 +00:00
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
url=[self directActionURLForActionNamed:actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
urlPrefix:urlPrefix
|
2003-01-19 15:33:07 +00:00
|
|
|
queryDictionary:queryDictionary
|
2005-04-05 14:49:55 +00:00
|
|
|
isSecure:[[self request]isSecure]];
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
LOGObjectFnStop();
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
2004-01-09 11:41:44 +00:00
|
|
|
{
|
2004-12-14 12:54:40 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
|
|
|
url=[self directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:queryDictionary];
|
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
|
|
|
|
return url;
|
2004-01-09 11:41:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
urlPrefix:(NSString*)urlPrefix
|
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
2003-11-24 12:13:37 +00:00
|
|
|
pathQueryDictionary:(NSDictionary*)pathQueryDictionary
|
|
|
|
{
|
|
|
|
GSWDynamicURLString* url=nil;
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
LOGObjectFnStart();
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
url=[self directActionURLForActionNamed:actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
urlPrefix:urlPrefix
|
2003-11-24 12:13:37 +00:00
|
|
|
queryDictionary:queryDictionary
|
2004-12-14 12:54:40 +00:00
|
|
|
pathQueryDictionary:pathQueryDictionary
|
2005-04-05 14:49:55 +00:00
|
|
|
isSecure:[[self request]isSecure]];
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
LOGObjectFnStop();
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2003-01-19 15:33:07 +00:00
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
|
|
|
pathQueryDictionary:(NSDictionary*)pathQueryDictionary
|
|
|
|
{
|
2004-12-14 12:54:40 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
|
|
|
url=[self directActionURLForActionNamed:actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:queryDictionary
|
|
|
|
pathQueryDictionary:pathQueryDictionary];
|
2004-12-14 12:54:40 +00:00
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
|
|
|
|
return url;
|
2004-01-09 11:41:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
urlPrefix:(NSString*)urlPrefix
|
2003-01-19 15:33:07 +00:00
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
|
|
|
isSecure:(BOOL)isSecure
|
2003-11-24 12:13:37 +00:00
|
|
|
{
|
|
|
|
GSWDynamicURLString* url=nil;
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
LOGObjectFnStart();
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
url=[self directActionURLForActionNamed:actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
urlPrefix:urlPrefix
|
2003-11-24 12:13:37 +00:00
|
|
|
queryDictionary:queryDictionary
|
|
|
|
pathQueryDictionary:nil
|
2004-12-14 12:54:40 +00:00
|
|
|
isSecure:isSecure];
|
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
LOGObjectFnStop();
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
{
|
2004-12-14 12:54:40 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
|
|
|
url=[self directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:queryDictionary
|
|
|
|
isSecure:isSecure];
|
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
|
|
|
|
return url;
|
2004-01-09 11:41:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
urlPrefix:(NSString*)urlPrefix
|
2003-11-24 12:13:37 +00:00
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
|
|
|
pathQueryDictionary:(NSDictionary*)pathQueryDictionary
|
|
|
|
isSecure:(BOOL)isSecure
|
2003-01-19 15:33:07 +00:00
|
|
|
{
|
|
|
|
GSWDynamicURLString* url=nil;
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
LOGObjectFnStart();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
url=[self _directActionURLForActionNamed:actionName
|
2004-05-14 12:02:12 +00:00
|
|
|
urlPrefix:urlPrefix
|
2002-07-27 23:48:47 +00:00
|
|
|
queryDictionary:queryDictionary
|
2003-11-24 12:13:37 +00:00
|
|
|
pathQueryDictionary:pathQueryDictionary
|
2003-01-19 15:33:07 +00:00
|
|
|
isSecure:isSecure
|
2002-07-27 23:48:47 +00:00
|
|
|
url:url];
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"url=%@",url);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
return url;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-01-09 11:41:44 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
|
|
|
pathQueryDictionary:(NSDictionary*)pathQueryDictionary
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
{
|
|
|
|
return [self directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:queryDictionary
|
|
|
|
pathQueryDictionary:pathQueryDictionary
|
|
|
|
isSecure:isSecure];
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)componentActionURL
|
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
LOGObjectFnStartCond(dontTraceComponentActionURL==0);
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2005-04-05 14:49:55 +00:00
|
|
|
url=[self componentActionURLIsSecure:[[self request]isSecure]];
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
LOGObjectFnStopCond(dontTraceComponentActionURL==0);
|
2004-12-14 12:54:40 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
return url;
|
|
|
|
};
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2004-01-09 11:41:44 +00:00
|
|
|
//--------------------------------------------------------------------
|
2003-01-19 15:33:07 +00:00
|
|
|
-(GSWDynamicURLString*)componentActionURLIsSecure:(BOOL)isSecure
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
BOOL storesIDsInURLs=NO;
|
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
GSWSession* session=nil;
|
|
|
|
NSString* elementID=nil;
|
|
|
|
NSString* componentRequestHandlerKey=nil;
|
|
|
|
NSString* requestHandlerKey=nil;
|
|
|
|
NSString* requestHandlerPath=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStartCond(dontTraceComponentActionURL==0);
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"contextID=%u",_contextID);
|
2000-01-22 12:49:49 +00:00
|
|
|
/*
|
2002-07-27 23:48:47 +00:00
|
|
|
url=[[url copy] autorelease];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"url=%@",url);
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"urlApplicationNumber=%d",_urlApplicationNumber);
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"[url urlApplicationNumber]=%d",[url urlApplicationNumber]);
|
|
|
|
session=[self session]; //OK
|
|
|
|
NSDebugMLLogCond(dontTraceComponentActionURL==0,@"sessions",@"session=%@",session);
|
|
|
|
NSDebugMLLogCond(dontTraceComponentActionURL==0,@"sessions",@"sessionID=%@",[session sessionID]);
|
|
|
|
elementID=[self elementID];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"elementID=%@",elementID);
|
|
|
|
componentRequestHandlerKey=[GSWApplication componentRequestHandlerKey];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"componentRequestHandlerKey=%@",componentRequestHandlerKey);
|
|
|
|
[url setURLRequestHandlerKey:componentRequestHandlerKey];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"url=%@",url);
|
2000-01-22 12:49:49 +00:00
|
|
|
//call application pageCacheSize
|
2002-07-27 23:48:47 +00:00
|
|
|
storesIDsInURLs=[session storesIDsInURLs];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"storesIDsInURLs=%s",(storesIDsInURLs ? "YES" : "NO"));
|
|
|
|
if (storesIDsInURLs)
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* sessionID=[session sessionID];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"sessionID=%@",sessionID);
|
|
|
|
[url setURLRequestHandlerPath:[NSString stringWithFormat:@"%@/%u.%@",
|
|
|
|
sessionID,
|
|
|
|
contextID,
|
|
|
|
elementID]];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"url=%@",url);
|
2000-01-22 12:49:49 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
[url setURLRequestHandlerPath:[NSString stringWithFormat:@"/%u.%@", //??
|
|
|
|
_contextID,
|
|
|
|
elementID]];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"url=%@",url);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
2002-07-27 23:48:47 +00:00
|
|
|
[url setURLQueryString:nil]; //???
|
2000-01-22 12:49:49 +00:00
|
|
|
*/
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"urlApplicationNumber=%d",_urlApplicationNumber);
|
|
|
|
session=[self session]; //OK
|
|
|
|
NSDebugMLLogCond(dontTraceComponentActionURL==0,@"sessions",@"session=%@",session);
|
|
|
|
NSDebugMLLogCond(dontTraceComponentActionURL==0,@"sessions",@"sessionID=%@",[session sessionID]);
|
|
|
|
elementID=[self elementID];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"elementID=%@",elementID);
|
|
|
|
componentRequestHandlerKey=[GSWApplication componentRequestHandlerKey];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"componentRequestHandlerKey=%@",componentRequestHandlerKey);
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
requestHandlerKey=componentRequestHandlerKey;
|
|
|
|
storesIDsInURLs=[session storesIDsInURLs];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"storesIDsInURLs=%s",(storesIDsInURLs ? "YES" : "NO"));
|
2005-04-05 14:49:55 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
if (storesIDsInURLs)
|
|
|
|
{
|
|
|
|
NSString* sessionID=[_session sessionID];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"sessionID=%@",sessionID);
|
2005-04-05 14:49:55 +00:00
|
|
|
// requestHandlerPath as sessionID/_contextID.elementID
|
|
|
|
if (sessionID)
|
|
|
|
{
|
|
|
|
requestHandlerPath=[[sessionID stringByAppendingString:@"/"]
|
|
|
|
stringByAppendingString:GSWContext_contextAndElementID(self)];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
requestHandlerPath=[@"/" stringByAppendingString:GSWContext_contextAndElementID(self)];
|
|
|
|
};
|
2002-07-27 23:48:47 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2005-04-05 14:49:55 +00:00
|
|
|
{
|
|
|
|
// requestHandlerPath as /_contextID.elementID
|
|
|
|
requestHandlerPath=[@"/" stringByAppendingString:GSWContext_contextAndElementID(self)];
|
|
|
|
};
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"requestHandlerPath=%@",requestHandlerPath);
|
|
|
|
url=[self urlWithRequestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
2004-12-14 12:54:40 +00:00
|
|
|
queryString:nil
|
|
|
|
isSecure:isSecure];
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"url=%@",url);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStopCond(dontTraceComponentActionURL==0);
|
2002-07-27 23:48:47 +00:00
|
|
|
return url;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2003-04-09 12:03:17 +00:00
|
|
|
//--------------------------------------------------------------------
|
2004-01-09 11:41:44 +00:00
|
|
|
-(GSWDynamicURLString*)urlWithURLPrefix:(NSString*)urlPrefix
|
|
|
|
requestHandlerKey:(NSString*)requestHandlerKey
|
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
port:(int)port
|
2003-04-09 12:03:17 +00:00
|
|
|
{
|
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
GSWRequest* request=[self request];
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2003-04-09 12:03:17 +00:00
|
|
|
LOGObjectFnStartCond(dontTraceComponentActionURL==0);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"urlPrefix=%@",urlPrefix);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"requestHandlerKey=%@",requestHandlerKey);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"requestHandlerPath=%@",requestHandlerPath);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"queryString=%@",queryString);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"isSecure=%d",isSecure);
|
2003-04-09 12:03:17 +00:00
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
|
|
|
@"generateCompleteURLs=%s",
|
|
|
|
(_generateCompleteURLs ? "YES" : "NO"));
|
|
|
|
|
|
|
|
// Try to avoid complete URLs
|
|
|
|
if (_generateCompleteURLs
|
|
|
|
|| (isSecure!=[request isSecure])
|
|
|
|
|| (port!=0 && port!=[request urlPort]))
|
2004-01-09 11:41:44 +00:00
|
|
|
url=[self completeURLWithURLPrefix:urlPrefix
|
|
|
|
requestHandlerKey:requestHandlerKey
|
2003-04-09 12:03:17 +00:00
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString
|
|
|
|
isSecure:isSecure
|
|
|
|
port:port];
|
|
|
|
else
|
2004-01-09 11:41:44 +00:00
|
|
|
url=[request _urlWithURLPrefix:urlPrefix
|
|
|
|
requestHandlerKey:requestHandlerKey
|
2003-04-09 12:03:17 +00:00
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString];
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2003-04-09 12:03:17 +00:00
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
|
|
|
@"url=%@",url);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2003-04-09 12:03:17 +00:00
|
|
|
LOGObjectFnStopCond(dontTraceComponentActionURL==0);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2003-04-09 12:03:17 +00:00
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(GSWDynamicURLString*)urlWithRequestHandlerKey:(NSString*)requestHandlerKey
|
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
2004-01-09 11:41:44 +00:00
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
port:(int)port
|
|
|
|
{
|
|
|
|
return [self urlWithURLPrefix:nil
|
|
|
|
requestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString
|
|
|
|
isSecure:isSecure
|
|
|
|
port:port];
|
|
|
|
}
|
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)urlWithURLPrefix:(NSString*)urlPrefix
|
2004-12-31 14:33:16 +00:00
|
|
|
requestHandlerKey:(NSString*)requestHandlerKey
|
2004-12-14 12:54:40 +00:00
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
|
|
|
{
|
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
|
|
|
LOGObjectFnStartCond(dontTraceComponentActionURL==0);
|
|
|
|
|
|
|
|
url=[self urlWithURLPrefix:urlPrefix
|
2004-12-31 14:33:16 +00:00
|
|
|
requestHandlerKey:requestHandlerKey
|
2004-12-14 12:54:40 +00:00
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString
|
2005-04-05 14:49:55 +00:00
|
|
|
isSecure:[[self request]isSecure]];
|
2004-12-14 12:54:40 +00:00
|
|
|
LOGObjectFnStopCond(dontTraceComponentActionURL==0);
|
|
|
|
|
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
2004-01-09 11:41:44 +00:00
|
|
|
//--------------------------------------------------------------------
|
2004-05-14 12:02:12 +00:00
|
|
|
//TODO rewrite to avoid request call
|
2004-01-09 11:41:44 +00:00
|
|
|
-(GSWDynamicURLString*)urlWithURLPrefix:(NSString*)urlPrefix
|
2004-12-31 14:33:16 +00:00
|
|
|
requestHandlerKey:(NSString*)requestHandlerKey
|
2004-01-09 11:41:44 +00:00
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
2004-12-14 12:54:40 +00:00
|
|
|
isSecure:(BOOL)isSecure
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
GSWRequest* request=[self request];
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
LOGObjectFnStartCond(dontTraceComponentActionURL==0);
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
|
|
|
@"generateCompleteURLs=%s",
|
2002-07-27 23:48:47 +00:00
|
|
|
(_generateCompleteURLs ? "YES" : "NO"));
|
|
|
|
if (_generateCompleteURLs)
|
|
|
|
url=[self completeURLWithRequestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
2004-12-14 12:54:40 +00:00
|
|
|
queryString:queryString
|
|
|
|
isSecure:isSecure
|
|
|
|
port:0];
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2004-05-14 12:02:12 +00:00
|
|
|
{
|
|
|
|
url=[request _urlWithRequestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString];
|
|
|
|
[url setURLApplicationNumber:_urlApplicationNumber];
|
|
|
|
};
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
2002-07-27 23:48:47 +00:00
|
|
|
@"url=%@",url);
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
LOGObjectFnStopCond(dontTraceComponentActionURL==0);
|
2002-07-27 23:48:47 +00:00
|
|
|
return url;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-01-09 11:41:44 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)urlWithRequestHandlerKey:(NSString*)requestHandlerKey
|
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
|
|
|
{
|
|
|
|
return [self urlWithURLPrefix:nil
|
2004-12-31 14:33:16 +00:00
|
|
|
requestHandlerKey:requestHandlerKey
|
2004-01-09 11:41:44 +00:00
|
|
|
path:requestHandlerPath
|
2004-12-14 12:54:40 +00:00
|
|
|
queryString:queryString
|
2005-04-05 14:49:55 +00:00
|
|
|
isSecure:[[self request]isSecure]];
|
2004-01-09 11:41:44 +00:00
|
|
|
};
|
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)urlWithRequestHandlerKey:(NSString*)requestHandlerKey
|
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
{
|
|
|
|
return [self urlWithURLPrefix:nil
|
2004-12-31 14:33:16 +00:00
|
|
|
requestHandlerKey:requestHandlerKey
|
2004-12-14 12:54:40 +00:00
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString
|
|
|
|
isSecure:isSecure];
|
|
|
|
};
|
2004-01-09 11:41:44 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
2004-01-09 11:41:44 +00:00
|
|
|
-(GSWDynamicURLString*)completeURLWithURLPrefix:(NSString*)urlPrefix
|
|
|
|
requestHandlerKey:(NSString*)requestHandlerKey
|
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWRequest* request=nil;
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
LOGObjectFnStartCond(dontTraceComponentActionURL==0);
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
request=[self request];
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
url=[self completeURLWithURLPrefix:urlPrefix
|
|
|
|
requestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString
|
|
|
|
isSecure:[request isSecure]
|
|
|
|
port:[request urlPort]];
|
|
|
|
|
|
|
|
LOGObjectFnStopCond(dontTraceComponentActionURL==0);
|
|
|
|
|
|
|
|
return url;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2004-01-09 11:41:44 +00:00
|
|
|
//NDFN
|
2002-07-27 23:48:47 +00:00
|
|
|
-(GSWDynamicURLString*)completeURLWithRequestHandlerKey:(NSString*)requestHandlerKey
|
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
2004-01-09 11:41:44 +00:00
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
|
|
|
LOGObjectFnStartCond(dontTraceComponentActionURL==0);
|
|
|
|
|
|
|
|
url=[self completeURLWithURLPrefix:nil
|
|
|
|
requestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString];
|
|
|
|
|
|
|
|
LOGObjectFnStopCond(dontTraceComponentActionURL==0);
|
|
|
|
|
|
|
|
return url;
|
2004-01-09 11:41:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2004-05-14 12:02:12 +00:00
|
|
|
//TODO: rewrite. We have to decide if we use mainly request or _uri
|
2004-01-09 11:41:44 +00:00
|
|
|
-(GSWDynamicURLString*)completeURLWithURLPrefix:(NSString*)urlPrefix
|
|
|
|
requestHandlerKey:(NSString*)requestHandlerKey
|
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
port:(int)port
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
NSString* host=nil;
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
GSWRequest* request=nil;
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
NSDebugMLLog(@"low",@"urlPrefix=%@",urlPrefix);
|
|
|
|
NSDebugMLLog(@"low",@"requestHandlerKey=%@",requestHandlerKey);
|
|
|
|
NSDebugMLLog(@"low",@"requestHandlerPath=%@",requestHandlerPath);
|
|
|
|
NSDebugMLLog(@"low",@"queryString=%@",queryString);
|
|
|
|
NSDebugMLLog(@"low",@"isSecure=%d",isSecure);
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
request=[self request];
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
if (urlPrefix)
|
|
|
|
url=[_request _urlWithURLPrefix:urlPrefix
|
|
|
|
requestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString];
|
|
|
|
else
|
|
|
|
url=[_request _urlWithRequestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString];
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"low",@"url=%@",url);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
[url setURLApplicationNumber:_urlApplicationNumber];
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
if (isSecure)
|
|
|
|
[url setURLProtocol:GSWProtocol_HTTPS];
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-07-27 23:48:47 +00:00
|
|
|
[url setURLProtocol:GSWProtocol_HTTP];
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
if (port)
|
|
|
|
[url setURLPort:port];
|
|
|
|
NSDebugMLLog(@"low",@"url=%@",url);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
host=[request urlHost];
|
2003-04-09 12:03:17 +00:00
|
|
|
NSAssert1(host,@"No host in request %@",request);
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
NSDebugMLLog(@"low",@"host=%@",host);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
[url setURLHost:host];
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"low",@"url=%@",url);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
return url;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-01-09 11:41:44 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)completeURLWithRequestHandlerKey:(NSString*)requestHandlerKey
|
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
port:(int)port
|
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
|
|
|
url=[self completeURLWithURLPrefix:nil
|
|
|
|
requestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString
|
|
|
|
isSecure:isSecure
|
|
|
|
port:port];
|
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
|
|
|
|
return url;
|
2004-01-09 11:41:44 +00:00
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWContext (GSWContextA)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)_initWithContextID:(unsigned int)contextID
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"low",@"contextID=%u",contextID);
|
|
|
|
_contextID=contextID;
|
|
|
|
DESTROY(_url);
|
|
|
|
_url=[GSWDynamicURLString new];
|
|
|
|
DESTROY(_awakePageComponents);
|
|
|
|
_awakePageComponents=[NSMutableArray new];
|
|
|
|
_urlApplicationNumber=-1;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
return self;
|
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWContext (GSWContextB)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_isMultipleSubmitForm
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _isMultipleSubmitForm;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setIsMultipleSubmitForm:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_isMultipleSubmitForm=flag;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_wasActionInvoked
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _actionInvoked;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setActionInvoked:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLLog(@"gswdync",@"Set Action invoked:%d",flag);
|
2002-07-27 23:48:47 +00:00
|
|
|
_actionInvoked=flag;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_wasFormSubmitted
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _formSubmitted;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setFormSubmitted:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_formSubmitted=flag;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_putAwakeComponentsToSleep
|
|
|
|
{
|
|
|
|
int i=0;
|
2004-12-31 14:33:16 +00:00
|
|
|
int count=0;
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWComponent* component=nil;
|
2004-12-31 14:33:16 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2004-12-31 14:33:16 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"low",@"awakePageComponents=%@",_awakePageComponents);
|
2004-12-31 14:33:16 +00:00
|
|
|
count=[_awakePageComponents count];
|
|
|
|
|
|
|
|
for(i=0;i<count;i++)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
|
|
|
component=[_awakePageComponents objectAtIndex:i];
|
|
|
|
[component sleepInContext:self];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2003-01-19 15:33:07 +00:00
|
|
|
-(BOOL)_generateCompleteURLs
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
BOOL previousState=_generateCompleteURLs;
|
2002-07-27 23:48:47 +00:00
|
|
|
_generateCompleteURLs=YES;
|
2003-01-19 15:33:07 +00:00
|
|
|
return previousState;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_generateRelativeURLs
|
|
|
|
{
|
|
|
|
BOOL previousState=!_generateCompleteURLs;
|
|
|
|
_generateCompleteURLs=NO;
|
|
|
|
return previousState;
|
|
|
|
};
|
|
|
|
|
2004-12-31 14:33:16 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)isGeneratingCompleteURLs
|
|
|
|
{
|
|
|
|
return _generateCompleteURLs;
|
|
|
|
};
|
2004-01-09 11:41:44 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//_url is a semi complete one: line /cgi/WebObjects.exe/ObjCTest3.woa
|
2003-11-24 12:13:37 +00:00
|
|
|
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
urlPrefix:(NSString*)urlPrefix
|
2003-11-24 12:13:37 +00:00
|
|
|
queryDictionary:(NSDictionary*)dict
|
|
|
|
url:(id)anURL
|
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
LOGObjectFnStart();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
url=[self _directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:urlPrefix
|
|
|
|
queryDictionary:dict
|
|
|
|
pathQueryDictionary:nil
|
|
|
|
url:anURL];
|
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
LOGObjectFnStop();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
return url;
|
2003-11-24 12:13:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//_url is a semi complete one: line /cgi/WebObjects.exe/ObjCTest3.woa
|
|
|
|
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
queryDictionary:(NSDictionary*)dict
|
|
|
|
url:(id)anURL
|
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
|
|
|
url=[self _directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:dict
|
|
|
|
url:anURL];
|
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
return url;
|
2004-01-09 11:41:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//_url is a semi complete one: line /cgi/WebObjects.exe/ObjCTest3.woa
|
|
|
|
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
urlPrefix:(NSString*)urlPrefix
|
2003-11-24 12:13:37 +00:00
|
|
|
queryDictionary:(NSDictionary*)dict
|
|
|
|
pathQueryDictionary:(NSDictionary*)pathQueryDictionary
|
|
|
|
url:(id)anURL
|
2003-01-19 15:33:07 +00:00
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
LOGObjectFnStart();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
url=[self _directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:urlPrefix
|
|
|
|
queryDictionary:dict
|
|
|
|
pathQueryDictionary:pathQueryDictionary
|
2005-04-05 14:49:55 +00:00
|
|
|
isSecure:[[self request]isSecure]
|
2004-05-14 12:02:12 +00:00
|
|
|
url:anURL];
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
LOGObjectFnStop();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
return url;
|
2003-01-19 15:33:07 +00:00
|
|
|
};
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
//_url is a semi complete one: line /cgi/WebObjects.exe/ObjCTest3.woa
|
2003-11-24 12:13:37 +00:00
|
|
|
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
queryDictionary:(NSDictionary*)dict
|
|
|
|
pathQueryDictionary:(NSDictionary*)pathQueryDictionary
|
|
|
|
url:(id)anURL
|
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
|
|
|
url=[self _directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:dict
|
|
|
|
pathQueryDictionary:pathQueryDictionary
|
|
|
|
url:anURL];
|
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
|
|
|
|
return url;
|
2004-01-09 11:41:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//_url is a semi complete one: line /cgi/WebObjects.exe/ObjCTest3.woa
|
|
|
|
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
urlPrefix:(NSString*)urlPrefix
|
2003-11-24 12:13:37 +00:00
|
|
|
queryDictionary:(NSDictionary*)dict
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
url:(id)anURL
|
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
LOGObjectFnStart();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
url=[self _directActionURLForActionNamed:actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
urlPrefix:urlPrefix
|
2003-11-24 12:13:37 +00:00
|
|
|
queryDictionary:dict
|
|
|
|
pathQueryDictionary:nil
|
|
|
|
isSecure:isSecure
|
|
|
|
url:anURL];
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
LOGObjectFnStop();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
return url;
|
2003-11-24 12:13:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//_url is a semi complete one: line /cgi/WebObjects.exe/ObjCTest3.woa
|
|
|
|
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
queryDictionary:(NSDictionary*)dict
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
url:(id)anURL
|
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
|
|
|
url=[self _directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:dict
|
|
|
|
isSecure:isSecure
|
|
|
|
url:anURL];
|
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
|
|
|
|
return url;
|
2004-01-09 11:41:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//_url is a semi complete one: line /cgi/WebObjects.exe/ObjCTest3.woa
|
|
|
|
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
urlPrefix:(NSString*)urlPrefix
|
2003-11-24 12:13:37 +00:00
|
|
|
queryDictionary:(NSDictionary*)dict
|
|
|
|
pathQueryDictionary:(NSDictionary*)pathQueryDictionary
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
url:(id)anURL
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2005-04-05 14:49:55 +00:00
|
|
|
NSMutableString* queryString=nil;
|
2002-07-27 23:48:47 +00:00
|
|
|
NSEnumerator* enumerator =nil;
|
|
|
|
id key=nil;
|
2003-11-24 12:13:37 +00:00
|
|
|
NSString* path=nil;
|
2005-04-05 14:49:55 +00:00
|
|
|
IMP queryString_appendStringIMP=NULL;
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"actionName=%@",actionName);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"urlPrefix=%@",urlPrefix);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"dict=%@",dict);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"pathQueryDictionary=%@",pathQueryDictionary);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"isSecure=%d",isSecure);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
|
|
|
@"anURL=%@",anURL);
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
// _url=[[_url copy] autorelease];
|
|
|
|
//TODOV
|
2002-07-27 23:48:47 +00:00
|
|
|
enumerator = [dict keyEnumerator];
|
2005-04-05 14:49:55 +00:00
|
|
|
// Build queryString as key=value[&key=value]..
|
2002-07-27 23:48:47 +00:00
|
|
|
while ((key = [enumerator nextObject]))
|
|
|
|
{
|
|
|
|
if (!queryString)
|
2005-04-05 14:49:55 +00:00
|
|
|
queryString=(NSMutableString*)[NSMutableString string];
|
2002-07-27 23:48:47 +00:00
|
|
|
else
|
2005-04-05 14:49:55 +00:00
|
|
|
{
|
|
|
|
GSWeb_appendStringWithImpPtr(queryString,
|
|
|
|
&queryString_appendStringIMP,
|
|
|
|
@"&");
|
|
|
|
}
|
|
|
|
GSWeb_appendStringWithImpPtr(queryString,
|
|
|
|
&queryString_appendStringIMP,
|
|
|
|
NSStringWithObject(key));
|
|
|
|
GSWeb_appendStringWithImpPtr(queryString,
|
|
|
|
&queryString_appendStringIMP,
|
|
|
|
@"=");
|
|
|
|
GSWeb_appendStringWithImpPtr(queryString,
|
|
|
|
&queryString_appendStringIMP,
|
|
|
|
NSStringWithObject([dict objectForKey:key]));
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
/*
|
2002-07-27 23:48:47 +00:00
|
|
|
[anURL setURLRequestHandlerKey:GSWDirectActionRequestHandlerKey[GSWebNamingConv]];
|
|
|
|
[anURL setURLRequestHandlerPath:actionName];
|
|
|
|
[anURL setURLQueryString:queryString];
|
2000-01-22 12:49:49 +00:00
|
|
|
*/
|
2003-04-09 12:03:17 +00:00
|
|
|
|
|
|
|
/* anURL=[self completeURLWithRequestHandlerKey:GSWDirectActionRequestHandlerKey[GSWebNamingConv]
|
|
|
|
path:actionName
|
|
|
|
queryString:queryString
|
|
|
|
isSecure:isSecure
|
|
|
|
port:0];
|
|
|
|
*/
|
2003-11-24 12:13:37 +00:00
|
|
|
if ([pathQueryDictionary count]>0)
|
|
|
|
{
|
2005-04-05 14:49:55 +00:00
|
|
|
IMP tmpPath_appendStringIMP=NULL;
|
|
|
|
NSMutableString* tmpPath=(NSMutableString*)[NSMutableString stringWithString:actionName];
|
2003-11-24 12:13:37 +00:00
|
|
|
// We sort keys so URL are always the same for same parameters
|
|
|
|
NSArray* keys=[[pathQueryDictionary allKeys]sortedArrayUsingSelector:@selector(compare:)];
|
|
|
|
int count=[keys count];
|
|
|
|
int i=0;
|
|
|
|
NSDebugMLLog(@"gswdync",@"pathQueryDictionary=%@",pathQueryDictionary);
|
2005-04-05 14:49:55 +00:00
|
|
|
|
|
|
|
// append each key/value pair as /key=value
|
2003-11-24 12:13:37 +00:00
|
|
|
for(i=0;i<count;i++)
|
|
|
|
{
|
|
|
|
id key = [keys objectAtIndex:i];
|
|
|
|
id value = [pathQueryDictionary valueForKey:key];
|
|
|
|
NSDebugMLLog(@"gswdync",@"key=%@",key);
|
|
|
|
NSDebugMLLog(@"gswdync",@"value=%@",value);
|
|
|
|
if (!value)
|
|
|
|
value=[NSString string];
|
2005-04-05 14:49:55 +00:00
|
|
|
GSWeb_appendStringWithImpPtr(tmpPath,&tmpPath_appendStringIMP,
|
|
|
|
@"/");
|
|
|
|
GSWeb_appendStringWithImpPtr(tmpPath,&tmpPath_appendStringIMP,
|
|
|
|
NSStringWithObject(key));
|
|
|
|
GSWeb_appendStringWithImpPtr(tmpPath,&tmpPath_appendStringIMP,
|
|
|
|
@"=");
|
|
|
|
GSWeb_appendStringWithImpPtr(tmpPath,&tmpPath_appendStringIMP,
|
|
|
|
NSStringWithObject(value));
|
2003-11-24 12:13:37 +00:00
|
|
|
};
|
2005-04-05 14:49:55 +00:00
|
|
|
path=tmpPath;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
path=actionName;
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2004-01-09 11:41:44 +00:00
|
|
|
if (urlPrefix)
|
|
|
|
anURL=[self urlWithURLPrefix:urlPrefix
|
|
|
|
requestHandlerKey:GSWDirectActionRequestHandlerKey[GSWebNamingConv]
|
|
|
|
path:path
|
|
|
|
queryString:queryString
|
|
|
|
isSecure:isSecure
|
|
|
|
port:0];
|
|
|
|
else
|
|
|
|
anURL=[self urlWithRequestHandlerKey:GSWDirectActionRequestHandlerKey[GSWebNamingConv]
|
|
|
|
path:path
|
|
|
|
queryString:queryString
|
|
|
|
isSecure:isSecure
|
|
|
|
port:0];
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,
|
2002-07-27 23:48:47 +00:00
|
|
|
@"url=%@",anURL);
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2004-05-14 12:02:12 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
return anURL;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-01-09 11:41:44 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//_url is a semi complete one: line /cgi/WebObjects.exe/ObjCTest3.woa
|
|
|
|
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
queryDictionary:(NSDictionary*)dict
|
|
|
|
pathQueryDictionary:(NSDictionary*)pathQueryDictionary
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
url:(id)anURL
|
|
|
|
{
|
|
|
|
return [self _directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:dict
|
|
|
|
pathQueryDictionary:pathQueryDictionary
|
|
|
|
isSecure:isSecure
|
|
|
|
url:anURL];
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2003-11-24 12:13:37 +00:00
|
|
|
/** Returns array of languages
|
|
|
|
First try session languages, if none, try self language
|
|
|
|
If none, try request languages
|
|
|
|
**/
|
2000-01-22 12:49:49 +00:00
|
|
|
-(NSArray*)languages
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSArray* languages=nil;
|
2003-11-24 12:13:37 +00:00
|
|
|
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
2005-04-05 14:49:55 +00:00
|
|
|
languages=[[self _session] languages];
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"_session %p languages=%@",_session,languages);
|
2003-11-24 12:13:37 +00:00
|
|
|
|
|
|
|
if ([languages count]==0)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-11-24 12:13:37 +00:00
|
|
|
languages=_languages;
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"context %p languages=%@",self,languages);
|
2003-11-24 12:13:37 +00:00
|
|
|
|
|
|
|
if ([languages count]==0)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-11-24 12:13:37 +00:00
|
|
|
languages=[[self request]browserLanguages];
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"resquest %p browserLanguages=%@",[self request],languages);
|
2003-11-24 12:13:37 +00:00
|
|
|
}
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"context %p ==> languages=%@",self,languages);
|
2003-11-24 12:13:37 +00:00
|
|
|
|
|
|
|
//GSWeb specific: It enable application languages filtering
|
2002-07-27 23:48:47 +00:00
|
|
|
languages=[GSWApp filterLanguages:languages];
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"context %p ==> filtered languages=%@",self,languages);
|
2003-11-24 12:13:37 +00:00
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
return languages;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2003-11-24 12:13:37 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_setLanguages:(NSArray*)languages
|
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"languages=%@",languages);
|
2003-11-24 12:13:37 +00:00
|
|
|
|
|
|
|
ASSIGNCOPY(_languages,languages);
|
|
|
|
|
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWComponent*)_pageComponent
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _pageComponent;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWElement*)_pageElement
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _pageElement;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setPageElement:(GSWElement*)element
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
2003-01-19 15:33:07 +00:00
|
|
|
if (_pageElement!=element)
|
|
|
|
{
|
|
|
|
ASSIGN(_pageElement,element);
|
|
|
|
|
|
|
|
[self _setPageComponent:nil];
|
|
|
|
|
|
|
|
if ([element isKindOfClass:[GSWComponent class]])
|
|
|
|
[self _setPageComponent:(GSWComponent*)element];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setPageComponent:(GSWComponent*)component
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
ASSIGN(_pageComponent,component);
|
|
|
|
if (component)
|
|
|
|
[self _takeAwakeComponent:component];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setResponse:(GSWResponse*)aResponse
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
ASSIGN(_response,aResponse);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setRequest:(GSWRequest*)aRequest
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* adaptorPrefix=nil;
|
|
|
|
NSString* applicationName=nil;
|
2003-01-19 15:33:07 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2003-01-19 15:33:07 +00:00
|
|
|
|
|
|
|
if (_request!=aRequest)
|
|
|
|
{
|
|
|
|
NSDebugMLLog(@"low",@"aRequest=%@",aRequest);
|
|
|
|
ASSIGN(_request,aRequest);
|
|
|
|
|
|
|
|
[_request _setContext:self];
|
|
|
|
|
|
|
|
NSDebugMLLog(@"low",@"url=%@",_url);
|
|
|
|
|
|
|
|
adaptorPrefix=[aRequest adaptorPrefix];
|
|
|
|
NSDebugMLLog(@"low",@"adaptorPrefix=%@",adaptorPrefix);
|
|
|
|
[_url setURLPrefix:adaptorPrefix];
|
|
|
|
|
|
|
|
NSDebugMLLog(@"low",@"url=%@",_url);
|
|
|
|
|
|
|
|
applicationName=[aRequest applicationName];
|
|
|
|
NSDebugMLLog(@"low",@"applicationName=%@",applicationName);
|
|
|
|
[_url setURLApplicationName:applicationName];
|
|
|
|
|
|
|
|
NSDebugMLLog(@"low",@"url=%@",_url);
|
|
|
|
|
|
|
|
[self _synchronizeForDistribution];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setSession:(GSWSession*)aSession
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"sessions",@"aSession ID:%@",[aSession sessionID]);
|
2003-01-19 15:33:07 +00:00
|
|
|
if (_session!=aSession)
|
|
|
|
{
|
|
|
|
ASSIGN(_session,aSession);
|
|
|
|
[self _synchronizeForDistribution];
|
|
|
|
};
|
|
|
|
if (_session)
|
|
|
|
{
|
|
|
|
NSDebugMLLog(@"low",@"contextID=%u",_contextID);
|
|
|
|
_contextID=[_session _contextCounter];
|
|
|
|
NSDebugMLLog(@"low",@"contextID=%u",_contextID);
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setSenderID:(NSString*)aSenderID
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
ASSIGNCOPY(_senderID,aSenderID);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_synchronizeForDistribution
|
|
|
|
{
|
2003-04-09 12:03:17 +00:00
|
|
|
int instance=-1;
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2003-04-09 12:03:17 +00:00
|
|
|
if (_request)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2004-05-14 12:02:12 +00:00
|
|
|
BOOL storesIDsInURLs=NO;
|
|
|
|
BOOL isDistributionEnabled=NO;
|
|
|
|
NSString* sessionID=nil;
|
2005-04-05 14:49:55 +00:00
|
|
|
GSWSession* session=nil;
|
|
|
|
|
|
|
|
if (![self isSessionDisabled])
|
|
|
|
{
|
|
|
|
session=[self _session];
|
|
|
|
|
|
|
|
storesIDsInURLs=[session storesIDsInURLs];
|
|
|
|
isDistributionEnabled=[session isDistributionEnabled];
|
|
|
|
|
|
|
|
NSDebugMLLog(@"GSWContext",@"storesIDsInURLs=%d",storesIDsInURLs);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"isDistributionEnabled=%d",isDistributionEnabled);
|
|
|
|
|
|
|
|
NSDebugMLLog(@"GSWContext",@"_session=%p",_session);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"_request=%p",_request);
|
|
|
|
|
|
|
|
sessionID=[_request sessionID];
|
|
|
|
};
|
|
|
|
|
2003-04-09 12:03:17 +00:00
|
|
|
instance=[_request applicationNumber];
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"instance=%d",instance);
|
|
|
|
NSDebugMLLog(@"GSWContext",@"sessionID=%@",sessionID);
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2004-05-14 12:02:12 +00:00
|
|
|
// Set instance to -1
|
|
|
|
// if we don't store IDs in URLs and distribution is enabled
|
|
|
|
// or if we don't have session nor session id
|
|
|
|
if ((isDistributionEnabled && !storesIDsInURLs)
|
2005-04-05 14:49:55 +00:00
|
|
|
|| (!session && !sessionID))
|
2003-11-24 12:13:37 +00:00
|
|
|
instance=-1;
|
2003-04-09 12:03:17 +00:00
|
|
|
};
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2004-12-14 12:54:40 +00:00
|
|
|
NSDebugMLLog(@"GSWContext",@"instance=%d",instance);
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2003-04-09 12:03:17 +00:00
|
|
|
_urlApplicationNumber = instance;
|
|
|
|
[_url setURLApplicationNumber:instance];
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_incrementContextID
|
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
_contextID++;
|
2002-07-27 23:48:47 +00:00
|
|
|
[_session _contextDidIncrementContextID];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWSession*)existingSession
|
|
|
|
{
|
2005-04-05 14:49:55 +00:00
|
|
|
if ([self isSessionDisabled])
|
|
|
|
return nil;
|
|
|
|
else
|
|
|
|
return _session;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setCurrentComponent:(GSWComponent*)component
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
ASSIGN(_currentComponent,component);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setPageReplaced:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_pageReplaced=flag;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_pageReplaced
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _pageReplaced;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setPageChanged:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_pageChanged=flag;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_pageChanged
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _pageChanged;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_setRequestContextID:(NSString*)contextID
|
|
|
|
{
|
|
|
|
ASSIGN(_requestContextID,contextID);
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)_requestContextID
|
|
|
|
{
|
|
|
|
return _requestContextID;
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setRequestSessionID:(NSString*)aSessionID
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
ASSIGNCOPY(_requestSessionID,aSessionID);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)_requestSessionID
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _requestSessionID;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2003-01-19 15:33:07 +00:00
|
|
|
-(void)_takeAwakeComponentsFromArray:(NSArray*)components
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
LOGObjectFnStart();
|
|
|
|
if ([components count]>0)
|
|
|
|
{
|
|
|
|
NSEnumerator* enumerator = nil;
|
|
|
|
GSWComponent* component = nil;
|
|
|
|
if (!_awakePageComponents)
|
|
|
|
_awakePageComponents=[NSMutableArray new];
|
|
|
|
|
|
|
|
enumerator = [components objectEnumerator];
|
|
|
|
while ((component = [enumerator nextObject]))
|
|
|
|
{
|
|
|
|
if (![_awakePageComponents containsObject:component])
|
|
|
|
[_awakePageComponents addObject:component];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
LOGObjectFnStop();
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_takeAwakeComponent:(GSWComponent*)component
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLLog(@"low",@"component: %@",[component class]);
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_awakePageComponents)
|
|
|
|
_awakePageComponents=[NSMutableArray new];
|
2003-01-19 15:33:07 +00:00
|
|
|
if (![_awakePageComponents containsObject:component])
|
|
|
|
[_awakePageComponents addObject:component];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSMutableDictionary*)userInfo
|
|
|
|
{
|
|
|
|
return [self _userInfo];
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSMutableDictionary*)_userInfo
|
|
|
|
{
|
|
|
|
if (!_userInfo)
|
|
|
|
_userInfo=[NSMutableDictionary new];
|
|
|
|
return _userInfo;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_setUserInfo:(NSMutableDictionary*)userInfo
|
|
|
|
{
|
|
|
|
NSAssert2(!userInfo || [userInfo isKindOfClass:[NSMutableDictionary class]],
|
|
|
|
@"userInfo is not a NSMutableDictionary but a %@: %@",
|
|
|
|
[userInfo class],
|
|
|
|
userInfo);
|
|
|
|
ASSIGN(_userInfo,userInfo);
|
|
|
|
};
|
2004-12-31 14:33:16 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// context can add key/values in query dictionary
|
|
|
|
-(NSDictionary*)computeQueryDictionary:(NSDictionary*)queryDictionary
|
|
|
|
{
|
|
|
|
//Do nothing
|
|
|
|
return queryDictionary;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// context can add key/values in query dictionary
|
|
|
|
-(NSDictionary*)computePathQueryDictionary:(NSDictionary*)queryDictionary
|
|
|
|
{
|
|
|
|
//Do nothing
|
|
|
|
return queryDictionary;
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
2004-12-31 14:33:16 +00:00
|
|
|
@implementation GSWContext (GSWContextElementID)
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// incrementLastElementIDComponent
|
|
|
|
-(void)incrementLastElementIDComponent
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_elementID)
|
2004-12-31 14:33:16 +00:00
|
|
|
[self _createElementID];
|
|
|
|
|
|
|
|
NSAssert(_elementIDIMPs._incrementLastElementIDComponentIMP,
|
|
|
|
@"No _elementIDIMPs._incrementLastElementIDComponentIMP");
|
|
|
|
(*_elementIDIMPs._incrementLastElementIDComponentIMP)(_elementID,incrementLastElementIDComponentSEL);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// appendElementIDComponent:
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)appendElementIDComponent:(NSString*)string
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_elementID)
|
2004-12-31 14:33:16 +00:00
|
|
|
[self _createElementID];
|
|
|
|
|
|
|
|
NSAssert(_elementIDIMPs._appendElementIDComponentIMP,
|
|
|
|
@"No _elementIDIMPs._appendElementIDComponentIMP");
|
|
|
|
|
|
|
|
(*_elementIDIMPs._appendElementIDComponentIMP)(_elementID,appendElementIDComponentSEL,string);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// appendZeroElementIDComponent
|
|
|
|
-(void)appendZeroElementIDComponent
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_elementID)
|
2004-12-31 14:33:16 +00:00
|
|
|
[self _createElementID];
|
|
|
|
|
|
|
|
NSAssert(_elementIDIMPs._appendZeroElementIDComponentIMP,
|
|
|
|
@"No _elementIDIMPs._appendZeroElementIDComponentIMP");
|
|
|
|
|
|
|
|
(*_elementIDIMPs._appendZeroElementIDComponentIMP)(_elementID,appendZeroElementIDComponentSEL);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// deleteAllElementIDComponents
|
|
|
|
-(void)deleteAllElementIDComponents
|
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
if (!_elementID)
|
2004-12-31 14:33:16 +00:00
|
|
|
[self _createElementID];
|
|
|
|
|
|
|
|
NSAssert(_elementIDIMPs._deleteAllElementIDComponentsIMP,
|
|
|
|
@"No _elementIDIMPs._deleteAllElementIDComponentsIMP");
|
|
|
|
|
|
|
|
(*_elementIDIMPs._deleteAllElementIDComponentsIMP)(_elementID,deleteAllElementIDComponentsSEL);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// deleteLastElementIDComponent
|
|
|
|
-(void)deleteLastElementIDComponent
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_elementID)
|
2004-12-31 14:33:16 +00:00
|
|
|
[self _createElementID];
|
|
|
|
|
|
|
|
NSAssert(_elementIDIMPs._deleteLastElementIDComponentIMP,
|
|
|
|
@"No _elementIDIMPs._deleteLastElementIDComponentIMP");
|
|
|
|
|
|
|
|
(*_elementIDIMPs._deleteLastElementIDComponentIMP)(_elementID,deleteLastElementIDComponentSEL);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-12-14 23:48:51 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)isParentSenderIDSearchOver
|
|
|
|
{
|
2004-12-31 14:33:16 +00:00
|
|
|
if (_elementID)
|
|
|
|
{
|
|
|
|
NSAssert(_elementIDIMPs._isParentSearchOverForSenderIDIMP,
|
|
|
|
@"No _elementIDIMPs._isParentSearchOverForSenderIDIMP");
|
|
|
|
return (*_elementIDIMPs._isParentSearchOverForSenderIDIMP)(_elementID,isParentSearchOverForSenderIDSEL,_senderID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return NO;
|
2004-12-14 23:48:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)isSenderIDSearchOver
|
|
|
|
{
|
2004-12-31 14:33:16 +00:00
|
|
|
if (_elementID)
|
|
|
|
{
|
|
|
|
NSAssert(_elementIDIMPs._isSearchOverForSenderIDIMP,
|
|
|
|
@"No _elementIDIMPs._isSearchOverForSenderIDIMP");
|
|
|
|
return (*_elementIDIMPs._isSearchOverForSenderIDIMP)(_elementID,isSearchOverForSenderIDSEL,_senderID);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return NO;
|
2004-12-14 23:48:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(int)elementIDElementsCount
|
|
|
|
{
|
|
|
|
return [_elementID elementsCount];
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWContext (GSWContextD)
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)url
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWDynamicURLString* componentActionURL=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
componentActionURL=[self componentActionURL];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return (NSString*)componentActionURL;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// urlSessionPrefix
|
|
|
|
|
|
|
|
// return http://my.host.org/cgi-bin/GSWeb/MyApp.ApplicationSuffix/123456789012334567890123456789
|
|
|
|
-(NSString*)urlSessionPrefix
|
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"low",@"[request urlProtocolHorstPort]=%@",[_request urlProtocolHostPort]);
|
|
|
|
NSDebugMLLog(@"low",@"[request adaptorPrefix]=%@",[_request adaptorPrefix]);
|
|
|
|
NSDebugMLLog(@"low",@"[request applicationName]=%@",[_request applicationName]);
|
2005-04-05 14:49:55 +00:00
|
|
|
NSDebugMLLog(@"low",@"[session sessionID]=%@",[[self _session] sessionID]);
|
2000-01-22 12:49:49 +00:00
|
|
|
return [NSString stringWithFormat:@"%@%@/%@.%@/%@",
|
2002-07-27 23:48:47 +00:00
|
|
|
[_request urlProtocolHostPort],
|
|
|
|
[_request adaptorPrefix],
|
|
|
|
[_request applicationName],
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
GSWApplicationSuffix[GSWebNamingConv],
|
2005-04-05 14:49:55 +00:00
|
|
|
[[self _session] sessionID]];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-05-14 12:02:12 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(int)urlApplicationNumber
|
|
|
|
{
|
|
|
|
return _urlApplicationNumber;
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWApplication*)application
|
|
|
|
{
|
|
|
|
return [GSWApplication application];
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// isDistributionEnabled
|
|
|
|
|
|
|
|
-(BOOL)isDistributionEnabled
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _distributionEnabled;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// setDistributionEnabled:
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)setDistributionEnabled:(BOOL)isDistributionEnabled
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_distributionEnabled=isDistributionEnabled;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
2003-11-24 12:13:37 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWContext (GSWContextGSWeb)
|
|
|
|
-(BOOL)isValidate
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _isValidate;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)setValidate:(BOOL)isValidate
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_isValidate = isValidate;
|
* GSWeb.framework/GSWApplication.m
(GSWApplicationMainReal): Reformat. Use GSCurrentThread
instead of objc_thread_id. Remove \n in NSLog type logs.
(GSWApplicationMain): Ditto.
([GSWApplication init], [GSWApplication lockRequestHandling],
[GSWApplication unlockRequestHandling], [GSWApplication lock],
[GSWApplication unlock], [GSWApplication _sessionClass],
[GSWApplication run],
[GSWApplication addDynCreateClassName:superClassName:],
[GSWApplication pageWithName:],
[GSWApplication dynamicElementWithName:associations:template:]):
Ditto.
* GSWeb.framework/GSWComponent.m
([GSWComponent appendToResponse:inContext:], [GSWComponent
templateWithHTMLString:declarationString:languages:]): Ditto.
* GSWeb.framework/GSWContext.m
([GSWContext dealloc], [GSWContext setValidate:]): Ditto.
* GSWeb.framework/GSWDebug.m
(GSWLogC_, GSWLogDumpObjectFn): Ditto.
* GSWeb.framework/GSWDefaultAdaptor.m
([GSWDefaultAdaptor registerForEvents],
[GSWDefaultAdaptor announceNewConnection:],
[GSWDefaultAdaptor adaptorThreadExited:],
[GSWDefaultAdaptor tryLock]): Ditto.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread setPool:destroyLast:],
[GSWDefaultAdaptorThread run:],
[GSWDefaultAdaptorThread threadExited],
[GSWDefaultAdaptorThread isExpired],
[GSWDefaultAdaptorThread sendRetryLasterResponseToStream:],
[GSWDefaultAdaptorThread
sendConnectionRefusedResponseToStream:withMessage:]): Ditto.
* GSWeb.framework/GSWDeployedBundle.m
([GSWDeployedBundle initWithPath:], [GSWDeployedBundle dealloc],
[GSWDeployedBundle lock], [GSWDeployedBundle unlock]): Ditto.
* GSWeb.framework/GSWLifebeatThread.m
([GSWLifebeatThread setPool:destroyLast:],
[GSWLifebeatThread threadExited]): Ditto.
* GSWeb.framework/GSWSession.m
([GSWSession initWithCoder:],
[GSWSession _releaseAutoreleasePool]): Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18611 72102866-910b-0410-8b05-ffd578937521
2004-02-17 16:53:36 +00:00
|
|
|
NSDebugMLLog(@"low",@"isValidate=%d",(int)isValidate);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
2003-01-19 15:33:07 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
@end
|
2004-12-14 23:48:51 +00:00
|
|
|
|