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"
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
static int dontTraceComponentActionURL=0;
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWContext
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// init
|
|
|
|
|
|
|
|
-(id)init
|
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
|
|
|
if ((self=[super init]))
|
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);
|
2002-07-27 23:48:47 +00:00
|
|
|
ASSIGNCOPY(clone->_elementID,_elementID);
|
|
|
|
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;
|
|
|
|
};
|
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:
|
|
|
|
@"%s: %p contextID=%@ senderID=%@ elementID=%@ session=%p request=%p response=%p pageElement=%p pageComponent=%p currentComponent=%p url=%@ urlApplicationNumber=%d isClientComponentRequest=%s distributionEnabled=%s pageChanged=%s pageReplaced=%s",
|
|
|
|
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",
|
|
|
|
_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
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// elementID
|
2002-05-14 11:28:50 +00:00
|
|
|
-(GSWElementIDString*)elementID
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _elementID;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-03-01 16:47:47 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// returns contextID.ElementID
|
|
|
|
-(NSString*)contextAndElementID
|
|
|
|
{
|
|
|
|
return [NSString stringWithFormat:@"%u.%@",
|
|
|
|
_contextID,
|
|
|
|
_elementID];
|
|
|
|
};
|
|
|
|
|
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
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
if (_contextID==(unsigned int)-1)
|
|
|
|
return nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-07-27 23:48:47 +00:00
|
|
|
return [NSString stringWithFormat:@"%u",_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
|
|
|
};
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWSession*)_session
|
|
|
|
{
|
|
|
|
return _session;
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWSession*)session
|
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
2003-01-19 15:33:07 +00:00
|
|
|
|
|
|
|
if (!_session)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLog(@"_requestSessionID=%@",_requestSessionID);
|
|
|
|
if (_requestSessionID)
|
|
|
|
[GSWApp restoreSessionWithID:_requestSessionID
|
|
|
|
inContext:self];//Application call context _setSession
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2003-01-19 15:33:07 +00:00
|
|
|
if (!_session)
|
|
|
|
[GSWApp _initializeSessionInContext:self]; //Application call context _setSession
|
|
|
|
|
|
|
|
NSAssert(_session,@"Unable to create new session");
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2003-01-19 15:33:07 +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
|
|
|
|
-(void)incrementLoopLevel //ForDebugging purpose: each repetition increment and next decrement it
|
|
|
|
{
|
|
|
|
_loopLevel++;
|
|
|
|
};
|
|
|
|
-(void)decrementLoopLevel
|
|
|
|
{
|
|
|
|
_loopLevel--;
|
|
|
|
};
|
2002-07-27 23:48:47 +00:00
|
|
|
|
2002-05-16 18:01:40 +00:00
|
|
|
-(BOOL)isInLoop
|
|
|
|
{
|
|
|
|
return _loopLevel>0;
|
|
|
|
};
|
|
|
|
|
|
|
|
-(void)addToDocStructureElement:(id)element
|
|
|
|
{
|
|
|
|
if(GSDebugSet(@"GSWDocStructure"))
|
|
|
|
{
|
|
|
|
NSString* string=nil;
|
|
|
|
int elementIDNb=[[self elementID] elementsNb];
|
|
|
|
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];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)addDocStructureStep:(NSString*)stepLabel
|
|
|
|
{
|
|
|
|
if(GSDebugSet(@"GSWDocStructure"))
|
|
|
|
{
|
|
|
|
if (!_docStructure)
|
|
|
|
_docStructure=[NSMutableString new];
|
|
|
|
[_docStructureElements removeAllObjects];
|
|
|
|
[_docStructure appendFormat:@"===== %@ =====\n",stepLabel];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
-(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;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
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
|
|
|
|
isSecure:NO];
|
|
|
|
LOGObjectFnStop();
|
|
|
|
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
|
|
|
{
|
|
|
|
return [self directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:queryDictionary];
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
|
|
|
urlPrefix:(NSString*)urlPrefix
|
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
2003-11-24 12:13:37 +00:00
|
|
|
pathQueryDictionary:(NSDictionary*)pathQueryDictionary
|
|
|
|
{
|
|
|
|
GSWDynamicURLString* url=nil;
|
|
|
|
LOGObjectFnStart();
|
|
|
|
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:pathQueryDictionary];
|
|
|
|
LOGObjectFnStop();
|
|
|
|
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
|
|
|
|
{
|
|
|
|
return [self directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:queryDictionary
|
|
|
|
pathQueryDictionary:pathQueryDictionary];
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(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;
|
|
|
|
LOGObjectFnStart();
|
|
|
|
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
|
|
|
|
isSecure:NO];
|
|
|
|
LOGObjectFnStop();
|
|
|
|
return url;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
2004-01-09 11:41:44 +00:00
|
|
|
queryDictionary:(NSDictionary*)queryDictionary
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
{
|
|
|
|
return [self directActionURLForActionNamed:actionName
|
|
|
|
urlPrefix:nil
|
|
|
|
queryDictionary:queryDictionary
|
|
|
|
isSecure:isSecure];
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(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
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLog(@"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;
|
|
|
|
LOGObjectFnStartCond(dontTraceComponentActionURL==0);
|
|
|
|
url=[self componentActionURLIsSecure:NO];
|
|
|
|
LOGObjectFnStopCond(dontTraceComponentActionURL==0);
|
|
|
|
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
|
|
|
|
{
|
|
|
|
//TODO: use 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"));
|
|
|
|
if (storesIDsInURLs)
|
|
|
|
{
|
|
|
|
NSString* sessionID=[_session sessionID];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"sessionID=%@",sessionID);
|
|
|
|
requestHandlerPath=[NSString stringWithFormat:@"%@/%u.%@",
|
|
|
|
sessionID,
|
|
|
|
_contextID,
|
|
|
|
elementID];
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-07-27 23:48:47 +00:00
|
|
|
requestHandlerPath=[NSString stringWithFormat:@"/%u.%@", //??
|
|
|
|
_contextID,
|
|
|
|
elementID];
|
|
|
|
NSDebugMLogCond(dontTraceComponentActionURL==0,@"requestHandlerPath=%@",requestHandlerPath);
|
|
|
|
url=[self urlWithRequestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:nil];
|
|
|
|
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
|
|
|
|
|
|
|
NSDebugMLog(@"urlPrefix=%@",urlPrefix);
|
|
|
|
NSDebugMLog(@"requestHandlerKey=%@",requestHandlerKey);
|
|
|
|
NSDebugMLog(@"requestHandlerPath=%@",requestHandlerPath);
|
|
|
|
NSDebugMLog(@"queryString=%@",queryString);
|
|
|
|
NSDebugMLog(@"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-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
|
|
|
|
RequestHandlerKey:(NSString*)requestHandlerKey
|
|
|
|
path:(NSString*)requestHandlerPath
|
|
|
|
queryString:(NSString*)queryString
|
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
|
|
|
|
queryString:queryString];
|
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
|
|
|
|
RequestHandlerKey:requestHandlerKey
|
|
|
|
path:requestHandlerPath
|
|
|
|
queryString:queryString];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWComponent* component=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"low",@"awakePageComponents=%@",_awakePageComponents);
|
|
|
|
for(i=0;i<[_awakePageComponents count];i++)
|
|
|
|
{
|
|
|
|
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-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
|
|
|
|
isSecure:NO
|
|
|
|
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
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* queryString=nil;
|
|
|
|
NSEnumerator* enumerator =nil;
|
|
|
|
id key=nil;
|
2003-11-24 12:13:37 +00:00
|
|
|
NSString* path=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
|
|
|
|
|
|
|
NSDebugMLog(@"actionName=%@",actionName);
|
|
|
|
NSDebugMLog(@"urlPrefix=%@",urlPrefix);
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLog(@"dict=%@",dict);
|
2003-11-24 12:13:37 +00:00
|
|
|
NSDebugMLog(@"pathQueryDictionary=%@",pathQueryDictionary);
|
2004-05-14 12:02:12 +00:00
|
|
|
NSDebugMLog(@"isSecure=%d",isSecure);
|
|
|
|
|
|
|
|
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];
|
|
|
|
while ((key = [enumerator nextObject]))
|
|
|
|
{
|
|
|
|
if (!queryString)
|
|
|
|
queryString=[[NSString new] autorelease];
|
|
|
|
else
|
|
|
|
queryString=[queryString stringByAppendingString:@"&"];
|
|
|
|
queryString=[queryString stringByAppendingFormat:@"%@=%@",
|
|
|
|
key,
|
|
|
|
[dict objectForKey:key]];
|
|
|
|
};
|
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
|
|
|
path=actionName;
|
|
|
|
if ([pathQueryDictionary count]>0)
|
|
|
|
{
|
|
|
|
// 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);
|
|
|
|
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];
|
|
|
|
path=[path stringByAppendingFormat:@"/%@=%@",
|
|
|
|
key,
|
|
|
|
value];
|
|
|
|
};
|
|
|
|
};
|
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();
|
|
|
|
|
|
|
|
languages=[_session languages];
|
|
|
|
NSDebugMLog(@"_session %p languages=%@",_session,languages);
|
|
|
|
|
|
|
|
if ([languages count]==0)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-11-24 12:13:37 +00:00
|
|
|
languages=_languages;
|
|
|
|
NSDebugMLog(@"context %p languages=%@",self,languages);
|
|
|
|
|
|
|
|
if ([languages count]==0)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-11-24 12:13:37 +00:00
|
|
|
languages=[[self request]browserLanguages];
|
|
|
|
NSDebugMLog(@"resquest %p browserLanguages=%@",[self request],languages);
|
|
|
|
}
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2003-11-24 12:13:37 +00:00
|
|
|
|
|
|
|
NSDebugMLog(@"context %p ==> languages=%@",self,languages);
|
|
|
|
|
|
|
|
//GSWeb specific: It enable application languages filtering
|
2002-07-27 23:48:47 +00:00
|
|
|
languages=[GSWApp filterLanguages:languages];
|
2003-11-24 12:13:37 +00:00
|
|
|
NSDebugMLog(@"context %p ==> filtered languages=%@",self,languages);
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
NSDebugMLog(@"languages=%@",languages);
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
storesIDsInURLs=[_session storesIDsInURLs];
|
|
|
|
isDistributionEnabled=[_session isDistributionEnabled];
|
|
|
|
|
|
|
|
NSDebugMLog(@"storesIDsInURLs=%d",storesIDsInURLs);
|
|
|
|
NSDebugMLog(@"isDistributionEnabled=%d",isDistributionEnabled);
|
|
|
|
|
|
|
|
NSDebugMLog(@"_session=%p",_session);
|
|
|
|
NSDebugMLog(@"_request=%p",_request);
|
|
|
|
|
2003-04-09 12:03:17 +00:00
|
|
|
instance=[_request applicationNumber];
|
|
|
|
sessionID=[_request sessionID];
|
2003-11-24 12:13:37 +00:00
|
|
|
|
|
|
|
NSDebugMLog(@"instance=%d",instance);
|
|
|
|
NSDebugMLog(@"sessionID=%@",sessionID);
|
|
|
|
|
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)
|
|
|
|
|| (!_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
|
|
|
|
|
|
|
NSDebugMLog(@"instance=%d",instance);
|
|
|
|
|
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
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
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);
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWContext (GSWContextC)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// incrementLastElementIDComponent
|
|
|
|
-(void)incrementLastElementIDComponent
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_elementID)
|
|
|
|
_elementID=[GSWElementIDString new];
|
|
|
|
[_elementID incrementLastElementIDComponent];
|
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)
|
|
|
|
_elementID=[GSWElementIDString new];
|
|
|
|
[_elementID appendElementIDComponent:string];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// appendZeroElementIDComponent
|
|
|
|
-(void)appendZeroElementIDComponent
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_elementID)
|
|
|
|
_elementID=[GSWElementIDString new];
|
|
|
|
[_elementID appendZeroElementIDComponent];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// deleteAllElementIDComponents
|
|
|
|
-(void)deleteAllElementIDComponents
|
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
if (!_elementID)
|
|
|
|
_elementID=[GSWElementIDString new];
|
2002-07-27 23:48:47 +00:00
|
|
|
[_elementID deleteAllElementIDComponents];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// deleteLastElementIDComponent
|
|
|
|
-(void)deleteLastElementIDComponent
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_elementID)
|
|
|
|
_elementID=[GSWElementIDString new];
|
|
|
|
[_elementID deleteLastElementIDComponent];
|
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]);
|
|
|
|
NSDebugMLLog(@"low",@"[session sessionID]=%@",[_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],
|
2002-07-27 23:48:47 +00:00
|
|
|
[_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
|