2002-08-04 18:00:11 +00:00
|
|
|
/** GSWDynamicURLString.m - <title>GSWeb: Class GSWDynamicURLString</title>
|
|
|
|
|
2004-09-01 14:17:18 +00:00
|
|
|
Copyright (C) 1999-2004 Free Software Foundation, Inc.
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
|
|
|
Date: Mar 1999
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
$Revision$
|
|
|
|
$Date$
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
This file is part of the GNUstep Web Library.
|
|
|
|
|
2002-08-04 18:00:11 +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-08-04 18:00:11 +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"
|
2010-06-05 21:08:12 +00:00
|
|
|
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
|
|
|
#include <GNUstepBase/NSString+GNUstepBase.h>
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2004-09-01 14:17:18 +00:00
|
|
|
static SEL appendStringSel = NULL;
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//====================================================================
|
|
|
|
@implementation GSWDynamicURLString
|
|
|
|
|
2004-09-01 14:17:18 +00:00
|
|
|
+ (void) initialize
|
|
|
|
{
|
|
|
|
if (self == [GSWDynamicURLString class])
|
2008-08-20 20:32:10 +00:00
|
|
|
{
|
|
|
|
appendStringSel = @selector(appendString:);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (id) string
|
|
|
|
{
|
|
|
|
return [[[self alloc] init] autorelease];
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (id)stringWithString:(NSString *)aString
|
|
|
|
{
|
|
|
|
return [[[self alloc] initWithString:aString] autorelease];
|
|
|
|
}
|
2004-09-01 14:17:18 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)init
|
|
|
|
{
|
|
|
|
if ((self=[super init]))
|
2008-08-20 20:32:10 +00:00
|
|
|
{
|
|
|
|
_url=[NSMutableString new];
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)initWithCharactersNoCopy:(unichar*)chars
|
2010-06-05 21:08:12 +00:00
|
|
|
length:(NSUInteger)length
|
2002-08-04 18:00:11 +00:00
|
|
|
freeWhenDone:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2010-04-16 00:18:46 +00:00
|
|
|
_url=[(NSMutableString*) [NSMutableString alloc] initWithCharactersNoCopy:chars
|
|
|
|
length:length
|
|
|
|
freeWhenDone:flag];
|
2008-08-20 20:32:10 +00:00
|
|
|
if (chars) {
|
|
|
|
[self _parse];
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)initWithCharacters:(const unichar*)chars
|
2010-06-05 21:08:12 +00:00
|
|
|
length:(NSUInteger)length
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2010-04-16 00:18:46 +00:00
|
|
|
_url = [(NSMutableString*)[NSMutableString alloc] initWithCharacters:chars
|
|
|
|
length:length];
|
2008-08-20 20:32:10 +00:00
|
|
|
if (chars) {
|
|
|
|
[self _parse];
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2013-02-27 04:27:07 +00:00
|
|
|
//-(id)initWithCStringNoCopy:(char*)byteString
|
|
|
|
// length:(NSUInteger)length
|
|
|
|
// freeWhenDone:(BOOL)flag
|
|
|
|
//{
|
|
|
|
// _url = [(NSMutableString*) [NSMutableString alloc] initWithCStringNoCopy:byteString
|
|
|
|
// length:length
|
|
|
|
// freeWhenDone:flag];
|
|
|
|
// if (byteString) {
|
|
|
|
// [self _parse];
|
|
|
|
// }
|
|
|
|
// return self;
|
|
|
|
//}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2013-02-27 04:27:07 +00:00
|
|
|
//-(id)initWithCString:(const char*)byteString
|
|
|
|
// length:(NSUInteger)length;
|
|
|
|
//{
|
|
|
|
// _url = [(NSMutableString*) [NSMutableString alloc] initWithCString:byteString
|
|
|
|
// length:length];
|
|
|
|
// if (byteString) {
|
|
|
|
// [self _parse];
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// return self;
|
|
|
|
//}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)initWithCString:(const char*)byteString;
|
|
|
|
{
|
2008-08-20 20:32:10 +00:00
|
|
|
_url = [[NSMutableString alloc] initWithCString:byteString];
|
|
|
|
if (byteString) {
|
|
|
|
[self _parse];
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)initWithString:(NSString*)string
|
|
|
|
{
|
2008-08-20 20:32:10 +00:00
|
|
|
_url = [[NSMutableString alloc] initWithString:string];
|
|
|
|
if (string) {
|
|
|
|
[self _parse];
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)initWithFormat:(NSString*)format,...
|
|
|
|
{
|
2008-08-20 20:32:10 +00:00
|
|
|
va_list ap;
|
|
|
|
va_start(ap,format);
|
|
|
|
_url = [[NSMutableString alloc] initWithFormat:format
|
|
|
|
arguments:ap];
|
|
|
|
va_end(ap);
|
|
|
|
[self _parse];
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)initWithFormat:(NSString*)format
|
2002-08-04 18:00:11 +00:00
|
|
|
arguments:(va_list)argList
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2008-08-20 20:32:10 +00:00
|
|
|
_url = [[NSMutableString alloc] initWithFormat:format
|
|
|
|
arguments:argList];
|
|
|
|
[self _parse];
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)initWithData:(NSData*)data
|
2002-08-04 18:00:11 +00:00
|
|
|
encoding:(NSStringEncoding)encoding
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2008-08-20 20:32:10 +00:00
|
|
|
_url = [[NSMutableString alloc] initWithData:data
|
|
|
|
encoding:encoding];
|
|
|
|
if (data) {
|
|
|
|
[self _parse];
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)initWithContentsOfFile:(NSString*)path
|
|
|
|
{
|
2008-08-20 20:32:10 +00:00
|
|
|
_url=[[NSMutableString alloc]initWithContentsOfFile:path];
|
|
|
|
[self _parse];
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)initWithCoder:(NSCoder*)coder
|
|
|
|
{
|
|
|
|
[coder decodeValueOfObjCType:@encode(id)
|
|
|
|
at:&_url];
|
|
|
|
_urlASImp=NULL;
|
|
|
|
_flags.composed=YES;
|
|
|
|
[self _parse];
|
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)dealloc
|
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
DESTROY(_urlBeginning);
|
2002-08-04 18:00:11 +00:00
|
|
|
DESTROY(_url);
|
|
|
|
DESTROY(_prefix);
|
|
|
|
DESTROY(_applicationName);
|
|
|
|
DESTROY(_applicationNumberString);
|
|
|
|
DESTROY(_requestHandlerKey);
|
|
|
|
DESTROY(_queryString);
|
|
|
|
DESTROY(_requestHandlerPath);
|
2007-04-13 18:32:02 +00:00
|
|
|
|
|
|
|
_urlASImp=NULL;
|
|
|
|
_urlBeginningASImp=NULL;
|
|
|
|
_flags.composed=NO;
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
[super dealloc];
|
|
|
|
};
|
|
|
|
|
2005-09-30 15:29:59 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
|
|
|
|
- (NSData*) dataUsingEncoding: (NSStringEncoding)encoding allowLossyConversion: (BOOL)flag
|
|
|
|
{
|
|
|
|
if (!_flags.composed)
|
|
|
|
{
|
|
|
|
[self _compose];
|
|
|
|
}
|
|
|
|
|
|
|
|
return [_url dataUsingEncoding: encoding allowLossyConversion: flag];
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)encodeWithCoder:(NSCoder*)coder
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
[self _compose];
|
2002-08-04 18:00:11 +00:00
|
|
|
[coder encodeObject:_url];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-01-09 11:37:47 +00:00
|
|
|
//--------------------------------------------------------------------
|
2010-06-05 21:08:12 +00:00
|
|
|
- (NSUInteger) length
|
2004-01-09 11:37:47 +00:00
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
if (!_flags.composed)
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
|
|
|
[self _compose];
|
|
|
|
}
|
2004-01-09 11:37:47 +00:00
|
|
|
return [_url length];
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2013-02-27 04:27:07 +00:00
|
|
|
- (unichar)characterAtIndex:(NSUInteger)index
|
2004-01-09 11:37:47 +00:00
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
if (!_flags.composed)
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
|
|
|
[self _compose];
|
|
|
|
}
|
2004-01-09 11:37:47 +00:00
|
|
|
return [_url characterAtIndex:index];
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
- (void) replaceCharactersInRange: (NSRange)range
|
|
|
|
withString: (NSString*)aString
|
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
if (!_flags.composed)
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
|
|
|
[self _compose];
|
|
|
|
}
|
2004-01-09 11:37:47 +00:00
|
|
|
[_url replaceCharactersInRange:range
|
|
|
|
withString:aString];
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
2004-01-09 11:37:47 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(id)copyWithZone:(NSZone*)zone
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
GSWDynamicURLString* clone = nil;
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"url class=%@",[_url class]);
|
2002-08-04 18:00:11 +00:00
|
|
|
clone=[[isa allocWithZone:zone] init];
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"new clone GSWDynamicURLString %p => %p",self,clone);
|
2000-01-22 12:49:49 +00:00
|
|
|
if (clone)
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
DESTROY(_urlBeginning);
|
|
|
|
clone->_urlBeginning=[_urlBeginning mutableCopyWithZone:zone];
|
|
|
|
clone->_urlBeginningASImp=NULL;
|
2002-08-04 18:00:11 +00:00
|
|
|
DESTROY(clone->_url);
|
|
|
|
clone->_url=[_url mutableCopyWithZone:zone];
|
2004-09-01 14:17:18 +00:00
|
|
|
clone->_urlASImp=NULL;
|
|
|
|
//NSDebugMLLog(@"low",@"clone->_url class=%@",[clone->_url class]);
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGNCOPY(clone->_protocol,_protocol);
|
|
|
|
ASSIGNCOPY(clone->_host,_host);
|
|
|
|
clone->_port=_port;
|
|
|
|
ASSIGNCOPY(clone->_prefix,_prefix);
|
|
|
|
ASSIGNCOPY(clone->_applicationName,_applicationName);
|
|
|
|
ASSIGNCOPY(clone->_applicationNumberString,_applicationNumberString);
|
|
|
|
ASSIGNCOPY(clone->_requestHandlerKey,_requestHandlerKey);
|
|
|
|
ASSIGNCOPY(clone->_queryString,_queryString);
|
|
|
|
ASSIGNCOPY(clone->_requestHandlerPath,_requestHandlerPath);
|
|
|
|
clone->_applicationNumber=_applicationNumber;
|
2004-09-01 14:17:18 +00:00
|
|
|
clone->_flags.composed=_flags.composed;
|
|
|
|
clone->_flags.beginningComposed=_flags.beginningComposed;
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
return clone;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)description
|
|
|
|
{
|
2005-04-06 19:45:32 +00:00
|
|
|
if (!_flags.composed) {
|
|
|
|
[self _compose];
|
|
|
|
}
|
2002-08-04 18:00:11 +00:00
|
|
|
return _url;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)forwardInvocation:(NSInvocation*)invocation
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
NSString* urlBackup=nil;
|
2004-09-01 14:17:18 +00:00
|
|
|
if (!_flags.composed)
|
2002-08-04 18:00:11 +00:00
|
|
|
[self _compose];
|
|
|
|
urlBackup=[_url copy];
|
|
|
|
[invocation invokeWithTarget:_url];
|
|
|
|
if (![_url isEqualToString:urlBackup])
|
|
|
|
[self _parse];
|
|
|
|
[urlBackup release];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(NSMethodSignature*)methodSignatureForSelector:(SEL)selector
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return [_url methodSignatureForSelector:selector];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2004-06-15 22:48:30 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
-(void)_compose
|
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
if (!_flags.composed)
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
2013-03-05 04:31:52 +00:00
|
|
|
NSMutableString * tmpUrl = [[NSMutableString new] autorelease];
|
2004-09-01 14:17:18 +00:00
|
|
|
|
|
|
|
if (!_flags.beginningComposed)
|
|
|
|
{
|
|
|
|
if (_urlBeginning)
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
int length=[_urlBeginning length];
|
|
|
|
if (length>0)
|
|
|
|
[_urlBeginning deleteCharactersInRange:NSMakeRange(0,length)];
|
2004-06-15 22:48:30 +00:00
|
|
|
}
|
2004-09-01 14:17:18 +00:00
|
|
|
else
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
_urlBeginning=[NSMutableString new];
|
|
|
|
_urlBeginningASImp=NULL;
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!_urlBeginningASImp)
|
|
|
|
_urlBeginningASImp = [_urlBeginning methodForSelector:appendStringSel];
|
|
|
|
if (_protocol)
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
if (_host)
|
|
|
|
{
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,_protocol);
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,@"://");
|
|
|
|
}
|
|
|
|
else if (_port)
|
|
|
|
{
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,_protocol);
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,@"://localhost");
|
|
|
|
}
|
|
|
|
else if (_prefix)
|
|
|
|
{
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,_protocol);
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,@":/");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,_protocol);
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,@"://");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
if (_host)
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,_host);
|
|
|
|
if (_port)
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,@":");
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,GSWIntToNSString(_port));
|
|
|
|
//[_urlBeginning appendFormat:@":%d",_port];
|
|
|
|
};
|
|
|
|
if (_prefix)
|
|
|
|
{
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,_prefix);
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,@"/");
|
|
|
|
};
|
|
|
|
if (_applicationName)
|
|
|
|
{
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,_applicationName);
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,@".");
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,GSWApplicationSuffix[GSWebNamingConv]);
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,@"/");
|
|
|
|
};
|
|
|
|
if (_applicationNumber>=0)
|
|
|
|
{
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,GSWIntToNSString(_applicationNumber));
|
|
|
|
(*_urlBeginningASImp)(_urlBeginning,appendStringSel,@"/");
|
|
|
|
//[_urlBeginning appendFormat:@"%d/",_applicationNumber];
|
|
|
|
};
|
2004-06-15 22:48:30 +00:00
|
|
|
};
|
2004-09-01 14:17:18 +00:00
|
|
|
|
|
|
|
if (!_urlASImp)
|
2010-04-22 04:28:50 +00:00
|
|
|
_urlASImp = [tmpUrl methodForSelector:appendStringSel];
|
2004-09-01 14:17:18 +00:00
|
|
|
|
2010-04-22 04:28:50 +00:00
|
|
|
(*_urlASImp)(tmpUrl,appendStringSel,_urlBeginning);
|
2004-09-01 14:17:18 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
if (_requestHandlerKey)
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
2010-04-22 04:28:50 +00:00
|
|
|
(*_urlASImp)(tmpUrl,appendStringSel,_requestHandlerKey);
|
|
|
|
(*_urlASImp)(tmpUrl,appendStringSel,@"/");
|
2004-06-15 22:48:30 +00:00
|
|
|
};
|
2002-08-04 18:00:11 +00:00
|
|
|
if (_requestHandlerPath)
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
2010-04-22 04:28:50 +00:00
|
|
|
(*_urlASImp)(tmpUrl,appendStringSel,_requestHandlerPath);
|
2004-06-15 22:48:30 +00:00
|
|
|
};
|
2002-08-04 18:00:11 +00:00
|
|
|
if (_queryString)
|
2004-06-15 22:48:30 +00:00
|
|
|
{
|
2010-04-22 04:28:50 +00:00
|
|
|
(*_urlASImp)(tmpUrl,appendStringSel,@"?");
|
|
|
|
(*_urlASImp)(tmpUrl,appendStringSel,_queryString);
|
2004-06-15 22:48:30 +00:00
|
|
|
};
|
2004-11-26 11:02:53 +00:00
|
|
|
_flags.composed=YES;
|
2010-04-22 04:28:50 +00:00
|
|
|
|
|
|
|
if (([tmpUrl length]==0)) {
|
2010-06-16 09:20:13 +00:00
|
|
|
//NSLog(@"%s:cannot parse '%@'", __PRETTY_FUNCTION__, _url);
|
2010-04-22 04:28:50 +00:00
|
|
|
} else {
|
|
|
|
[_url release];
|
|
|
|
_url = [tmpUrl retain];
|
|
|
|
}
|
|
|
|
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"url %@ class=%@",_url,[_url class]);
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_parse
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
DESTROY(_prefix);
|
|
|
|
DESTROY(_applicationName);
|
|
|
|
DESTROY(_applicationNumberString);
|
|
|
|
DESTROY(_requestHandlerKey);
|
|
|
|
DESTROY(_queryString);
|
|
|
|
DESTROY(_requestHandlerPath);
|
2004-09-01 14:17:18 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
_applicationNumber=-1;
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.composed=NO; //??
|
|
|
|
_flags.beginningComposed=NO;
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
if (_url)
|
|
|
|
{
|
|
|
|
NSArray* components=nil;
|
2004-12-31 14:33:16 +00:00
|
|
|
int componentsCount=0;
|
2002-08-04 18:00:11 +00:00
|
|
|
NSString* Left=_url;
|
|
|
|
int index=0;
|
|
|
|
int tmpIndex=0;
|
|
|
|
NSRange protocolEndRange;
|
|
|
|
NSRange queryStringStartRange=[Left rangeOfString:@"?"];
|
2010-06-22 05:02:29 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
if (queryStringStartRange.length>0)
|
|
|
|
{
|
|
|
|
if (queryStringStartRange.location+1<[Left length])
|
|
|
|
{
|
|
|
|
ASSIGN(_queryString,[Left substringFromIndex:queryStringStartRange.location+queryStringStartRange.length]);
|
|
|
|
};
|
|
|
|
Left=[Left substringToIndex:queryStringStartRange.location];
|
|
|
|
};
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"Left [%@]",Left);
|
|
|
|
//NSDebugMLLog(@"low",@"queryString [%@]",_queryString);
|
2002-08-04 18:00:11 +00:00
|
|
|
|
|
|
|
//Protocol
|
|
|
|
protocolEndRange=[Left rangeOfString:@"://"];
|
|
|
|
if (protocolEndRange.length>0)
|
|
|
|
{
|
|
|
|
ASSIGN(_protocol,[Left substringToIndex:protocolEndRange.location]);
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"protocol [%@]",_protocol);
|
2002-08-04 18:00:11 +00:00
|
|
|
if (protocolEndRange.location+protocolEndRange.length<[Left length])
|
|
|
|
Left=[Left substringFromIndex:protocolEndRange.location+protocolEndRange.length];
|
|
|
|
else
|
|
|
|
Left=nil;
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"Left [%@]",Left);
|
2002-08-04 18:00:11 +00:00
|
|
|
//Host
|
|
|
|
if ([Left length]>0)
|
|
|
|
{
|
|
|
|
NSRange hostEndRangePort=[Left rangeOfString:@":"];
|
|
|
|
if (hostEndRangePort.length>0)
|
|
|
|
{
|
|
|
|
ASSIGN(_host,[Left substringToIndex:hostEndRangePort.location]);
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"host [%@]",_host);
|
2002-08-04 18:00:11 +00:00
|
|
|
if (hostEndRangePort.location+hostEndRangePort.length<[Left length])
|
|
|
|
Left=[Left substringFromIndex:hostEndRangePort.location+hostEndRangePort.length];
|
|
|
|
else
|
|
|
|
Left=nil;
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"Left [%@]",Left);
|
2002-08-04 18:00:11 +00:00
|
|
|
if (Left)
|
|
|
|
{
|
|
|
|
NSRange portEndRange=[Left rangeOfString:@"/"];
|
|
|
|
if (portEndRange.length>0)
|
|
|
|
{
|
|
|
|
NSString* portString=[Left substringToIndex:portEndRange.location];
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"portString [%@]",Left);
|
2002-08-04 18:00:11 +00:00
|
|
|
_port=[portString intValue];
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"port [%d]",_port);
|
2002-08-04 18:00:11 +00:00
|
|
|
if (portEndRange.location+portEndRange.length<[Left length])
|
|
|
|
Left=[Left substringFromIndex:portEndRange.location+portEndRange.length-1]; //Keep the '/'
|
|
|
|
else
|
|
|
|
Left=nil;
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"Left [%@]",Left);
|
2002-08-04 18:00:11 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
_port=[Left intValue];
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"port [%d]",_port);
|
2002-08-04 18:00:11 +00:00
|
|
|
Left=nil;
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"Left [%@]",Left);
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NSRange hostEndRangeSlash=[Left rangeOfString:@"/"];
|
|
|
|
if (hostEndRangeSlash.length>0)
|
|
|
|
{
|
|
|
|
ASSIGN(_host,[Left substringToIndex:hostEndRangeSlash.location]);
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"host [%@]",_host);
|
2002-08-04 18:00:11 +00:00
|
|
|
if (hostEndRangeSlash.location+hostEndRangeSlash.length<[Left length])
|
2010-06-22 05:02:29 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
Left=[Left substringFromIndex:hostEndRangeSlash.location+hostEndRangeSlash.length-1];//Keep the '/'
|
2010-06-22 05:02:29 +00:00
|
|
|
} else
|
2002-08-04 18:00:11 +00:00
|
|
|
Left=nil;
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"Left [%@]",Left);
|
2002-08-04 18:00:11 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ASSIGN(_host,Left);
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"host [%@]",_host);
|
2002-08-04 18:00:11 +00:00
|
|
|
Left=nil;
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"Left [%@]",Left);
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"Left [%@]",Left);
|
2002-08-04 18:00:11 +00:00
|
|
|
//prefix
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"prefix: components [%@]",components);
|
2002-08-04 18:00:11 +00:00
|
|
|
components=[Left componentsSeparatedByString:@"/"];
|
2004-12-31 14:33:16 +00:00
|
|
|
componentsCount=[components count];
|
|
|
|
for(tmpIndex=index;!_prefix && tmpIndex<componentsCount;tmpIndex++)
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
NSString* tmp=[components objectAtIndex:tmpIndex];
|
|
|
|
if ([tmp hasSuffix:GSWApplicationPSuffix[GSWNAMES_INDEX]]
|
|
|
|
|| [tmp hasSuffix:GSWApplicationPSuffix[WONAMES_INDEX]])
|
|
|
|
{
|
|
|
|
if (tmpIndex-index>1)
|
|
|
|
{
|
|
|
|
ASSIGN(_prefix,[[components subarrayWithRange:NSMakeRange(index,tmpIndex-index)]componentsJoinedByString:@"/"]);
|
|
|
|
index=tmpIndex;//Stay on ApplicationName !
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (!_prefix)
|
|
|
|
{
|
|
|
|
//TODO Erreur
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"No prefix in [%@]",_url);
|
2002-08-04 18:00:11 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//applicationName
|
2004-12-31 14:33:16 +00:00
|
|
|
if (index>=componentsCount)
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
//TODO Erreur
|
2004-09-01 14:17:18 +00:00
|
|
|
//NSDebugMLLog(@"low",@"No applicationName in [%@]",_url);
|
2002-08-04 18:00:11 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
/*NSDebugMLLog(@"low",@"applicationName: components [%@]",
|
2004-12-31 14:33:16 +00:00
|
|
|
[components subarrayWithRange:NSMakeRange(index,componentsCount-index)]);
|
2004-09-01 14:17:18 +00:00
|
|
|
*/
|
2004-12-31 14:33:16 +00:00
|
|
|
for(tmpIndex=index;!_applicationName && tmpIndex<componentsCount;tmpIndex++)
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
NSString* tmp=[components objectAtIndex:tmpIndex];
|
|
|
|
NSString* appSuffix=nil;
|
|
|
|
if ([tmp hasSuffix:GSWApplicationPSuffix[GSWNAMES_INDEX]])
|
|
|
|
appSuffix=GSWApplicationPSuffix[GSWNAMES_INDEX];
|
|
|
|
else if ([tmp hasSuffix:GSWApplicationPSuffix[WONAMES_INDEX]])
|
|
|
|
appSuffix=GSWApplicationPSuffix[WONAMES_INDEX];
|
|
|
|
if (appSuffix)
|
|
|
|
{
|
|
|
|
ASSIGN(_applicationName,[[[components subarrayWithRange:NSMakeRange(index,tmpIndex-index+1)]
|
|
|
|
componentsJoinedByString:@"/"]
|
2002-09-22 14:27:04 +00:00
|
|
|
stringByDeletingSuffix:appSuffix]);
|
2002-08-04 18:00:11 +00:00
|
|
|
index=tmpIndex+1;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (!_applicationName)
|
|
|
|
{
|
2004-12-31 14:33:16 +00:00
|
|
|
NSString* tmp=[[components subarrayWithRange:NSMakeRange(index,componentsCount-index)]
|
2002-08-04 18:00:11 +00:00
|
|
|
componentsJoinedByString:@"/"];
|
|
|
|
if ([tmp hasSuffix:GSWApplicationPSuffix[GSWNAMES_INDEX]])
|
2002-09-22 14:27:04 +00:00
|
|
|
tmp=[tmp stringByDeletingSuffix:GSWApplicationPSuffix[GSWNAMES_INDEX]];
|
2002-08-04 18:00:11 +00:00
|
|
|
else if ([tmp hasSuffix:GSWApplicationPSuffix[WONAMES_INDEX]])
|
2002-09-22 14:27:04 +00:00
|
|
|
tmp=[tmp stringByDeletingSuffix:GSWApplicationPSuffix[WONAMES_INDEX]];
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_applicationName,tmp);
|
2004-12-31 14:33:16 +00:00
|
|
|
index=componentsCount;
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//Application Number
|
2004-12-31 14:33:16 +00:00
|
|
|
if (index<componentsCount)
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
/*NSDebugMLLog(@"low",@"applicationNumber: components [%@]",
|
2004-12-31 14:33:16 +00:00
|
|
|
[components subarrayWithRange:NSMakeRange(index,componentsCount-index)]);
|
2004-09-01 14:17:18 +00:00
|
|
|
*/
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_applicationNumberString,[components objectAtIndex:index]);
|
|
|
|
_applicationNumber=[_applicationNumberString intValue];
|
|
|
|
index++;
|
|
|
|
//requestHandlerKey
|
2004-12-31 14:33:16 +00:00
|
|
|
if (index<componentsCount)
|
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
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
/*NSDebugMLLog(@"low",@"requestHandlerKey: _components [%@]",
|
2004-12-31 14:33:16 +00:00
|
|
|
[components subarrayWithRange:NSMakeRange(index,componentsCount-index)]);
|
2004-09-01 14:17:18 +00:00
|
|
|
*/
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_requestHandlerKey,[components objectAtIndex:index]);
|
|
|
|
index++;
|
|
|
|
//requestHandlerPath
|
2004-12-31 14:33:16 +00:00
|
|
|
if (index<componentsCount)
|
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
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
/* NSDebugMLLog(@"low",@"requestHandlerPath: components [%@]",
|
2004-12-31 14:33:16 +00:00
|
|
|
[components subarrayWithRange:NSMakeRange(index,componentsCount-index)]);
|
2004-09-01 14:17:18 +00:00
|
|
|
*/
|
2004-12-31 14:33:16 +00:00
|
|
|
ASSIGN(_requestHandlerPath,[[components subarrayWithRange:NSMakeRange(index,componentsCount-index)]componentsJoinedByString:@"/"]);
|
2002-08-04 18:00:11 +00:00
|
|
|
index++;
|
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
|
|
|
};
|
|
|
|
};
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2010-06-22 05:02:29 +00:00
|
|
|
// NSLog(@"%s %d _url:'%@'",__PRETTY_FUNCTION__, __LINE__, _url);
|
|
|
|
// NSLog(@"%s %d _prefix:'%@'",__PRETTY_FUNCTION__, __LINE__, _prefix);
|
|
|
|
// NSLog(@"%s %d _applicationName:'%@'",__PRETTY_FUNCTION__, __LINE__, _applicationName);
|
|
|
|
// NSLog(@"%s %d _applicationNumberString:'%@'",__PRETTY_FUNCTION__, __LINE__, _applicationNumberString);
|
|
|
|
// NSLog(@"%s %d _requestHandlerKey:'%@'",__PRETTY_FUNCTION__, __LINE__, _requestHandlerKey);
|
|
|
|
// NSLog(@"%s %d _queryString:'%@'",__PRETTY_FUNCTION__, __LINE__, _queryString);
|
|
|
|
// NSLog(@"%s %d _requestHandlerPath:'%@'",__PRETTY_FUNCTION__, __LINE__, _requestHandlerPath);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSArray*)urlRequestHandlerPath
|
|
|
|
{
|
|
|
|
NSArray* _path=[urlrequestHandlerPath componentsSeparatedByString:@"/"];
|
|
|
|
return _path;
|
|
|
|
};
|
|
|
|
*/
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)urlRequestHandlerPath
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _requestHandlerPath;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2008-08-20 20:32:10 +00:00
|
|
|
-(NSString*)requestHandlerPath
|
|
|
|
{
|
|
|
|
return _requestHandlerPath;
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)urlQueryString
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _queryString;
|
2008-08-20 20:32:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
-(NSString*)queryString
|
|
|
|
{
|
|
|
|
return _queryString;
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)urlRequestHandlerKey
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _requestHandlerKey;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(int)urlApplicationNumber
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _applicationNumber;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2007-04-13 18:32:02 +00:00
|
|
|
// wo5?
|
|
|
|
- (NSString*) applicationNumber
|
|
|
|
{
|
|
|
|
// parse? compose?
|
|
|
|
return GSWIntToNSString(_applicationNumber);
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) setApplicationNumber: (NSString*) newNr
|
|
|
|
{
|
|
|
|
int intVal = [newNr intValue];
|
|
|
|
|
|
|
|
if (intVal != _applicationNumber) {
|
|
|
|
_applicationNumber = intVal;
|
|
|
|
_flags.beginningComposed = NO;
|
|
|
|
_flags.composed = NO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)urlApplicationName
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _applicationName;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)urlPrefix
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _prefix;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSString*)urlProtocol
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _protocol;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSString*)urlHost
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _host;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSString*)urlPortString
|
|
|
|
{
|
2004-09-01 14:17:18 +00:00
|
|
|
return GSWIntToNSString(_port);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(int)urlPort
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _port;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSString*)urlProtocolHostPort
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
NSMutableString* url=[NSMutableString string];
|
2004-09-01 14:17:18 +00:00
|
|
|
IMP imp=[url methodForSelector:appendStringSel];
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
if (_protocol)
|
|
|
|
{
|
|
|
|
if (_host)
|
2004-09-01 14:17:18 +00:00
|
|
|
{
|
|
|
|
(*imp)(url,appendStringSel,_protocol);
|
|
|
|
(*imp)(url,appendStringSel,@"://");
|
|
|
|
}
|
2002-08-04 18:00:11 +00:00
|
|
|
else if (_port)
|
2004-09-01 14:17:18 +00:00
|
|
|
{
|
|
|
|
(*imp)(url,appendStringSel,_protocol);
|
|
|
|
(*imp)(url,appendStringSel,@"://localhost");
|
|
|
|
}
|
|
|
|
else if (_prefix)
|
|
|
|
{
|
|
|
|
(*imp)(url,appendStringSel,_protocol);
|
|
|
|
(*imp)(url,appendStringSel,@":/");
|
|
|
|
}
|
2002-08-04 18:00:11 +00:00
|
|
|
else
|
2004-09-01 14:17:18 +00:00
|
|
|
{
|
|
|
|
(*imp)(url,appendStringSel,_protocol);
|
|
|
|
(*imp)(url,appendStringSel,@"://");
|
|
|
|
}
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
|
|
|
if (_host)
|
2004-09-01 14:17:18 +00:00
|
|
|
(*imp)(url,appendStringSel,_host);
|
2002-08-04 18:00:11 +00:00
|
|
|
if (_port)
|
2004-09-01 14:17:18 +00:00
|
|
|
{
|
|
|
|
(*imp)(url,appendStringSel,@":");
|
|
|
|
(*imp)(url,appendStringSel,GSWIntToNSString(_port));
|
|
|
|
};
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
return [NSString stringWithString:url];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2008-08-20 20:32:10 +00:00
|
|
|
// CHECKME: depricate?
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLRequestHandlerPath:(NSString*)aString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_requestHandlerPath,aString);
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2008-08-20 20:32:10 +00:00
|
|
|
-(void)setRequestHandlerPath:(NSString*)aString
|
|
|
|
{
|
|
|
|
ASSIGN(_requestHandlerPath,aString);
|
|
|
|
_flags.composed=NO;
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2008-08-20 20:32:10 +00:00
|
|
|
// CHECKME: depricate?
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLQueryString:(NSString*)aString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_queryString,aString);
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2008-08-20 20:32:10 +00:00
|
|
|
-(void)setQueryString:(NSString*)aString
|
|
|
|
{
|
|
|
|
ASSIGN(_queryString,aString);
|
|
|
|
_flags.composed=NO;
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2008-08-20 20:32:10 +00:00
|
|
|
// CHECKME: rename to setRequestHandlerKey: ?? -- dw
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLRequestHandlerKey:(NSString*)aString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_requestHandlerKey,aString);
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2008-08-20 20:32:10 +00:00
|
|
|
-(void)setRequestHandlerKey:(NSString*)aString
|
|
|
|
{
|
|
|
|
ASSIGN(_requestHandlerKey,aString);
|
|
|
|
_flags.composed=NO;
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLApplicationNumber:(int)applicationNumber
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
_applicationNumber=applicationNumber;
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.beginningComposed=NO;
|
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLApplicationName:(NSString*)aString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2004-11-26 11:02:53 +00:00
|
|
|
if (_applicationName==aString) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_applicationName,aString);
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.beginningComposed=NO;
|
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLPrefix:(NSString*)aString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2004-11-26 11:02:53 +00:00
|
|
|
if (_prefix==aString) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_prefix,aString);
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.beginningComposed=NO;
|
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLProtocol:(NSString*)aString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2004-11-26 11:02:53 +00:00
|
|
|
if (_protocol==aString) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_protocol,aString);
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.beginningComposed=NO;
|
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLHost:(NSString*)aString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2004-11-26 11:02:53 +00:00
|
|
|
if (_host==aString) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
ASSIGN(_host,aString);
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.beginningComposed=NO;
|
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLPortString:(NSString*)aString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2004-11-26 11:02:53 +00:00
|
|
|
int myport = [aString intValue];
|
|
|
|
|
|
|
|
if (_port==myport) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
_port=myport;
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.beginningComposed=NO;
|
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setURLPort:(int)port
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2004-11-26 11:02:53 +00:00
|
|
|
if (_port==port) {
|
|
|
|
return;
|
|
|
|
}
|
2008-08-20 20:32:10 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
_port=port;
|
2004-09-01 14:17:18 +00:00
|
|
|
_flags.beginningComposed=NO;
|
|
|
|
_flags.composed=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|