2002-07-27 23:48:47 +00:00
|
|
|
/** GSWRequest.m - <title>GSWeb: Class GSWRequest</title>
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
Copyright (C) 1999-2003 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>
|
|
|
|
Date: Jan 1999
|
2000-01-22 12:49:49 +00:00
|
|
|
|
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"
|
2003-01-19 15:33:07 +00:00
|
|
|
#include <Foundation/GSMime.h>
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-05-14 08:30:22 +00:00
|
|
|
//====================================================================
|
|
|
|
@implementation GSWValueQualityHeaderPart
|
|
|
|
|
|
|
|
/** Returns an array of values ordered by quality descending **/
|
|
|
|
+(NSArray*)valuesFromHeaderString:(NSString*)string
|
|
|
|
{
|
|
|
|
NSArray* values=nil;
|
|
|
|
NSArray* valuesAndQualities=nil;
|
|
|
|
int count=0;
|
|
|
|
LOGObjectFnStart();
|
|
|
|
valuesAndQualities=[string componentsSeparatedByString:@","];
|
|
|
|
count=[valuesAndQualities count];
|
|
|
|
NSDebugMLog(@"string=%@",string);
|
|
|
|
if (count>0)
|
|
|
|
{
|
|
|
|
int i=0;
|
|
|
|
NSMutableArray* qvs=[NSMutableArray array];
|
|
|
|
for(i=0;i<count;i++)
|
|
|
|
{
|
|
|
|
NSString* string=[valuesAndQualities objectAtIndex:i];
|
|
|
|
GSWValueQualityHeaderPart* qv=[GSWValueQualityHeaderPart
|
|
|
|
valueQualityHeaderPartWithString:string];
|
|
|
|
NSDebugMLog(@"string=%@",string);
|
|
|
|
NSDebugMLog(@"qv=%@",qv);
|
|
|
|
if ([[qv value]length]>0)
|
|
|
|
[qvs addObject:qv];
|
|
|
|
};
|
|
|
|
count=[qvs count];
|
|
|
|
if (count>0)
|
|
|
|
{
|
|
|
|
//Sor oon quality desc
|
|
|
|
[qvs sortUsingSelector:@selector(compareOnQualityDesc:)];
|
|
|
|
|
|
|
|
//Remove Duplicates
|
|
|
|
int i=0;
|
|
|
|
for(i=0;i<count;i++)
|
|
|
|
{
|
|
|
|
int j=0;
|
|
|
|
NSString* value=[[qvs objectAtIndex:i] value];
|
|
|
|
for(j=i+1;j<count;j++)
|
|
|
|
{
|
|
|
|
NSString* value2=[[qvs objectAtIndex:j] value];
|
|
|
|
if ([value2 isEqual:value])
|
|
|
|
{
|
|
|
|
[qvs removeObjectAtIndex:j];
|
|
|
|
count--;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
//Finally keep only values
|
|
|
|
values=[qvs valueForKey:@"value"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
NSDebugMLog(@"values=%@",values);
|
|
|
|
LOGObjectFnStop();
|
|
|
|
return values;
|
|
|
|
};
|
|
|
|
|
|
|
|
+(GSWValueQualityHeaderPart*)valueQualityHeaderPartWithString:(NSString*)string
|
|
|
|
{
|
|
|
|
return [[[self alloc]initWithString:string]autorelease];
|
|
|
|
};
|
|
|
|
|
|
|
|
+(GSWValueQualityHeaderPart*)valueQualityHeaderPartWithValue:(NSString*)value
|
|
|
|
qualityString:(NSString*)qualityString
|
|
|
|
{
|
|
|
|
return [[[self alloc]initWithValue:value
|
|
|
|
qualityString:qualityString]autorelease];
|
|
|
|
};
|
|
|
|
|
|
|
|
-(id)initWithString:(NSString*)string
|
|
|
|
{
|
|
|
|
NSString* value=nil;
|
|
|
|
NSString* qualityString=nil;
|
|
|
|
string=[string stringByTrimmingSpaces];
|
|
|
|
NSRange qualitySeparatorRange=[string rangeOfString:@";q="];
|
|
|
|
if (qualitySeparatorRange.length>0)
|
|
|
|
{
|
|
|
|
if (qualitySeparatorRange.location==0)
|
|
|
|
{
|
|
|
|
LOGError(@"value/quality string: '%@'",string);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
value=[string substringToIndex:qualitySeparatorRange.location];
|
|
|
|
if (qualitySeparatorRange.location
|
|
|
|
+qualitySeparatorRange.length<[string length])
|
|
|
|
qualityString=[string substringFromIndex:qualitySeparatorRange.location
|
|
|
|
+qualitySeparatorRange.length];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
else
|
|
|
|
value=string;
|
|
|
|
return [self initWithValue:value
|
|
|
|
qualityString:qualityString];
|
|
|
|
};
|
|
|
|
|
|
|
|
-(id)initWithValue:(NSString*)value
|
|
|
|
qualityString:(NSString*)qualityString
|
|
|
|
{
|
|
|
|
if ((self=[self init]))
|
|
|
|
{
|
|
|
|
ASSIGN(_value,value);
|
|
|
|
qualityString=[qualityString stringByTrimmingSpaces];
|
|
|
|
if ([qualityString length]>0)
|
|
|
|
_quality=[qualityString floatValue];
|
|
|
|
else
|
|
|
|
_quality=1;
|
|
|
|
};
|
|
|
|
return self;
|
|
|
|
};
|
|
|
|
|
|
|
|
-(void)dealloc
|
|
|
|
{
|
|
|
|
DESTROY(_value);
|
|
|
|
[super dealloc];
|
|
|
|
};
|
|
|
|
|
|
|
|
-(NSString*)description
|
|
|
|
{
|
|
|
|
return [NSString stringWithFormat: @"<%s %p : %@: %.1f>",
|
|
|
|
object_get_class_name(self),
|
|
|
|
(void*)self,
|
|
|
|
_value,
|
|
|
|
_quality];
|
|
|
|
}
|
|
|
|
-(NSString*)value
|
|
|
|
{
|
|
|
|
return _value;
|
|
|
|
};
|
|
|
|
|
|
|
|
-(float)quality
|
|
|
|
{
|
|
|
|
return _quality;
|
|
|
|
};
|
|
|
|
|
|
|
|
-(int)compareOnQualityDesc:(GSWValueQualityHeaderPart*)qv
|
|
|
|
{
|
|
|
|
float quality=[self quality];
|
|
|
|
float qvQuality=[qv quality];
|
|
|
|
if (quality>qvQuality)
|
|
|
|
return NSOrderedAscending;
|
|
|
|
else if (quality<qvQuality)
|
|
|
|
return NSOrderedDescending;
|
|
|
|
else
|
|
|
|
return NSOrderedSame;
|
|
|
|
};
|
|
|
|
@end
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// initWithMethod:uri:httpVersion:headers:content:userInfo:
|
|
|
|
|
|
|
|
// may raise exception
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)initWithMethod:(NSString*)aMethod
|
|
|
|
uri:(NSString*)anURL
|
|
|
|
httpVersion:(NSString*)aVersion
|
|
|
|
headers:(NSDictionary*)headers
|
|
|
|
content:(NSData*)content
|
|
|
|
userInfo:(NSDictionary*)userInfo
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
|
|
|
if ((self=[super init]))
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
|
|
|
ASSIGNCOPY(_method,aMethod);
|
|
|
|
NSDebugMLLog(@"requests",@"method=%@",_method);
|
|
|
|
ASSIGNCOPY(_httpVersion,aVersion);
|
|
|
|
ASSIGNCOPY(_headers,headers);
|
|
|
|
_defaultFormValueEncoding=NSISOLatin1StringEncoding;
|
|
|
|
_formValueEncoding=NSISOLatin1StringEncoding;
|
|
|
|
[self _initCookieDictionary];//NDFN
|
|
|
|
_applicationNumber=-9999;
|
|
|
|
{
|
|
|
|
NSString* adaptorVersion=[self headerForKey:GSWHTTPHeader_AdaptorVersion[GSWebNamingConv]];
|
|
|
|
if (!adaptorVersion)
|
|
|
|
adaptorVersion=[self headerForKey:GSWHTTPHeader_AdaptorVersion[GSWebNamingConvInversed]];
|
|
|
|
NSDebugMLLog(@"requests",@"adaptorVersion=%@",adaptorVersion);
|
|
|
|
[self _setIsUsingWebServer:(adaptorVersion!=nil)];//??
|
|
|
|
};
|
|
|
|
NSDebugMLLog(@"requests",@"anURL=%@",anURL);
|
|
|
|
_uri=[[GSWDynamicURLString alloc]initWithCString:[anURL cString]
|
|
|
|
length:[anURL length]];
|
|
|
|
NSDebugMLLog(@"requests",@"uri=%@",_uri);
|
|
|
|
[_uri checkURL];
|
|
|
|
ASSIGNCOPY(_content,content);
|
|
|
|
ASSIGNCOPY(_userInfo,userInfo);
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!aMethod || !anURL)
|
|
|
|
{
|
|
|
|
LOGException0(@"NSGenericException GSWRequest: no method and no url");
|
|
|
|
[NSException raise:NSGenericException
|
|
|
|
format:@"GSWRequest: no method and no url"];
|
|
|
|
};
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
return self;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)dealloc
|
|
|
|
{
|
2000-03-20 15:50:51 +00:00
|
|
|
GSWLogAssertGood(self);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"dealloc GSWRequest");
|
|
|
|
NSDebugFLog0(@"Release GSWRequest method");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_method);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest uri");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_uri);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest httpVersion");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_httpVersion);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest headers");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_headers);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest content");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_content);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest userInfo");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_userInfo);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest formValues");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_formValues);
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest uriElements");
|
|
|
|
DESTROY(_uriElements);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest cookie");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_cookie);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest applicationURLPrefix");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_applicationURLPrefix);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest requestHandlerPathArray");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_requestHandlerPathArray);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest browserLanguages");
|
2002-07-27 23:48:47 +00:00
|
|
|
DESTROY(_browserLanguages);
|
2003-05-14 08:30:22 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest browserAcceptedEncodings");
|
|
|
|
DESTROY(_browserAcceptedEncodings);
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugFLog0(@"Release GSWRequest super");
|
|
|
|
[super dealloc];
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
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
|
|
|
GSWRequest* clone = [[isa allocWithZone:zone] init];
|
2000-01-22 12:49:49 +00:00
|
|
|
if (clone)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
|
|
|
ASSIGNCOPY(clone->_method,_method);
|
|
|
|
ASSIGNCOPY(clone->_uri,_uri);
|
|
|
|
ASSIGNCOPY(clone->_httpVersion,_httpVersion);
|
|
|
|
ASSIGNCOPY(clone->_headers,_headers);
|
|
|
|
ASSIGNCOPY(clone->_content,_content);
|
|
|
|
ASSIGNCOPY(clone->_userInfo,_userInfo);
|
|
|
|
clone->_defaultFormValueEncoding=_defaultFormValueEncoding;
|
|
|
|
clone->_formValueEncoding=_formValueEncoding;
|
|
|
|
ASSIGNCOPY(clone->_formValues,_formValues);
|
2003-01-19 15:33:07 +00:00
|
|
|
ASSIGNCOPY(clone->_uriElements,_uriElements);
|
2002-07-27 23:48:47 +00:00
|
|
|
ASSIGNCOPY(clone->_cookie,_cookie);
|
|
|
|
ASSIGNCOPY(clone->_applicationURLPrefix,_applicationURLPrefix);
|
|
|
|
ASSIGNCOPY(clone->_requestHandlerPathArray,_requestHandlerPathArray);
|
|
|
|
ASSIGNCOPY(clone->_browserLanguages,_browserLanguages);
|
2003-05-14 08:30:22 +00:00
|
|
|
ASSIGNCOPY(clone->_browserAcceptedEncodings,_browserAcceptedEncodings);
|
2002-07-27 23:48:47 +00:00
|
|
|
clone->_requestType=_requestType;
|
|
|
|
clone->_isUsingWebServer=_isUsingWebServer;
|
|
|
|
clone->_formValueEncodingDetectionEnabled=_formValueEncodingDetectionEnabled;
|
|
|
|
clone->_applicationNumber=_applicationNumber;
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
return clone;
|
|
|
|
};
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWContext*)_context
|
|
|
|
{
|
|
|
|
return _context;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_setContext:(GSWContext*)context
|
|
|
|
{
|
|
|
|
_context = context;//Don't retain because request is retained by context
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// content
|
|
|
|
|
|
|
|
-(NSData*)content
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _content;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// headerForKey:
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSString*)headerForKey:(NSString*)key
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
id value=[self headersForKey:key];
|
2000-01-22 12:49:49 +00:00
|
|
|
if (value && [value count]>0)
|
2002-07-27 23:48:47 +00:00
|
|
|
return [value objectAtIndex:0];
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-07-27 23:48:47 +00:00
|
|
|
return nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// headerKeys
|
|
|
|
|
|
|
|
-(NSArray*)headerKeys
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return [_headers allKeys];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// headersForKey:
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSArray*)headersForKey:(NSString*)key
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return [_headers objectForKey:key];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2001-10-25 Manuel Guesdon <mguesdon@orange-concept.com>
Applied patch from Turbocat (www.turbocat.de): GSWPatch_04-JUL_2001.diff
except GSWeb.framework/GSWInput.m/.h one (have to verify coherence of it)
* GSWAdaptors/common/GSWApp.c/.h: Added GSWAppInfo
* GSWAdaptors/common/GSWAppConnectNSSocket.c: Changes on includes
* GSWAdaptors/common/GSWLoadBalancing.h: Added parameter to GSWLoadBalancing_Find*
* GSWAdaptors/common/GSWLoadBalancing.c: added p_pURLComponents parameter,
o management of AppInfo
* GSWAdaptors/common/GSWAppRequest.c: managing refused connections
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.gswd: misspelling correction
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.html: Various Changes
* GSWExtensions.framework/GSWStatsPage.m: changes in login/password validation
o -awake added
* GSWeb.framework/GSWApplication.m/.h: Manage refusing new sessions
* GSWeb.framework/GSWBundle.m: debug traces commented
* GSWeb.framework/GSWComponent.m: implementation of ensureAwakeInContext:
* GSWeb.framework/GSWAssociation.m: special case for returned value of type GSMutableArray (Why ?)
* GSWeb.framework/GSWComponentRequestHandler.m: comments added
* GSWeb.framework/GSWDefaultAdaptorThread.m: added debug traces
* GSWeb.framework/GSWDirectActionRequestHandler.m: replaced GSWDirectAction by DirectAction
* GSWeb.framework/GSWDisplayGroup.m: initialize _baseIndex,
o correct misspelled names,
o added -description,
o use delegate in _changedInEditingContext:, _invalidatedAllObjectsInStore:,
o changes in -deleteObjectAtIndex:,
* GSWeb.framework/GSWFileUpload.m: different handling of _fileDatasCount,
handle bug in omniweb-browser
* GSWeb.framework/GSWHyperlink.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWImageButton.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWPopUpButton.m:
o use [response_ appendContentString:_noSelectionStringValue] instead of
[response_ appendContentHTMLString:_noSelectionStringValue]
o handle no displayString case
o use [response_ appendContentString:_displayStringValue] instead of
[response_ appendContentHTMLString:_displayStringValue]
* GSWeb.framework/GSWConfig.h: set GSWOPTVALUE_AutoOpenInBrowser to NO
* GSWeb.framework/GSWElementIDString.m: comment some debug traces
* GSWeb.framework/GSWHTMLStaticGroup.m/.h: added support of documentType
* GSWeb.framework/GSWHTMLURLValuedElement.m: addeded debug trace
* GSWeb.framework/GSWKeyValueAssociation.m: use NSStringFromClass([retValue class])
instead of [retValue class] for log
* GSWeb.framework/GSWRequest.m/.h: added -(NSDictionary*)headers;
o added test on _contentType in _contentType
o autorelease _dict in -uriElements
* GSWeb.framework/GSWResponse.m/.h: added -setHeaders: and -headers
o Added GSWResponse (GSWResponseRefused)
o return self in -generateResponse
* GSWeb.framework/GSWServerSessionStore.m/.h: added @interface GSWServerSessionStore (GSWServerSessionStoreInfo)
o added refusing session management
* GSWeb.framework/GSWSession.m:
o in -terminate forces to call removeSessionWithID in GSWServerSessionStore to dealloc it
* GSWeb.framework/GSWSessionTimeOutManager.m/.h: replace NSMutableOrderedArray* sessionOrderedTimeOuts;
by NSMutableArray* sessionOrderedTimeOuts;
o added traces
o added GSWSessionTimeOutManager (GSWSessionRefused)
* GSWeb.framework/GSWSubmitButton.m: raise exception if no element is returned
* GSWeb.framework/GSWTemplateParser.m: added doctype management
* GSWeb.framework/GSWUtils.h: added if defined for __NetBSD__
* GSWeb.framework/GSWWOCompatibility.m/.h: added WOGenericContainer, WOImageButton, WOHyperlink
* GSWeb.framework/attach.m: added if defined for __NetBSD__
* GSWeb.framework/stacktrace.m: added if defined for __NetBSD__
* GSWeb.framework/GSWTemplateParserXML.m: traces commented
o test XML node content before adding it
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m
o changes in -getIVarNamed: and in setIVarNamed:withValue: (use of sel+imp, tests on parameters)
* GSWAdaptors/common/GSWHTTPResponse.c: change in GSWHTTPResponse_GetResponse()
o debug traces removed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@11251 72102866-910b-0410-8b05-ffd578937521
2001-10-26 08:50:52 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// headers
|
|
|
|
|
|
|
|
-(NSDictionary*)headers
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _headers;
|
2001-10-25 Manuel Guesdon <mguesdon@orange-concept.com>
Applied patch from Turbocat (www.turbocat.de): GSWPatch_04-JUL_2001.diff
except GSWeb.framework/GSWInput.m/.h one (have to verify coherence of it)
* GSWAdaptors/common/GSWApp.c/.h: Added GSWAppInfo
* GSWAdaptors/common/GSWAppConnectNSSocket.c: Changes on includes
* GSWAdaptors/common/GSWLoadBalancing.h: Added parameter to GSWLoadBalancing_Find*
* GSWAdaptors/common/GSWLoadBalancing.c: added p_pURLComponents parameter,
o management of AppInfo
* GSWAdaptors/common/GSWAppRequest.c: managing refused connections
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.gswd: misspelling correction
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.html: Various Changes
* GSWExtensions.framework/GSWStatsPage.m: changes in login/password validation
o -awake added
* GSWeb.framework/GSWApplication.m/.h: Manage refusing new sessions
* GSWeb.framework/GSWBundle.m: debug traces commented
* GSWeb.framework/GSWComponent.m: implementation of ensureAwakeInContext:
* GSWeb.framework/GSWAssociation.m: special case for returned value of type GSMutableArray (Why ?)
* GSWeb.framework/GSWComponentRequestHandler.m: comments added
* GSWeb.framework/GSWDefaultAdaptorThread.m: added debug traces
* GSWeb.framework/GSWDirectActionRequestHandler.m: replaced GSWDirectAction by DirectAction
* GSWeb.framework/GSWDisplayGroup.m: initialize _baseIndex,
o correct misspelled names,
o added -description,
o use delegate in _changedInEditingContext:, _invalidatedAllObjectsInStore:,
o changes in -deleteObjectAtIndex:,
* GSWeb.framework/GSWFileUpload.m: different handling of _fileDatasCount,
handle bug in omniweb-browser
* GSWeb.framework/GSWHyperlink.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWImageButton.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWPopUpButton.m:
o use [response_ appendContentString:_noSelectionStringValue] instead of
[response_ appendContentHTMLString:_noSelectionStringValue]
o handle no displayString case
o use [response_ appendContentString:_displayStringValue] instead of
[response_ appendContentHTMLString:_displayStringValue]
* GSWeb.framework/GSWConfig.h: set GSWOPTVALUE_AutoOpenInBrowser to NO
* GSWeb.framework/GSWElementIDString.m: comment some debug traces
* GSWeb.framework/GSWHTMLStaticGroup.m/.h: added support of documentType
* GSWeb.framework/GSWHTMLURLValuedElement.m: addeded debug trace
* GSWeb.framework/GSWKeyValueAssociation.m: use NSStringFromClass([retValue class])
instead of [retValue class] for log
* GSWeb.framework/GSWRequest.m/.h: added -(NSDictionary*)headers;
o added test on _contentType in _contentType
o autorelease _dict in -uriElements
* GSWeb.framework/GSWResponse.m/.h: added -setHeaders: and -headers
o Added GSWResponse (GSWResponseRefused)
o return self in -generateResponse
* GSWeb.framework/GSWServerSessionStore.m/.h: added @interface GSWServerSessionStore (GSWServerSessionStoreInfo)
o added refusing session management
* GSWeb.framework/GSWSession.m:
o in -terminate forces to call removeSessionWithID in GSWServerSessionStore to dealloc it
* GSWeb.framework/GSWSessionTimeOutManager.m/.h: replace NSMutableOrderedArray* sessionOrderedTimeOuts;
by NSMutableArray* sessionOrderedTimeOuts;
o added traces
o added GSWSessionTimeOutManager (GSWSessionRefused)
* GSWeb.framework/GSWSubmitButton.m: raise exception if no element is returned
* GSWeb.framework/GSWTemplateParser.m: added doctype management
* GSWeb.framework/GSWUtils.h: added if defined for __NetBSD__
* GSWeb.framework/GSWWOCompatibility.m/.h: added WOGenericContainer, WOImageButton, WOHyperlink
* GSWeb.framework/attach.m: added if defined for __NetBSD__
* GSWeb.framework/stacktrace.m: added if defined for __NetBSD__
* GSWeb.framework/GSWTemplateParserXML.m: traces commented
o test XML node content before adding it
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m
o changes in -getIVarNamed: and in setIVarNamed:withValue: (use of sel+imp, tests on parameters)
* GSWAdaptors/common/GSWHTTPResponse.c: change in GSWHTTPResponse_GetResponse()
o debug traces removed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@11251 72102866-910b-0410-8b05-ffd578937521
2001-10-26 08:50:52 +00:00
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// httpVersion
|
|
|
|
|
|
|
|
-(NSString*)httpVersion
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _httpVersion;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// method
|
|
|
|
// GET or PUT
|
|
|
|
|
|
|
|
-(NSString*)method
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _method;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// uri
|
|
|
|
-(NSString*)uri
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return (NSString*)_uri;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSString*)urlProtocol
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* urlProtocol=[_uri urlProtocol];
|
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
|
|
|
if (!urlProtocol)
|
2003-04-09 12:03:17 +00:00
|
|
|
{
|
|
|
|
urlProtocol=[self headerForKey:GSWHTTPHeader_RequestScheme[GSWebNamingConv]];
|
|
|
|
if (!urlProtocol)
|
|
|
|
{
|
|
|
|
urlProtocol=[self headerForKey:GSWHTTPHeader_RequestScheme[GSWebNamingConvInversed]];
|
|
|
|
if (!urlProtocol)
|
|
|
|
urlProtocol=GSWProtocol_HTTP;
|
|
|
|
};
|
|
|
|
};
|
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
|
|
|
return urlProtocol;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSString*)urlHost
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* urlHost=[_uri urlHost];
|
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
|
|
|
if (!urlHost)
|
2003-04-09 12:03:17 +00:00
|
|
|
{
|
|
|
|
urlHost=[self headerForKey:GSWHTTPHeader_ServerName[GSWebNamingConv]];
|
|
|
|
if (!urlHost)
|
|
|
|
urlHost=[self headerForKey:GSWHTTPHeader_ServerName[GSWebNamingConvInversed]];
|
|
|
|
};
|
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
|
|
|
return urlHost;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSString*)urlPortString
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* urlPortString=[_uri urlPortString];
|
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
|
|
|
if (!urlPortString)
|
2003-04-09 12:03:17 +00:00
|
|
|
{
|
|
|
|
urlPortString=[self headerForKey:GSWHTTPHeader_ServerPort[GSWebNamingConv]];
|
|
|
|
if (!urlPortString)
|
|
|
|
urlPortString=[self headerForKey:GSWHTTPHeader_ServerPort[GSWebNamingConvInversed]];
|
|
|
|
};
|
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
|
|
|
return urlPortString;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(int)urlPort
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
int port=[_uri urlPort];
|
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
|
|
|
if (!port)
|
2003-04-09 12:03:17 +00:00
|
|
|
{
|
|
|
|
port=[[self headerForKey:GSWHTTPHeader_ServerPort[GSWebNamingConv]]intValue];
|
|
|
|
if (!port)
|
|
|
|
port=[[self headerForKey:GSWHTTPHeader_ServerPort[GSWebNamingConvInversed]]intValue];
|
|
|
|
};
|
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
|
|
|
return port;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSString*)urlProtocolHostPort
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return [_uri urlProtocolHostPort];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(BOOL)isSecure
|
|
|
|
{
|
2003-04-09 12:03:17 +00:00
|
|
|
return ([[self urlProtocol] caseInsensitiveCompare:GSWProtocol_HTTPS]==NSOrderedSame);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSArray*)browserLanguages
|
|
|
|
{
|
|
|
|
//OK
|
2000-10-04 22:19:43 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_browserLanguages)
|
|
|
|
{
|
|
|
|
NSMutableArray* browserLanguages=nil;
|
|
|
|
NSString* header=[self headerForKey:GSWHTTPHeader_AcceptLanguage];
|
|
|
|
NSDebugMLLog(@"requests",@"lang header:%@",header);
|
|
|
|
if (header)
|
|
|
|
{
|
2003-05-14 08:30:22 +00:00
|
|
|
NSArray* languages=[GSWValueQualityHeaderPart valuesFromHeaderString:header];
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!languages)
|
|
|
|
{
|
|
|
|
LOGError0(@"No languages");
|
|
|
|
};
|
|
|
|
browserLanguages=(NSMutableArray*)[GSWResourceManager GSLanguagesFromISOLanguages:languages];
|
|
|
|
NSDebugMLLog(@"requests",@"browserLanguages:%@",browserLanguages);
|
|
|
|
if (browserLanguages)
|
|
|
|
{
|
|
|
|
//Remove Duplicates
|
|
|
|
int i=0;
|
|
|
|
browserLanguages=[browserLanguages mutableCopy];
|
|
|
|
for(i=0;i<[browserLanguages count];i++)
|
|
|
|
{
|
|
|
|
int j=0;
|
|
|
|
NSString* language=[browserLanguages objectAtIndex:i];
|
|
|
|
for(j=[browserLanguages count]-1;j>i;j--)
|
|
|
|
{
|
|
|
|
NSString* language2=[browserLanguages objectAtIndex:j];
|
|
|
|
if ([language2 isEqual:language])
|
|
|
|
[browserLanguages removeObjectAtIndex:j];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
LOGError0(@"No languages header");
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!browserLanguages)
|
|
|
|
{
|
|
|
|
LOGError0(@"No known languages");
|
|
|
|
browserLanguages=(NSMutableArray*)[NSArray array];
|
|
|
|
};
|
|
|
|
ASSIGN(_browserLanguages,browserLanguages);
|
|
|
|
NSDebugMLLog(@"requests",@"browserLanguages:%@",_browserLanguages);
|
|
|
|
};
|
2000-10-04 22:19:43 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return _browserLanguages;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2003-05-14 08:30:22 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSArray*)browserAcceptedEncodings
|
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
|
|
|
if (!_browserAcceptedEncodings)
|
|
|
|
{
|
|
|
|
NSString* header=[self headerForKey:GSWHTTPHeader_AcceptEncoding];
|
|
|
|
NSDebugMLLog(@"requests",@"accept encoding header:%@",header);
|
|
|
|
if (header)
|
|
|
|
{
|
|
|
|
NSArray* values=[GSWValueQualityHeaderPart valuesFromHeaderString:header];
|
|
|
|
if (!values)
|
|
|
|
values=[NSArray array];
|
|
|
|
ASSIGN(_browserAcceptedEncodings,values);
|
|
|
|
};
|
|
|
|
NSDebugMLLog(@"requests",@"browserAcceptedEncodings:%@",_browserAcceptedEncodings);
|
|
|
|
};
|
|
|
|
LOGObjectFnStop();
|
|
|
|
return _browserAcceptedEncodings;
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSArray*)requestHandlerPathArray
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!_requestHandlerPathArray)
|
|
|
|
{
|
|
|
|
NSString* urlRequestHandlerPath=[_uri urlRequestHandlerPath];
|
|
|
|
ASSIGN(_requestHandlerPathArray,
|
|
|
|
[urlRequestHandlerPath componentsSeparatedByString:@"/"]);
|
|
|
|
};
|
|
|
|
return _requestHandlerPathArray;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// userInfo
|
|
|
|
-(NSDictionary*)userInfo
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _userInfo;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)description
|
|
|
|
{
|
2003-03-21 14:32:57 +00:00
|
|
|
return [NSString stringWithFormat:@"<%s %p - method=%@, uri=%@, httpVersion=%@, headers=%@, content=%@, userInfo=%@, defaultFormValueEncoding=%u, formValueEncoding=%u, formValues=%@, uriElements=%@, cookie=%@, applicationURLPrefix=%@, requestHandlerPathArray=%@, browserLanguages=%@, requestType=%d, isUsingWebServer=%s, formValueEncodingDetectionEnabled=%s, applicationNumber=%d",
|
2002-07-27 23:48:47 +00:00
|
|
|
object_get_class_name(self),
|
|
|
|
(void*)self,
|
|
|
|
_method,
|
|
|
|
_uri,
|
|
|
|
_httpVersion,
|
|
|
|
_headers,
|
|
|
|
_content,
|
|
|
|
_userInfo,
|
|
|
|
_defaultFormValueEncoding,
|
|
|
|
_formValueEncoding,
|
|
|
|
_formValues,
|
2003-01-19 15:33:07 +00:00
|
|
|
_uriElements,
|
2002-07-27 23:48:47 +00:00
|
|
|
_cookie,
|
|
|
|
_applicationURLPrefix,
|
|
|
|
_requestHandlerPathArray,
|
|
|
|
_browserLanguages,
|
|
|
|
_requestType,
|
|
|
|
_isUsingWebServer ? "YES" : "NO",
|
|
|
|
_formValueEncodingDetectionEnabled ? "YES" : "NO",
|
|
|
|
_applicationNumber];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWFormValueReporting)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// setDefaultFormValueEncoding:
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)setDefaultFormValueEncoding:(NSStringEncoding)encoding
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_defaultFormValueEncoding=encoding;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// defaultFormValueEncoding
|
|
|
|
-(NSStringEncoding)defaultFormValueEncoding
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _defaultFormValueEncoding;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// setFormValueEncodingDetectionEnabled:
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)setFormValueEncodingDetectionEnabled:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_formValueEncodingDetectionEnabled=flag;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// isFormValueEncodingDetectionEnabled
|
|
|
|
-(BOOL)isFormValueEncodingDetectionEnabled
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _formValueEncodingDetectionEnabled;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// formValueEncoding
|
|
|
|
|
|
|
|
-(NSStringEncoding)formValueEncoding
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _formValueEncoding;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// formValueKeys
|
|
|
|
|
|
|
|
-(NSArray*)formValueKeys
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDictionary* formValues=nil;
|
|
|
|
NSArray* formValueKeys=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2000-08-25 10:36:16 +00:00
|
|
|
NS_DURING
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
formValues=[self _formValues];
|
2000-08-25 10:36:16 +00:00
|
|
|
}
|
|
|
|
NS_HANDLER
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
|
|
|
@"GSWRequest formValueKeys");
|
2000-08-25 10:36:16 +00:00
|
|
|
LOGException(@"%@ (%@)",localException,[localException reason]);
|
|
|
|
[localException raise];
|
|
|
|
};
|
|
|
|
NS_ENDHANDLER;
|
2002-07-27 23:48:47 +00:00
|
|
|
formValueKeys=[formValues allKeys];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return formValueKeys;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// formValuesForKey:
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSArray*)formValuesForKey:(NSString*)key
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSArray* formValuesForKey=nil;
|
|
|
|
NSDictionary* formValues=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2000-08-25 10:36:16 +00:00
|
|
|
NS_DURING
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
formValues=[self _formValues];
|
2000-08-25 10:36:16 +00:00
|
|
|
}
|
|
|
|
NS_HANDLER
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"GSWRequest formValuesForKey");
|
2000-08-25 10:36:16 +00:00
|
|
|
LOGException(@"%@ (%@)",localException,[localException reason]);
|
|
|
|
[localException raise];
|
|
|
|
};
|
|
|
|
NS_ENDHANDLER;
|
2002-07-27 23:48:47 +00:00
|
|
|
formValuesForKey=[formValues objectForKey:key];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return formValuesForKey;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// formValueForKey:
|
|
|
|
// return id because GSWFileUpload
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)formValueForKey:(NSString*)key
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
id formValue=nil;
|
|
|
|
NSArray* formValuesForKey=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
formValuesForKey=[self formValuesForKey:key];
|
|
|
|
NSAssert3(!formValuesForKey || [formValuesForKey isKindOfClass:[NSArray class]],@"formValues:%@ ForKey:%@ is not a NSArray it's a %@",
|
|
|
|
formValuesForKey,
|
|
|
|
key,
|
|
|
|
[formValuesForKey class]);
|
|
|
|
if (formValuesForKey && [formValuesForKey count]>0)
|
|
|
|
formValue=[formValuesForKey objectAtIndex:0];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return formValue;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// formValues
|
|
|
|
-(NSDictionary*)formValues
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDictionary* formValues=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2000-08-25 10:36:16 +00:00
|
|
|
NS_DURING
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
formValues=[self _formValues];
|
2000-08-25 10:36:16 +00:00
|
|
|
}
|
|
|
|
NS_HANDLER
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
|
|
|
@"GSWRequest formValues");
|
2000-08-25 10:36:16 +00:00
|
|
|
LOGException(@"%@ (%@)",localException,[localException reason]);
|
|
|
|
[localException raise];
|
|
|
|
};
|
|
|
|
NS_ENDHANDLER;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return formValues;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWURIElementReporting)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// uriValueKeys
|
|
|
|
|
|
|
|
-(NSArray*)uriElementKeys
|
|
|
|
{
|
|
|
|
NSDictionary* uriElements=nil;
|
|
|
|
NSArray* uriElementKeys=nil;
|
|
|
|
LOGObjectFnStart();
|
|
|
|
NS_DURING
|
|
|
|
{
|
|
|
|
uriElements=[self _uriElements];
|
|
|
|
}
|
|
|
|
NS_HANDLER
|
|
|
|
{
|
|
|
|
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
|
|
|
@"GSWRequest uriElementKeys");
|
|
|
|
LOGException(@"%@ (%@)",localException,[localException reason]);
|
|
|
|
[localException raise];
|
|
|
|
};
|
|
|
|
NS_ENDHANDLER;
|
|
|
|
uriElementKeys=[uriElements allKeys];
|
|
|
|
LOGObjectFnStop();
|
|
|
|
return uriElementKeys;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// uriElementForKey:
|
|
|
|
-(NSString*)uriElementForKey:(NSString*)key
|
|
|
|
{
|
2003-03-21 14:32:57 +00:00
|
|
|
NSString* uriElement=nil;
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDictionary* uriElements=nil;
|
|
|
|
LOGObjectFnStart();
|
|
|
|
NS_DURING
|
|
|
|
{
|
|
|
|
uriElements=[self _uriElements];
|
|
|
|
}
|
|
|
|
NS_HANDLER
|
|
|
|
{
|
|
|
|
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"GSWRequest uriElementForKey:");
|
|
|
|
LOGException(@"%@ (%@)",localException,[localException reason]);
|
|
|
|
[localException raise];
|
|
|
|
};
|
|
|
|
NS_ENDHANDLER;
|
|
|
|
uriElement=[uriElements objectForKey:key];
|
|
|
|
LOGObjectFnStop();
|
|
|
|
return uriElement;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// uriElements
|
|
|
|
-(NSDictionary*)uriElements
|
|
|
|
{
|
|
|
|
NSDictionary* uriElements=nil;
|
|
|
|
LOGObjectFnStart();
|
|
|
|
NS_DURING
|
|
|
|
{
|
|
|
|
uriElements=[self _uriElements];
|
|
|
|
}
|
|
|
|
NS_HANDLER
|
|
|
|
{
|
|
|
|
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
|
|
|
@"GSWRequest uriElements");
|
|
|
|
LOGException(@"%@ (%@)",localException,[localException reason]);
|
|
|
|
[localException raise];
|
|
|
|
};
|
|
|
|
NS_ENDHANDLER;
|
|
|
|
LOGObjectFnStop();
|
|
|
|
return uriElements;
|
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestTypeReporting)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// isFromClientComponent
|
|
|
|
|
|
|
|
-(BOOL)isFromClientComponent
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* remoteInvocationPost=nil;
|
|
|
|
BOOL isFromClientComponent=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
remoteInvocationPost=[self formValueForKey:GSWFormValue_RemoteInvocationPost[GSWebNamingConv]];
|
|
|
|
isFromClientComponent=(remoteInvocationPost!=nil);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return isFromClientComponent;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (Cookies)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)setCookieFromHeaders
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDictionary* cookie=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
NSString* cookieHeader=nil;
|
|
|
|
LOGObjectFnStart();
|
|
|
|
cookieHeader=[self headerForKey:GSWHTTPHeader_Cookie];
|
|
|
|
if (cookieHeader)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
|
|
|
NSDictionary* cookieStrings=[cookieHeader dictionaryWithSep1:@"; "
|
|
|
|
withSep2:@"="
|
|
|
|
withOptionUnescape:NO];
|
|
|
|
if (cookieStrings)
|
|
|
|
{
|
|
|
|
NSMutableDictionary* cookieTmp=[NSMutableDictionary dictionary];
|
|
|
|
NSEnumerator* enumerator = [cookieStrings keyEnumerator];
|
|
|
|
id key;
|
|
|
|
id value;
|
|
|
|
NSArray* newValue;
|
|
|
|
id prevValue;
|
|
|
|
NSDebugMLLog(@"requests",@"enumerator=%@ cookieTmp=%@",enumerator,cookieTmp);
|
|
|
|
while ((key = [enumerator nextObject]))
|
|
|
|
{
|
|
|
|
value=[cookieStrings objectForKey:key];
|
|
|
|
if (value)
|
|
|
|
{
|
|
|
|
id cookieValue=nil;
|
|
|
|
int index=0;
|
|
|
|
for(index=0;index<[value count];index++)
|
|
|
|
{
|
|
|
|
cookieValue=[value objectAtIndex:index];
|
|
|
|
if (cookieValue)
|
|
|
|
{
|
|
|
|
newValue=nil;
|
|
|
|
cookieValue=[GSWCookie cookieWithName:key
|
|
|
|
value:cookieValue];
|
|
|
|
prevValue=[cookie objectForKey:key];
|
|
|
|
if (prevValue)
|
|
|
|
newValue=[prevValue arrayByAddingObject:cookieValue];
|
|
|
|
else
|
|
|
|
newValue=[NSArray arrayWithObject:cookieValue];
|
|
|
|
[cookieTmp setObject:newValue
|
|
|
|
forKey:key];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
cookie=[NSDictionary dictionaryWithDictionary:cookieTmp];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
ASSIGN(_cookie,cookie);
|
|
|
|
NSDebugMLLog(@"requests",@"Cookie: %@",_cookie);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// cookieValuesForKey:
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSArray*)cookieValuesForKey:(NSString*)key
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSArray* cookieValuesForKey=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
|
|
|
[self _initCookieDictionary];
|
2002-07-27 23:48:47 +00:00
|
|
|
cookieValuesForKey=[_cookie objectForKey:key];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return cookieValuesForKey;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// cookieValueForKey:
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSString*)cookieValueForKey:(NSString*)key
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
id object=nil;
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* cookieValueForKey=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
|
|
|
[self _initCookieDictionary];
|
2002-07-27 23:48:47 +00:00
|
|
|
object=[_cookie objectForKey:key];
|
2000-01-22 12:49:49 +00:00
|
|
|
if (object && [object count]>0)
|
2002-07-27 23:48:47 +00:00
|
|
|
cookieValueForKey=[object objectAtIndex:0];
|
|
|
|
NSDebugMLLog(@"requests",@"cookieValueForKey:%@=%@",key,cookieValueForKey);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return cookieValueForKey;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// cookieValues
|
|
|
|
-(NSDictionary*)cookieValues
|
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
|
|
|
[self _initCookieDictionary];
|
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return _cookie;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSDictionary*)_initCookieDictionary
|
|
|
|
{
|
|
|
|
//ok
|
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"low",@"cookie=%@",_cookie);
|
|
|
|
if (!_cookie)
|
|
|
|
{
|
|
|
|
NSString* cookieDescription=[self _cookieDescription];
|
|
|
|
NSArray* cookiesArray=[cookieDescription componentsSeparatedByString:@"; "];
|
|
|
|
NSMutableDictionary* cookies=[NSMutableDictionary dictionary];
|
|
|
|
NSString* cookieString=nil;
|
|
|
|
NSArray* cookie=nil;
|
|
|
|
NSString* cookieName=nil;
|
|
|
|
NSString* cookieValue=nil;
|
|
|
|
NSArray* cookieArrayValue=nil;
|
|
|
|
NSArray* cookiePrevValue=nil;
|
|
|
|
int i=0;
|
|
|
|
NSDebugMLLog(@"low",@"cookieDescription=%@",cookieDescription);
|
|
|
|
NSDebugMLLog(@"low",@"cookiesArray=%@",cookiesArray);
|
|
|
|
for(i=0;i<[cookiesArray count];i++)
|
|
|
|
{
|
|
|
|
cookieString=[cookiesArray objectAtIndex:i];
|
|
|
|
NSDebugMLLog(@"low",@"cookieString=%@",cookieString);
|
|
|
|
cookie=[cookieString componentsSeparatedByString:@"="];
|
|
|
|
NSDebugMLLog(@"low",@"cookie=%@",cookie);
|
|
|
|
if ([cookie count]>0)
|
|
|
|
{
|
|
|
|
cookieName=[cookie objectAtIndex:0];
|
|
|
|
if ([cookie count]>1)
|
|
|
|
cookieValue=[cookie objectAtIndex:1];
|
|
|
|
else
|
|
|
|
cookieValue=[NSString string];
|
|
|
|
cookiePrevValue=[cookies objectForKey:cookieName];
|
|
|
|
if (cookiePrevValue)
|
|
|
|
cookieArrayValue=[cookiePrevValue arrayByAddingObject:cookieValue];
|
|
|
|
else
|
|
|
|
cookieArrayValue=[NSArray arrayWithObject:cookieValue];
|
|
|
|
[cookies setObject:cookieArrayValue
|
|
|
|
forKey:cookieName];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
ASSIGN(_cookie,[NSDictionary dictionaryWithDictionary:cookies]);
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return _cookie;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)_cookieDescription
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* cookieHeader=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
cookieHeader=[self headerForKey:GSWHTTPHeader_Cookie];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return cookieHeader;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestA)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2003-01-19 15:33:07 +00:00
|
|
|
-(NSString*)sessionIDFromValuesOrCookie
|
|
|
|
{
|
|
|
|
return [self sessionIDFromValuesOrCookieByLookingForCookieFirst:[[self class]_lookForIDsInCookiesFirst]];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)sessionIDFromValuesOrCookieByLookingForCookieFirst:(BOOL)lookCookieFirst
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* sessionID=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2003-01-19 15:33:07 +00:00
|
|
|
sessionID=[self uriOrFormOrCookiesElementForKey:GSWKey_SessionID[GSWebNamingConv]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
2002-07-27 23:48:47 +00:00
|
|
|
if (!sessionID)
|
2003-01-19 15:33:07 +00:00
|
|
|
{
|
|
|
|
sessionID=[self uriOrFormOrCookiesElementForKey:GSWKey_SessionID[GSWebNamingConvInversed]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return sessionID;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// sessionID
|
|
|
|
// nil if first request of session
|
|
|
|
|
|
|
|
-(NSString*)sessionID
|
|
|
|
{
|
|
|
|
return [self sessionIDFromValuesOrCookie];
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)requestHandlerPath
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return [_uri urlRequestHandlerPath];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// adaptorPrefix
|
|
|
|
|
|
|
|
-(NSString*)adaptorPrefix
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return [_uri urlPrefix];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// applicationName
|
|
|
|
|
|
|
|
-(NSString*)applicationName
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return [_uri urlApplicationName];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// applicationNumber
|
|
|
|
// nil if request can be handled by any instance
|
|
|
|
|
|
|
|
-(int)applicationNumber
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
if (_applicationNumber==-9999)
|
|
|
|
{
|
|
|
|
NSDictionary* uriElements=[self uriOrFormOrCookiesElements];
|
|
|
|
NSString* applicationNumber=[uriElements objectForKey:GSWKey_InstanceID[GSWebNamingConv]];
|
|
|
|
if (!applicationNumber)
|
|
|
|
applicationNumber=[uriElements objectForKey:GSWKey_InstanceID[GSWebNamingConvInversed]];
|
|
|
|
_applicationNumber=[applicationNumber intValue];
|
|
|
|
};
|
|
|
|
return _applicationNumber;
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)requestHandlerKey
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* requestHandlerKey=[_uri urlRequestHandlerKey];
|
|
|
|
return requestHandlerKey;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestB)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSDictionary*)_extractValuesFromFormData:(NSData*)aFormData
|
|
|
|
withEncoding:(NSStringEncoding)encoding
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSArray* allKeys=nil;
|
|
|
|
NSDictionary* tmpFormData=nil;
|
|
|
|
NSString* formString=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"requests",@"aFormData=%@",aFormData);
|
|
|
|
NSDebugMLLog(@"requests",@"encoding=%ld",(long)encoding);
|
|
|
|
formString=[[[NSString alloc]initWithData:aFormData
|
|
|
|
encoding:encoding] autorelease];
|
|
|
|
NSDebugMLLog(@"requests",@"formString=%@",formString);
|
|
|
|
tmpFormData=[formString dictionaryQueryString];
|
|
|
|
NSDebugMLLog(@"requests",@"tmpFormData=%@",tmpFormData);
|
|
|
|
allKeys=[tmpFormData allKeys];
|
|
|
|
NSDebugMLLog(@"requests",@"allKeys=%@",allKeys);
|
|
|
|
NSDebugMLLog(@"requests",@"allKeys count=%d",[allKeys count]);
|
|
|
|
if ([allKeys count]>0)
|
|
|
|
{
|
|
|
|
int i=0;
|
|
|
|
int count=[allKeys count];
|
|
|
|
NSString* key=nil;
|
|
|
|
BOOL ismapCoordsFound=NO;
|
|
|
|
NSArray* value=nil;
|
|
|
|
for(i=0;i<count && !ismapCoordsFound;i++)
|
|
|
|
{
|
|
|
|
key=[allKeys objectAtIndex:i];
|
|
|
|
NSDebugMLLog(@"requests",@"key=%@",key);
|
|
|
|
value=[tmpFormData objectForKey:key];
|
|
|
|
if ([value count]==1
|
|
|
|
&&[[value objectAtIndex:0]length]==0
|
|
|
|
&&[key ismapCoordx:NULL
|
|
|
|
y:NULL])
|
|
|
|
{
|
|
|
|
NSMutableDictionary* tmpFormDataMutable=[[tmpFormData mutableCopy]autorelease];
|
|
|
|
ismapCoordsFound=YES;
|
|
|
|
[tmpFormDataMutable setObject:[NSArray arrayWithObject:key]
|
|
|
|
forKey:GSWKey_IsmapCoords[GSWebNamingConv]];
|
|
|
|
[tmpFormDataMutable removeObjectForKey:key];
|
|
|
|
tmpFormData=[NSDictionary dictionaryWithDictionary:tmpFormDataMutable];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
NSDebugMLLog(@"requests",@"tmpFormData=%@",tmpFormData);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return tmpFormData;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSStringEncoding)_formValueEncodingFromFormData:(NSData*)aFormData
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
return NSISOLatin1StringEncoding; //TODO
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSData*)_formData
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
NSData* data=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"requests",@"method=%@",_method);
|
|
|
|
NSDebugMLLog(@"requests",@"content=%@",_content);
|
|
|
|
if ([_method isEqualToString:GSWHTTPHeader_MethodGet])
|
|
|
|
{
|
|
|
|
NSString* urlQueryString=[self _urlQueryString];
|
|
|
|
data=[urlQueryString dataUsingEncoding:NSISOLatin1StringEncoding];//??
|
|
|
|
NSDebugMLLog(@"requests",@"data=%@",data);
|
|
|
|
}
|
|
|
|
else if ([_method isEqualToString:GSWHTTPHeader_MethodPost])
|
|
|
|
{
|
|
|
|
data=_content;
|
|
|
|
NSDebugMLLog(@"requests",@"data=%@",data);
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return data;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)_contentType
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* contentType=nil;
|
|
|
|
NSRange range;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
contentType=[self headerForKey:GSWHTTPHeader_ContentType];
|
|
|
|
NSDebugMLLog(@"requests",@"contentType=%@",contentType);
|
2000-01-22 12:49:49 +00:00
|
|
|
//We can get something like
|
|
|
|
// multipart/form-data; boundary=---------------------------1810101926251
|
|
|
|
// In this case, return only multipart/form-data
|
2002-07-27 23:48:47 +00:00
|
|
|
if (contentType)
|
2001-10-25 Manuel Guesdon <mguesdon@orange-concept.com>
Applied patch from Turbocat (www.turbocat.de): GSWPatch_04-JUL_2001.diff
except GSWeb.framework/GSWInput.m/.h one (have to verify coherence of it)
* GSWAdaptors/common/GSWApp.c/.h: Added GSWAppInfo
* GSWAdaptors/common/GSWAppConnectNSSocket.c: Changes on includes
* GSWAdaptors/common/GSWLoadBalancing.h: Added parameter to GSWLoadBalancing_Find*
* GSWAdaptors/common/GSWLoadBalancing.c: added p_pURLComponents parameter,
o management of AppInfo
* GSWAdaptors/common/GSWAppRequest.c: managing refused connections
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.gswd: misspelling correction
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.html: Various Changes
* GSWExtensions.framework/GSWStatsPage.m: changes in login/password validation
o -awake added
* GSWeb.framework/GSWApplication.m/.h: Manage refusing new sessions
* GSWeb.framework/GSWBundle.m: debug traces commented
* GSWeb.framework/GSWComponent.m: implementation of ensureAwakeInContext:
* GSWeb.framework/GSWAssociation.m: special case for returned value of type GSMutableArray (Why ?)
* GSWeb.framework/GSWComponentRequestHandler.m: comments added
* GSWeb.framework/GSWDefaultAdaptorThread.m: added debug traces
* GSWeb.framework/GSWDirectActionRequestHandler.m: replaced GSWDirectAction by DirectAction
* GSWeb.framework/GSWDisplayGroup.m: initialize _baseIndex,
o correct misspelled names,
o added -description,
o use delegate in _changedInEditingContext:, _invalidatedAllObjectsInStore:,
o changes in -deleteObjectAtIndex:,
* GSWeb.framework/GSWFileUpload.m: different handling of _fileDatasCount,
handle bug in omniweb-browser
* GSWeb.framework/GSWHyperlink.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWImageButton.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWPopUpButton.m:
o use [response_ appendContentString:_noSelectionStringValue] instead of
[response_ appendContentHTMLString:_noSelectionStringValue]
o handle no displayString case
o use [response_ appendContentString:_displayStringValue] instead of
[response_ appendContentHTMLString:_displayStringValue]
* GSWeb.framework/GSWConfig.h: set GSWOPTVALUE_AutoOpenInBrowser to NO
* GSWeb.framework/GSWElementIDString.m: comment some debug traces
* GSWeb.framework/GSWHTMLStaticGroup.m/.h: added support of documentType
* GSWeb.framework/GSWHTMLURLValuedElement.m: addeded debug trace
* GSWeb.framework/GSWKeyValueAssociation.m: use NSStringFromClass([retValue class])
instead of [retValue class] for log
* GSWeb.framework/GSWRequest.m/.h: added -(NSDictionary*)headers;
o added test on _contentType in _contentType
o autorelease _dict in -uriElements
* GSWeb.framework/GSWResponse.m/.h: added -setHeaders: and -headers
o Added GSWResponse (GSWResponseRefused)
o return self in -generateResponse
* GSWeb.framework/GSWServerSessionStore.m/.h: added @interface GSWServerSessionStore (GSWServerSessionStoreInfo)
o added refusing session management
* GSWeb.framework/GSWSession.m:
o in -terminate forces to call removeSessionWithID in GSWServerSessionStore to dealloc it
* GSWeb.framework/GSWSessionTimeOutManager.m/.h: replace NSMutableOrderedArray* sessionOrderedTimeOuts;
by NSMutableArray* sessionOrderedTimeOuts;
o added traces
o added GSWSessionTimeOutManager (GSWSessionRefused)
* GSWeb.framework/GSWSubmitButton.m: raise exception if no element is returned
* GSWeb.framework/GSWTemplateParser.m: added doctype management
* GSWeb.framework/GSWUtils.h: added if defined for __NetBSD__
* GSWeb.framework/GSWWOCompatibility.m/.h: added WOGenericContainer, WOImageButton, WOHyperlink
* GSWeb.framework/attach.m: added if defined for __NetBSD__
* GSWeb.framework/stacktrace.m: added if defined for __NetBSD__
* GSWeb.framework/GSWTemplateParserXML.m: traces commented
o test XML node content before adding it
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m
o changes in -getIVarNamed: and in setIVarNamed:withValue: (use of sel+imp, tests on parameters)
* GSWAdaptors/common/GSWHTTPResponse.c: change in GSWHTTPResponse_GetResponse()
o debug traces removed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@11251 72102866-910b-0410-8b05-ffd578937521
2001-10-26 08:50:52 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
range=[contentType rangeOfString:@";"];
|
|
|
|
if (range.length>0)
|
2001-10-25 Manuel Guesdon <mguesdon@orange-concept.com>
Applied patch from Turbocat (www.turbocat.de): GSWPatch_04-JUL_2001.diff
except GSWeb.framework/GSWInput.m/.h one (have to verify coherence of it)
* GSWAdaptors/common/GSWApp.c/.h: Added GSWAppInfo
* GSWAdaptors/common/GSWAppConnectNSSocket.c: Changes on includes
* GSWAdaptors/common/GSWLoadBalancing.h: Added parameter to GSWLoadBalancing_Find*
* GSWAdaptors/common/GSWLoadBalancing.c: added p_pURLComponents parameter,
o management of AppInfo
* GSWAdaptors/common/GSWAppRequest.c: managing refused connections
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.gswd: misspelling correction
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.html: Various Changes
* GSWExtensions.framework/GSWStatsPage.m: changes in login/password validation
o -awake added
* GSWeb.framework/GSWApplication.m/.h: Manage refusing new sessions
* GSWeb.framework/GSWBundle.m: debug traces commented
* GSWeb.framework/GSWComponent.m: implementation of ensureAwakeInContext:
* GSWeb.framework/GSWAssociation.m: special case for returned value of type GSMutableArray (Why ?)
* GSWeb.framework/GSWComponentRequestHandler.m: comments added
* GSWeb.framework/GSWDefaultAdaptorThread.m: added debug traces
* GSWeb.framework/GSWDirectActionRequestHandler.m: replaced GSWDirectAction by DirectAction
* GSWeb.framework/GSWDisplayGroup.m: initialize _baseIndex,
o correct misspelled names,
o added -description,
o use delegate in _changedInEditingContext:, _invalidatedAllObjectsInStore:,
o changes in -deleteObjectAtIndex:,
* GSWeb.framework/GSWFileUpload.m: different handling of _fileDatasCount,
handle bug in omniweb-browser
* GSWeb.framework/GSWHyperlink.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWImageButton.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWPopUpButton.m:
o use [response_ appendContentString:_noSelectionStringValue] instead of
[response_ appendContentHTMLString:_noSelectionStringValue]
o handle no displayString case
o use [response_ appendContentString:_displayStringValue] instead of
[response_ appendContentHTMLString:_displayStringValue]
* GSWeb.framework/GSWConfig.h: set GSWOPTVALUE_AutoOpenInBrowser to NO
* GSWeb.framework/GSWElementIDString.m: comment some debug traces
* GSWeb.framework/GSWHTMLStaticGroup.m/.h: added support of documentType
* GSWeb.framework/GSWHTMLURLValuedElement.m: addeded debug trace
* GSWeb.framework/GSWKeyValueAssociation.m: use NSStringFromClass([retValue class])
instead of [retValue class] for log
* GSWeb.framework/GSWRequest.m/.h: added -(NSDictionary*)headers;
o added test on _contentType in _contentType
o autorelease _dict in -uriElements
* GSWeb.framework/GSWResponse.m/.h: added -setHeaders: and -headers
o Added GSWResponse (GSWResponseRefused)
o return self in -generateResponse
* GSWeb.framework/GSWServerSessionStore.m/.h: added @interface GSWServerSessionStore (GSWServerSessionStoreInfo)
o added refusing session management
* GSWeb.framework/GSWSession.m:
o in -terminate forces to call removeSessionWithID in GSWServerSessionStore to dealloc it
* GSWeb.framework/GSWSessionTimeOutManager.m/.h: replace NSMutableOrderedArray* sessionOrderedTimeOuts;
by NSMutableArray* sessionOrderedTimeOuts;
o added traces
o added GSWSessionTimeOutManager (GSWSessionRefused)
* GSWeb.framework/GSWSubmitButton.m: raise exception if no element is returned
* GSWeb.framework/GSWTemplateParser.m: added doctype management
* GSWeb.framework/GSWUtils.h: added if defined for __NetBSD__
* GSWeb.framework/GSWWOCompatibility.m/.h: added WOGenericContainer, WOImageButton, WOHyperlink
* GSWeb.framework/attach.m: added if defined for __NetBSD__
* GSWeb.framework/stacktrace.m: added if defined for __NetBSD__
* GSWeb.framework/GSWTemplateParserXML.m: traces commented
o test XML node content before adding it
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m
o changes in -getIVarNamed: and in setIVarNamed:withValue: (use of sel+imp, tests on parameters)
* GSWAdaptors/common/GSWHTTPResponse.c: change in GSWHTTPResponse_GetResponse()
o debug traces removed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@11251 72102866-910b-0410-8b05-ffd578937521
2001-10-26 08:50:52 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
contentType=[contentType substringToIndex:range.location];
|
|
|
|
NSDebugMLLog(@"requests",@"contentType=%@",contentType);
|
2001-10-25 Manuel Guesdon <mguesdon@orange-concept.com>
Applied patch from Turbocat (www.turbocat.de): GSWPatch_04-JUL_2001.diff
except GSWeb.framework/GSWInput.m/.h one (have to verify coherence of it)
* GSWAdaptors/common/GSWApp.c/.h: Added GSWAppInfo
* GSWAdaptors/common/GSWAppConnectNSSocket.c: Changes on includes
* GSWAdaptors/common/GSWLoadBalancing.h: Added parameter to GSWLoadBalancing_Find*
* GSWAdaptors/common/GSWLoadBalancing.c: added p_pURLComponents parameter,
o management of AppInfo
* GSWAdaptors/common/GSWAppRequest.c: managing refused connections
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.gswd: misspelling correction
* GSWExtensions.framework/GSWStatsPage.gswc/GSWStatsPage.html: Various Changes
* GSWExtensions.framework/GSWStatsPage.m: changes in login/password validation
o -awake added
* GSWeb.framework/GSWApplication.m/.h: Manage refusing new sessions
* GSWeb.framework/GSWBundle.m: debug traces commented
* GSWeb.framework/GSWComponent.m: implementation of ensureAwakeInContext:
* GSWeb.framework/GSWAssociation.m: special case for returned value of type GSMutableArray (Why ?)
* GSWeb.framework/GSWComponentRequestHandler.m: comments added
* GSWeb.framework/GSWDefaultAdaptorThread.m: added debug traces
* GSWeb.framework/GSWDirectActionRequestHandler.m: replaced GSWDirectAction by DirectAction
* GSWeb.framework/GSWDisplayGroup.m: initialize _baseIndex,
o correct misspelled names,
o added -description,
o use delegate in _changedInEditingContext:, _invalidatedAllObjectsInStore:,
o changes in -deleteObjectAtIndex:,
* GSWeb.framework/GSWFileUpload.m: different handling of _fileDatasCount,
handle bug in omniweb-browser
* GSWeb.framework/GSWHyperlink.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWImageButton.m: added ensureAwakeInContext: call
* GSWeb.framework/GSWPopUpButton.m:
o use [response_ appendContentString:_noSelectionStringValue] instead of
[response_ appendContentHTMLString:_noSelectionStringValue]
o handle no displayString case
o use [response_ appendContentString:_displayStringValue] instead of
[response_ appendContentHTMLString:_displayStringValue]
* GSWeb.framework/GSWConfig.h: set GSWOPTVALUE_AutoOpenInBrowser to NO
* GSWeb.framework/GSWElementIDString.m: comment some debug traces
* GSWeb.framework/GSWHTMLStaticGroup.m/.h: added support of documentType
* GSWeb.framework/GSWHTMLURLValuedElement.m: addeded debug trace
* GSWeb.framework/GSWKeyValueAssociation.m: use NSStringFromClass([retValue class])
instead of [retValue class] for log
* GSWeb.framework/GSWRequest.m/.h: added -(NSDictionary*)headers;
o added test on _contentType in _contentType
o autorelease _dict in -uriElements
* GSWeb.framework/GSWResponse.m/.h: added -setHeaders: and -headers
o Added GSWResponse (GSWResponseRefused)
o return self in -generateResponse
* GSWeb.framework/GSWServerSessionStore.m/.h: added @interface GSWServerSessionStore (GSWServerSessionStoreInfo)
o added refusing session management
* GSWeb.framework/GSWSession.m:
o in -terminate forces to call removeSessionWithID in GSWServerSessionStore to dealloc it
* GSWeb.framework/GSWSessionTimeOutManager.m/.h: replace NSMutableOrderedArray* sessionOrderedTimeOuts;
by NSMutableArray* sessionOrderedTimeOuts;
o added traces
o added GSWSessionTimeOutManager (GSWSessionRefused)
* GSWeb.framework/GSWSubmitButton.m: raise exception if no element is returned
* GSWeb.framework/GSWTemplateParser.m: added doctype management
* GSWeb.framework/GSWUtils.h: added if defined for __NetBSD__
* GSWeb.framework/GSWWOCompatibility.m/.h: added WOGenericContainer, WOImageButton, WOHyperlink
* GSWeb.framework/attach.m: added if defined for __NetBSD__
* GSWeb.framework/stacktrace.m: added if defined for __NetBSD__
* GSWeb.framework/GSWTemplateParserXML.m: traces commented
o test XML node content before adding it
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m
o changes in -getIVarNamed: and in setIVarNamed:withValue: (use of sel+imp, tests on parameters)
* GSWAdaptors/common/GSWHTTPResponse.c: change in GSWHTTPResponse_GetResponse()
o debug traces removed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@11251 72102866-910b-0410-8b05-ffd578937521
2001-10-26 08:50:52 +00:00
|
|
|
};
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return contentType;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)_urlQueryString
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* urlQueryString=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"requests",@"uri=%@",_uri);
|
|
|
|
NSDebugMLLog(@"requests",@"uri class=%@",[_uri class]);
|
|
|
|
urlQueryString=[_uri urlQueryString];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return urlQueryString;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestF)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_isUsingWebServer
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
return _isUsingWebServer;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(void)_setIsUsingWebServer:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
_isUsingWebServer=flag;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestG)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_isSessionIDinRequest
|
|
|
|
{
|
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
|
|
|
id ID=nil;
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDictionary* uriElements=[self uriElements];
|
|
|
|
ID=[uriElements objectForKey:GSWKey_SessionID[GSWebNamingConv]];
|
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
|
|
|
if (!ID)
|
2002-07-27 23:48:47 +00:00
|
|
|
ID=[uriElements objectForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
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
|
|
|
return (ID!=nil);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_isSessionIDinCookies
|
|
|
|
{
|
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
|
|
|
id ID=nil;
|
|
|
|
ID=[self cookieValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
|
|
|
if (!ID)
|
|
|
|
ID=[self cookieValueForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
|
|
|
return (ID!=nil);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_isSessionIDinFormValues
|
|
|
|
{
|
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
|
|
|
id ID=nil;
|
|
|
|
ID=[self formValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
|
|
|
if (!ID)
|
|
|
|
ID=[self formValueForKey:GSWKey_SessionID[GSWebNamingConvInversed]];
|
|
|
|
return (ID!=nil);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)_completeURLWithRequestHandlerKey:(NSString*)key
|
|
|
|
path:(NSString*)path
|
|
|
|
queryString:(NSString*)queryString
|
|
|
|
isSecure:(BOOL)isSecure
|
|
|
|
port:(int)port
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(GSWDynamicURLString*)_urlWithRequestHandlerKey:(NSString*)key
|
|
|
|
path:(NSString*)path
|
|
|
|
queryString:(NSString*)queryString
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWDynamicURLString* url=[self _applicationURLPrefix];
|
|
|
|
[url setURLRequestHandlerKey:key];
|
|
|
|
[url setURLRequestHandlerPath:path];
|
|
|
|
[url setURLQueryString:queryString];
|
|
|
|
return url;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(GSWDynamicURLString*)_applicationURLPrefix
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
GSWDynamicURLString* applicationURLPrefix=[[_uri copy] autorelease];
|
|
|
|
[applicationURLPrefix setURLRequestHandlerKey:nil];
|
|
|
|
[applicationURLPrefix setURLRequestHandlerPath:nil];
|
|
|
|
[applicationURLPrefix setURLQueryString:nil];
|
|
|
|
return applicationURLPrefix;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSDictionary*)_formValues
|
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
2003-01-19 15:33:07 +00:00
|
|
|
if (!_formValues || !_finishedParsingMultipartFormData)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
|
|
|
NSString* contentType=[self _contentType];
|
|
|
|
if (!contentType || [contentType isEqualToString:GSWHTTPHeader_FormURLEncoded])
|
|
|
|
{
|
|
|
|
[self _getFormValuesFromURLEncoding];
|
|
|
|
}
|
|
|
|
else if ([contentType isEqualToString:GSWHTTPHeader_MultipartFormData])
|
|
|
|
{
|
|
|
|
[self _getFormValuesFromMultipartFormData];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NSDebugMLLog(@"requests",@"contentType=%@",contentType);
|
|
|
|
};
|
|
|
|
NSDebugMLLog(@"requests",@"formValues=%@",_formValues);
|
2003-01-19 15:33:07 +00:00
|
|
|
_finishedParsingMultipartFormData=YES;
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return _formValues;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_getFormValuesFromURLEncoding
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
NSData* formData=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
formData=[self _formData];
|
|
|
|
NSDebugMLLog(@"requests",@"formData=%@",formData);
|
|
|
|
if (formData)
|
|
|
|
{
|
|
|
|
NSStringEncoding formValueEncoding=[self _formValueEncodingFromFormData:formData];
|
|
|
|
NSDictionary* formValues=nil;
|
|
|
|
NSDebugMLLog(@"requests",@"formValueEncoding=%d",(int)formValueEncoding);
|
|
|
|
formValues=[self _extractValuesFromFormData:formData
|
|
|
|
withEncoding:formValueEncoding];
|
|
|
|
ASSIGN(_formValues,formValues);
|
|
|
|
NSDebugMLLog(@"requests",@"formValues=%@",_formValues);
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
+(BOOL)_lookForIDsInCookiesFirst
|
|
|
|
{
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)_hasFormValues
|
|
|
|
{
|
|
|
|
//OK
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDictionary* formValues=[self _formValues];
|
|
|
|
return [formValues count]>0;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestH)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2003-01-19 15:33:07 +00:00
|
|
|
-(void)_getFormValuesFromMultipartFormDataOld
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSMutableDictionary* formValues=nil;
|
|
|
|
NSArray* contentTypes=nil;
|
|
|
|
int contentTypeIndex=0;
|
|
|
|
int contentTypeCount=0;
|
|
|
|
NSString* contentType=nil;
|
|
|
|
NSData* tmpContentData=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
formValues=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
|
|
|
contentTypes=[self headersForKey:GSWHTTPHeader_ContentType];
|
|
|
|
contentTypeIndex=0;
|
|
|
|
contentTypeCount=[contentTypes count];
|
|
|
|
NSDebugMLLog(@"requests",@"contentTypes=%@",contentTypes);
|
|
|
|
tmpContentData=[self content];
|
2000-08-25 10:36:16 +00:00
|
|
|
NS_DURING
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
for(contentTypeIndex=0;contentTypeIndex<contentTypeCount;contentTypeIndex++)
|
|
|
|
{
|
|
|
|
NSDictionary* parsedContentType=nil;
|
|
|
|
NSString* boundaryString=nil;
|
|
|
|
NSArray* decodedParts=nil;
|
|
|
|
int decodedPartIndex=0;
|
|
|
|
int decodedPartCount=0;
|
|
|
|
|
|
|
|
// get "multipart/form-data; boundary=---------------------------1810101926251"
|
|
|
|
contentType=[contentTypes objectAtIndex:contentTypeIndex];
|
|
|
|
NSDebugMLLog(@"requests",@"contentType=%@",contentType);
|
|
|
|
// convert it into
|
|
|
|
// {
|
|
|
|
// boundary = "---------------------------1810101926251";
|
|
|
|
// "multipart/form-data" = "multipart/form-data";
|
|
|
|
// }
|
|
|
|
parsedContentType=[self _parseOneHeader:contentType];
|
|
|
|
NSDebugMLLog(@"requests",@"parsedContentType=%@",parsedContentType);
|
|
|
|
boundaryString=[parsedContentType objectForKey:@"boundary"];
|
|
|
|
NSDebugMLLog(@"requests",@"boundaryString=%@",boundaryString);
|
|
|
|
NSAssert1(boundaryString,@"No boundary in %@",parsedContentType);
|
|
|
|
NSDebugMLLog(@"requests",@"tmpContentData=%@",tmpContentData);
|
|
|
|
decodedParts=[self _decodeMultipartBody:tmpContentData
|
|
|
|
boundary:boundaryString];
|
|
|
|
NSDebugMLLog(@"requests",@"decodedParts=%@",decodedParts);
|
|
|
|
decodedPartIndex=0;
|
|
|
|
decodedPartCount=[decodedParts count];
|
|
|
|
for(decodedPartIndex=0;decodedPartIndex<decodedPartCount;decodedPartIndex++)
|
|
|
|
{
|
|
|
|
NSData* decodedPart=nil;
|
|
|
|
NSArray* parsedParts=nil;
|
|
|
|
int parsedPartsCount=0;
|
|
|
|
|
|
|
|
decodedPart=[decodedParts objectAtIndex:decodedPartIndex];
|
|
|
|
NSDebugMLLog(@"requests",@"decodedPart=%@",decodedPart);
|
|
|
|
parsedParts=[self _parseData:decodedPart];
|
|
|
|
NSDebugMLLog(@"requests",@"parsedParts=%@",parsedParts);
|
|
|
|
//return :
|
|
|
|
// (
|
|
|
|
// {
|
|
|
|
// "content-disposition" = "form-data; name=\"9.1\"; filename=\"C:\\TEMP\\zahn.txt\"";
|
|
|
|
// "content-type" = text/plain;
|
|
|
|
// },
|
|
|
|
// <41514541 41415177 4d444179 666f3054 6c4e2b58 58684357 69314b50 51635159 73573677 426d336f 52617247 36584633 4c7a6455 5637664e 39654b6b 764b4a43 71715059 67417250 59374863 78397944 36506b66 774a7550 465a4141 2f303463 446c5072 48525670 537a4135 67664738 62364572 44314158 372b7067 734c5075 304b4d77 0d0a0d0a >
|
|
|
|
// )
|
|
|
|
parsedPartsCount=[parsedParts count];
|
|
|
|
if (parsedPartsCount==0)
|
|
|
|
{
|
|
|
|
LOGError(@"parsedPartsCount==0 decodedPart=%@",decodedPart);
|
|
|
|
//TODO error
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NSDictionary* partInfo=nil;
|
|
|
|
NSString* parsedPartsContentType=nil;
|
|
|
|
NSString* parsedPartsContentDisposition=nil;
|
|
|
|
NSDictionary* parsedContentDispositionOfParsedPart=nil;
|
|
|
|
NSEnumerator* anEnumerator=nil;
|
|
|
|
NSString* aName=nil;
|
|
|
|
NSString* dscrKey=nil;
|
|
|
|
id descrValue=nil;
|
|
|
|
|
|
|
|
partInfo=[parsedParts objectAtIndex:0];
|
|
|
|
|
|
|
|
NSDebugMLLog(@"requests",@"partInfo=%@",
|
|
|
|
partInfo);
|
|
|
|
NSAssert1([partInfo isKindOfClass:[NSDictionary class]],
|
|
|
|
@"partInfo %@ is not a dictionary",partInfo);
|
|
|
|
|
|
|
|
parsedPartsContentType=[[partInfo objectForKey:GSWHTTPHeader_ContentType] lowercaseString];
|
|
|
|
NSDebugMLLog(@"requests",@"parsedPartsContentType=%@",
|
|
|
|
parsedPartsContentType);
|
|
|
|
parsedPartsContentDisposition=[partInfo objectForKey:@"content-disposition"];
|
|
|
|
NSDebugMLLog(@"requests",@"parsedPartsContentDisposition=%@",
|
|
|
|
parsedPartsContentDisposition);
|
|
|
|
//Convert: "form-data; name=\"9.1\"; filename=\"C:\\TEMP\\zahn.txt\"";
|
|
|
|
// into: {filename = "C:\\TEMP\\zahn.txt"; "form-data" = "form-data"; name = 9.1; }
|
|
|
|
parsedContentDispositionOfParsedPart=[self _parseOneHeader:parsedPartsContentDisposition];
|
|
|
|
NSDebugMLLog(@"requests",@"parsedContentDispositionOfParsedPart=%@",
|
|
|
|
parsedContentDispositionOfParsedPart);
|
|
|
|
anEnumerator=[parsedContentDispositionOfParsedPart keyEnumerator];
|
|
|
|
aName=[parsedContentDispositionOfParsedPart objectForKey:@"name"];
|
|
|
|
NSDebugMLLog(@"requests",@"aName=%@",
|
|
|
|
aName);
|
|
|
|
if (!aName)
|
|
|
|
{
|
|
|
|
ExceptionRaise(@"GSWRequest",
|
|
|
|
@"GSWRequest: No name \n%@\n",
|
|
|
|
parsedContentDispositionOfParsedPart);
|
|
|
|
};
|
|
|
|
while((dscrKey=[anEnumerator nextObject]))
|
|
|
|
{
|
|
|
|
NSDebugMLLog(@"requests",@"dscrKey=%@",dscrKey);
|
|
|
|
if (![dscrKey isEqualToString:@"name"]
|
|
|
|
&& ![dscrKey isEqualToString:@"form-data"])
|
|
|
|
{
|
|
|
|
NSString* _key=nil;
|
|
|
|
descrValue=[parsedContentDispositionOfParsedPart objectForKey:dscrKey];
|
|
|
|
NSDebugMLLog(@"requests",@"descrValue=%@",descrValue);
|
|
|
|
_key=[NSString stringWithFormat:@"%@.%@",aName,dscrKey];
|
|
|
|
NSDebugMLLog(@"requests",@"_key=%@",_key);
|
2002-08-20 21:58:48 +00:00
|
|
|
//NSLog(@"getFormValues... _key=%@ descrValue=%@",_key,descrValue);
|
2002-07-27 23:48:47 +00:00
|
|
|
[formValues setObject:[NSArray arrayWithObject:descrValue]
|
|
|
|
forKey:_key];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (parsedPartsCount>1)
|
|
|
|
{
|
|
|
|
NSArray* values=[parsedParts subarrayWithRange:NSMakeRange(1,[parsedParts count]-1)];
|
|
|
|
NSMutableArray* valuesNew=[NSMutableArray array];
|
2002-08-20 21:58:48 +00:00
|
|
|
NSMutableArray* addedValues = nil;
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"requests",@"values=%@",
|
|
|
|
values);
|
|
|
|
NSDebugMLLog(@"requests",@"parsedPartsContentType=%@",
|
|
|
|
parsedPartsContentType);
|
|
|
|
if (!parsedPartsContentType
|
|
|
|
|| [parsedPartsContentType isEqualToString:GSWHTTPHeader_MimeType_TextPlain])
|
|
|
|
{
|
|
|
|
int valueIndex=0;
|
|
|
|
int valuesCount=[values count];
|
|
|
|
id value=nil;
|
|
|
|
for(valueIndex=0;valueIndex<valuesCount;valueIndex++)
|
|
|
|
{
|
|
|
|
value=[values objectAtIndex:valueIndex];
|
|
|
|
NSDebugMLLog(@"requests",@"value=%@",value);
|
|
|
|
value=[[[NSString alloc]initWithData:value
|
|
|
|
encoding:NSISOLatin1StringEncoding]autorelease];
|
|
|
|
[valuesNew addObject:value];
|
|
|
|
};
|
|
|
|
values=[NSArray arrayWithArray:valuesNew];
|
|
|
|
};
|
2002-08-20 21:58:48 +00:00
|
|
|
//NSLog(@"getFormValues 2... values=%@ key=%@",values,aName);
|
2003-01-19 15:33:07 +00:00
|
|
|
if ((addedValues = [formValues objectForKey:aName])) {
|
2002-08-20 21:58:48 +00:00
|
|
|
addedValues = [NSMutableArray arrayWithArray:addedValues];
|
|
|
|
[addedValues addObjectsFromArray:values];
|
|
|
|
[formValues setObject:addedValues
|
|
|
|
forKey:aName];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
[formValues setObject:values
|
|
|
|
forKey:aName];
|
2002-08-20 21:58:48 +00:00
|
|
|
}
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2000-08-25 10:36:16 +00:00
|
|
|
}
|
|
|
|
NS_HANDLER
|
|
|
|
{
|
|
|
|
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"GSWRequest in _getFormValuesFromMultipartFormData");
|
2002-07-27 23:48:47 +00:00
|
|
|
LOGException(@"%@ (%@) \ncontentTypes=%@\ntmpContentData=%@",
|
|
|
|
localException,
|
|
|
|
[localException reason],
|
|
|
|
contentTypes,
|
|
|
|
tmpContentData);
|
2000-08-25 10:36:16 +00:00
|
|
|
[localException raise];
|
|
|
|
};
|
|
|
|
NS_ENDHANDLER;
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"requests",@"formValues=%@",formValues);
|
|
|
|
ASSIGN(_formValues,formValues);
|
2000-01-22 12:49:49 +00:00
|
|
|
//
|
|
|
|
// {
|
|
|
|
// 9.1 = (
|
|
|
|
// <41514541 41415177 4d444179 666f3054 6c4e2b58 58684357 69314b50 51635159 73573677 426d336f 52617247 36584633 4c7a6455 5637664e 39654b6b 764b4a43 71715059 67417250 59374863 78397944 36506b66 774a7550 465a4141 2f303463 446c5072 48525670 537a4135 67664738 62364572 44314158 372b7067 734c5075 304b4d77 0d0a0d0a >
|
|
|
|
// );
|
|
|
|
// 9.1.filename = ("C:\\TEMP\\zahn.txt");
|
|
|
|
// 9.3 = (submit);
|
|
|
|
// }
|
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
-(void)_getFormValuesFromMultipartFormData
|
|
|
|
{
|
|
|
|
NSMutableDictionary* formValues=nil;
|
|
|
|
GSMimeParser* parser=nil;
|
|
|
|
id key=nil;
|
|
|
|
NSData* headersData=nil;
|
|
|
|
NSMutableString* headersString=[NSMutableString string];
|
|
|
|
NSDictionary* headers=nil;
|
|
|
|
NSEnumerator* enumerator=nil;
|
|
|
|
LOGObjectFnStart();
|
|
|
|
|
|
|
|
formValues=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
|
|
|
|
|
|
|
headers=[self headers];
|
|
|
|
enumerator=[headers keyEnumerator];
|
|
|
|
while((key=[enumerator nextObject]))
|
|
|
|
{
|
|
|
|
NSArray* value=[headers objectForKey:key];
|
|
|
|
int i=0;
|
|
|
|
int count=[value count];
|
|
|
|
for(i=0;i<count;i++)
|
|
|
|
[headersString appendFormat:@"%@: %@\n",
|
|
|
|
key,[value objectAtIndex:i]];
|
|
|
|
};
|
|
|
|
[headersString appendString:@"\n"];
|
2003-03-24 07:45:52 +00:00
|
|
|
NSDebugMLLog(@"requests",@"headersString=[\n%@\n]",headersString);
|
|
|
|
NSDebugMLLog(@"requests",@"content=[\n%@\n]",[[[NSString alloc]initWithData:_content
|
|
|
|
encoding:NSISOLatin1StringEncoding]autorelease]);
|
2003-01-19 15:33:07 +00:00
|
|
|
headersData=[headersString dataUsingEncoding:NSISOLatin1StringEncoding];
|
|
|
|
parser=[GSMimeParser mimeParser];
|
|
|
|
[parser parse:headersData];
|
2003-03-24 07:45:52 +00:00
|
|
|
[parser expectNoHeaders];
|
2003-01-19 15:33:07 +00:00
|
|
|
if ([parser parse:_content])
|
|
|
|
[parser parse:nil];
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"[parser isComplete]=%d",[parser isComplete]);
|
2003-01-19 15:33:07 +00:00
|
|
|
if ([parser isComplete] == NO)
|
|
|
|
{
|
|
|
|
//TODO
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
GSMimeDocument* document = [parser mimeDocument];
|
2003-03-03 08:47:29 +00:00
|
|
|
NSArray* content=nil;
|
|
|
|
NSString* contentSubtype=nil;
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"document=%@",document);
|
2003-03-03 08:47:29 +00:00
|
|
|
content=[document content];
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"contentType=%@",[document contentType]);
|
2003-03-03 08:47:29 +00:00
|
|
|
contentSubtype=[document contentSubtype];
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"contentSubtype=%@",contentSubtype);
|
2003-01-19 15:33:07 +00:00
|
|
|
|
2003-03-03 08:47:29 +00:00
|
|
|
if ([contentSubtype isEqual:@"form-data"])
|
2003-01-19 15:33:07 +00:00
|
|
|
{
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"contentID=%@",[document contentID]);
|
|
|
|
NSDebugMLLog(@"requests",@"[document allHeaders]=%@",[document allHeaders]);
|
|
|
|
NSDebugMLLog(@"requests",@"[document content]=%@",content);
|
|
|
|
NSDebugMLLog(@"requests",@"[document content] class=%@",[content class]);
|
2003-01-19 15:33:07 +00:00
|
|
|
|
|
|
|
if (![content isKindOfClass:[NSArray class]])
|
|
|
|
{
|
|
|
|
//TODO
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int i=0;
|
|
|
|
int count=[content count];
|
|
|
|
for(i=0;i<count;i++)
|
|
|
|
{
|
|
|
|
GSMimeDocument* aDoc=[content objectAtIndex:i];
|
|
|
|
GSMimeHeader* contentDispositionHeader=nil;
|
|
|
|
NSString* contentDispositionValue=nil;
|
|
|
|
NSDictionary* contentDispositionParams=nil;
|
|
|
|
id aDocContent=nil;
|
|
|
|
NSAssert2([aDoc isKindOfClass:[GSMimeDocument class]],
|
|
|
|
@"Document is not a GSMimeDocument but a %@:\n%@",
|
|
|
|
[aDoc class],aDoc);
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"aDoc=%@",aDoc);
|
2003-01-19 15:33:07 +00:00
|
|
|
aDocContent=[aDoc content];
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"aDocContent=%@",aDocContent);
|
|
|
|
NSDebugMLLog(@"requests",@"contentType=%@",[aDoc contentType]);
|
|
|
|
NSDebugMLLog(@"requests",@"contentSubtype=%@",[aDoc contentSubtype]);
|
|
|
|
NSDebugMLLog(@"requests",@"contentID=%@",[aDoc contentID]);
|
2003-01-19 15:33:07 +00:00
|
|
|
contentDispositionHeader=[aDoc headerNamed:@"content-disposition"];
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"contentDispositionHeader=%@",contentDispositionHeader);
|
2003-01-19 15:33:07 +00:00
|
|
|
contentDispositionValue=[contentDispositionHeader value];
|
|
|
|
contentDispositionParams=[contentDispositionHeader parameters];
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"contentDispositionValue=%@",contentDispositionValue);
|
|
|
|
NSDebugMLLog(@"requests",@"contentDispositionParams=%@",contentDispositionParams);
|
|
|
|
NSDebugMLLog(@"requests",@"aDoc allHeaders=%@",[aDoc allHeaders]);
|
|
|
|
NSDebugMLLog(@"requests",@"aDocContent class=%@",[aDocContent class]);
|
2003-01-19 15:33:07 +00:00
|
|
|
if ([contentDispositionValue isEqual:@"form-data"])
|
|
|
|
{
|
|
|
|
NSString* formDataName=[contentDispositionParams objectForKey:@"name"];
|
|
|
|
NSDebugMLLog(@"requests",@"formDataName=%@",
|
|
|
|
formDataName);
|
|
|
|
if (!formDataName)
|
|
|
|
{
|
|
|
|
ExceptionRaise(@"GSWRequest",
|
|
|
|
@"GSWRequest: No name \n%@\n",
|
|
|
|
aDoc);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NSString* paramName=nil;
|
|
|
|
NSEnumerator* paramNamesEnumerator=[contentDispositionParams keyEnumerator];
|
|
|
|
while((paramName=[paramNamesEnumerator nextObject]))
|
|
|
|
{
|
|
|
|
NSDebugMLLog(@"requests",@"paramName=%@",paramName);
|
|
|
|
if (![paramName isEqualToString:@"name"])
|
|
|
|
{
|
2003-03-21 14:32:57 +00:00
|
|
|
NSArray* previous=nil;
|
2003-01-19 15:33:07 +00:00
|
|
|
NSString* paramFormValueName=nil;
|
|
|
|
id paramValue=nil;
|
|
|
|
paramValue=[contentDispositionParams objectForKey:paramName];
|
|
|
|
NSDebugMLLog(@"requests",@"paramValue=%@",paramValue);
|
|
|
|
paramFormValueName=[NSString stringWithFormat:@"%@.%@",formDataName,paramName];
|
|
|
|
NSDebugMLLog(@"requests",@"paramFormValueName=%@",paramFormValueName);
|
2003-03-21 14:32:57 +00:00
|
|
|
previous=[formValues objectForKey:paramFormValueName];
|
|
|
|
if (previous)
|
|
|
|
[formValues setObject:[previous arrayByAddingObject:paramValue]
|
|
|
|
forKey:paramFormValueName];
|
|
|
|
else
|
|
|
|
[formValues setObject:[NSArray arrayWithObject:paramValue]
|
|
|
|
forKey:paramFormValueName];
|
2003-01-19 15:33:07 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
if (aDocContent)
|
|
|
|
{
|
2003-03-21 14:32:57 +00:00
|
|
|
NSArray* previous=[formValues objectForKey:formDataName];
|
|
|
|
if (previous)
|
|
|
|
[formValues setObject:[previous arrayByAddingObject:aDocContent]
|
|
|
|
forKey:formDataName];
|
|
|
|
else
|
|
|
|
[formValues setObject:[NSArray arrayWithObject:aDocContent]
|
|
|
|
forKey:formDataName];
|
2003-01-19 15:33:07 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
ASSIGN(_formValues,formValues);
|
2003-03-21 14:32:57 +00:00
|
|
|
NSDebugMLLog(@"requests",@"_formValues=%@",_formValues);
|
2003-01-19 15:33:07 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSArray*)_decodeMultipartBody:(NSData*)aBody
|
|
|
|
boundary:(NSString*)aBoundary
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSData* dataBoundary=nil;
|
|
|
|
NSString* boundaryString=nil;
|
|
|
|
NSArray* parts=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
int i=0;
|
|
|
|
NSData* tmpData=nil;
|
|
|
|
/* _CRLFSeparator=NO;
|
|
|
|
unsigned char* _CRLF[2]={ 0x0d, 0x0a };
|
|
|
|
unsigned char* _LF[2]={ 0x0a };
|
|
|
|
NSData* _CRLFData=[NSData dataWithBytes:_CRLF
|
|
|
|
length:2];
|
|
|
|
NSData* _LFData=[NSData dataWithBytes:_LF
|
|
|
|
length:1];
|
|
|
|
*/
|
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"requests",@"aBody=%@",aBody);
|
|
|
|
NSDebugMLLog(@"requests",@"aBoundary=%@",aBoundary);
|
|
|
|
boundaryString=[NSString stringWithFormat:@"--%@\r\n",aBoundary];//Add "--" and "\r\n"
|
|
|
|
NSDebugMLLog(@"requests",@"aBoundary=%@",aBoundary);
|
|
|
|
dataBoundary=[boundaryString dataUsingEncoding:NSISOLatin1StringEncoding];//TODO
|
|
|
|
NSDebugMLLog(@"requests",@"dataBoundary=%@",dataBoundary);
|
2000-01-22 12:49:49 +00:00
|
|
|
/* {
|
|
|
|
NSString* _dataString=nil;
|
|
|
|
_dataString=[[[NSString alloc]initWithData:_body
|
|
|
|
encoding:NSISOLatin1StringEncoding]autorelease];
|
|
|
|
NSDebugMLLog(@"requests",@"_bodyString=%@",_dataString);
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
NSDebugMLLog0(@"requests",@"componentsSeparatedByData");
|
2002-07-27 23:48:47 +00:00
|
|
|
parts=[aBody componentsSeparatedByData:dataBoundary];
|
|
|
|
NSDebugMLLog(@"requests",@"parts=%@",parts);
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
for(i=0;i<[parts count];i++)
|
|
|
|
{
|
|
|
|
tmpData=[parts objectAtIndex:i];
|
|
|
|
if ([tmpData length]<400)
|
|
|
|
{
|
|
|
|
NSString* _dataString=nil;
|
|
|
|
_dataString=[[[NSString alloc]initWithData:tmpData
|
|
|
|
encoding:NSISOLatin1StringEncoding]autorelease];
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLLog(@"requests",@"_tmpDataString=[\n%@\n]",_dataString);
|
2002-07-27 23:48:47 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NSDebugMLLog(@"requests",@"tmpData=%@",tmpData);
|
|
|
|
};
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
// The 1st part should be empty (or it's only a warning message...)
|
2002-07-27 23:48:47 +00:00
|
|
|
if ([parts count]>0)
|
|
|
|
{
|
|
|
|
parts=[parts subarrayWithRange:NSMakeRange(1,[parts count]-1)];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
// Now deleting last \r\n of each object
|
2002-07-27 23:48:47 +00:00
|
|
|
parts=[parts mutableCopy];
|
|
|
|
for(i=0;i<[parts count];i++)
|
|
|
|
{
|
|
|
|
tmpData=[parts objectAtIndex:i];
|
|
|
|
if (i==[parts count]-1)
|
|
|
|
{
|
|
|
|
//Delete the last \r\nseparator--\r\n
|
|
|
|
boundaryString=[NSString stringWithFormat:@"\r\n%@--\r\n",aBoundary];
|
|
|
|
NSDebugMLLog(@"requests",@"aBoundary=%@",aBoundary);
|
|
|
|
dataBoundary=[boundaryString dataUsingEncoding:NSISOLatin1StringEncoding];//TODO
|
|
|
|
NSDebugMLLog(@"requests",@"tmpData_=%@",tmpData);
|
|
|
|
tmpData=[tmpData dataByDeletingLastBytesCount:[dataBoundary length]];
|
|
|
|
NSDebugMLLog(@"requests",@"tmpData=%@",tmpData);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
tmpData=[tmpData dataByDeletingLastBytesCount:2];
|
|
|
|
};
|
|
|
|
[(NSMutableArray*)parts replaceObjectAtIndex:i
|
|
|
|
withObject:tmpData];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
for(i=0;i<[parts count];i++)
|
|
|
|
{
|
|
|
|
tmpData=[parts objectAtIndex:i];
|
|
|
|
if ([tmpData length]<400)
|
|
|
|
{
|
|
|
|
NSString* dataString=nil;
|
|
|
|
dataString=[[[NSString alloc]initWithData:tmpData
|
|
|
|
encoding:NSISOLatin1StringEncoding]autorelease];
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLLog(@"requests",@"tmpDataString=[\n%@\n]",dataString);
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NSDebugMLLog(@"requests",@"tmpData=%@",tmpData);
|
|
|
|
};
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return parts;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// Convert:
|
|
|
|
// <436f6e74 656e742d 44697370 6f736974 696f6e3a 20666f72 6d2d6461 74613b20 6e616d65 3d22392e 31223b20 66696c65 6e616d65 3d22433a 5c54454d 505c7a61 686e2e74 7874220d 0a436f6e 74656e74 2d547970 653a2074 6578742f 706c6169 6e0d0a0d 0a415145 41414151 774d4441 79666f30 546c4e2b 58586843 5769314b 50516351 59735736 77426d33 6f526172 47365846 334c7a64 55563766 4e39654b 6b764b4a 43717150 59674172 50593748 63783979 4436506b 66774a75 50465a41 412f3034 63446c50 72485256 70537a41 35676647 38623645 72443141 58372b70 67734c50 75304b4d 770d0a0d 0a>
|
|
|
|
// Into:
|
|
|
|
// (
|
|
|
|
// {
|
|
|
|
// "content-disposition" = "form-data; name=\"9.1\"; filename=\"C:\\TEMP\\zahn.txt\"";
|
|
|
|
// "content-type" = text/plain;
|
|
|
|
// },
|
|
|
|
// <41514541 41415177 4d444179 666f3054 6c4e2b58 58684357 69314b50 51635159 73573677 426d336f 52617247 36584633 4c7a6455 5637664e 39654b6b 764b4a43 71715059 67417250 59374863 78397944 36506b66 774a7550 465a4141 2f303463 446c5072 48525670 537a4135 67664738 62364572 44314158 372b7067 734c5075 304b4d77 0d0a0d0a >
|
|
|
|
// )
|
|
|
|
|
|
|
|
// convert:
|
|
|
|
// <436f6e74 656e742d 44697370 6f736974 696f6e3a 20666f72 6d2d6461 74613b20 6e616d65 3d22392e 33220d0a 0d0a7375 626d6974 >
|
|
|
|
// Into:
|
|
|
|
// (
|
|
|
|
// {
|
|
|
|
// "content-disposition" = "form-data; name=\"9.3\"";
|
|
|
|
// },
|
|
|
|
// <7375626d 6974>
|
|
|
|
// )
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSArray*)_parseData:(NSData*)aData
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSArray* parsedData=nil;
|
|
|
|
NSMutableDictionary* tmpHeaders=[NSMutableDictionary dictionary];
|
|
|
|
NSData* tmpData=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
if (aData)
|
|
|
|
{
|
|
|
|
unsigned int tmpDataLength=[aData length];
|
|
|
|
const unsigned char* bytes=(unsigned char*)[aData bytes];
|
|
|
|
BOOL tmpHeadersEnd=NO;
|
|
|
|
int start=0;
|
|
|
|
int i=0;
|
|
|
|
for(i=0;i<tmpDataLength-1 && !tmpHeadersEnd;i++) // -1 for \n
|
|
|
|
{
|
|
|
|
//Parse Headers
|
|
|
|
if (bytes[i]=='\r' && bytes[i+1]=='\n')
|
|
|
|
{
|
|
|
|
if (i-start==0)//Empty Line: End Of Headers
|
|
|
|
tmpHeadersEnd=YES;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NSRange range;
|
|
|
|
NSString* key=@"";
|
|
|
|
NSString* value=@"";
|
|
|
|
NSData* headerData=[aData subdataWithRange:NSMakeRange(start,i-start)];
|
|
|
|
NSString* tmpHeaderString=[[[NSString alloc]initWithData:headerData
|
|
|
|
encoding:NSISOLatin1StringEncoding]autorelease];
|
|
|
|
NSDebugMLLog(@"requests",@"i=%d",i);
|
|
|
|
NSDebugMLLog(@"requests",@"start=%d",start);
|
|
|
|
NSDebugMLLog(@"requests",@"headerData=%@",headerData);
|
|
|
|
NSDebugMLLog(@"requests",@"tmpHeaderString=%@",tmpHeaderString);
|
|
|
|
range=[tmpHeaderString rangeOfString:@": "];
|
|
|
|
if (range.length>0)
|
2002-06-03 08:27:15 +00:00
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
key=[tmpHeaderString substringToIndex:range.location];
|
|
|
|
key=[key lowercaseString];
|
|
|
|
if (range.location+1<[tmpHeaderString length])
|
|
|
|
{
|
|
|
|
value=[tmpHeaderString substringFromIndex:range.location+1];
|
|
|
|
value=[value stringByTrimmingSpaces];
|
|
|
|
};
|
2002-06-03 08:27:15 +00:00
|
|
|
};
|
2002-07-27 23:48:47 +00:00
|
|
|
[tmpHeaders setObject:value
|
|
|
|
forKey:key];
|
|
|
|
};
|
|
|
|
i++; //Pass the '\n'
|
|
|
|
start=i+1;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (!tmpHeadersEnd)
|
|
|
|
{
|
|
|
|
//TODO error
|
|
|
|
NSDebugMLog(@"Error");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NSDebugMLLog(@"requests",@"i=%d tmpDataLength=%d tmpDataLength-i=%d",
|
|
|
|
i,tmpDataLength,(tmpDataLength-i));
|
|
|
|
tmpData=[aData subdataWithRange:NSMakeRange(i,tmpDataLength-i)];
|
|
|
|
//I'm not sure this is good but it avoid 2 bytes datas on an empty input type=file located t the end of the request)
|
|
|
|
//It may be better to deal with this few lines up, around (tmpHeadersEnd=YES;)
|
|
|
|
|
|
|
|
if ([tmpData length]==2)
|
|
|
|
{
|
|
|
|
const unsigned char* bytes=(unsigned char*)[tmpData bytes];
|
|
|
|
if (bytes[0]=='\r' && bytes[1]=='\n')
|
|
|
|
tmpData=[NSData data];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
tmpHeaders=[NSDictionary dictionaryWithDictionary:tmpHeaders];
|
|
|
|
parsedData=[NSArray arrayWithObjects:tmpHeaders,tmpData,nil];
|
|
|
|
NSDebugMLLog(@"requests",@"tmpHeaders=%@",tmpHeaders);
|
|
|
|
NSDebugMLLog(@"requests",@"tmpData %p (length=%d)=%@",
|
|
|
|
tmpData,[tmpData length],tmpData);
|
|
|
|
NSDebugMLLog(@"requests",@"parsedData %p =%@",
|
|
|
|
parsedData,parsedData);
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return parsedData;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
- convert "multipart/form-data; boundary=---------------------------1810101926251"
|
|
|
|
into
|
|
|
|
{
|
|
|
|
boundary = "---------------------------1810101926251";
|
|
|
|
"multipart/form-data" = "multipart/form-data";
|
|
|
|
}
|
|
|
|
|
|
|
|
- convert form-data; name="9.1"; filename="C:\TEMP\zahn.txt"
|
|
|
|
into
|
|
|
|
{filename = "C:\\TEMP\\zahn.txt"; "form-data" = "form-data"; name = 9.1; }
|
|
|
|
|
|
|
|
- convert form-data; name="9.3"
|
|
|
|
into
|
|
|
|
{"form-data" = "form-data"; name = 9.3; }
|
|
|
|
*/
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
-(NSDictionary*)_parseOneHeader:(NSString*)aHeader
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//TODO Process quoted string !
|
2002-07-27 23:48:47 +00:00
|
|
|
NSMutableDictionary* parsedParts=nil;
|
|
|
|
NSArray* headerParts=nil;
|
|
|
|
int partIndex=0;
|
|
|
|
int partCount=0;
|
|
|
|
NSString* part=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDebugMLLog(@"requests",@"aHeader=%@",aHeader);
|
|
|
|
parsedParts=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
|
|
|
NSDebugMLLog(@"requests",@"parsedParts=%@",parsedParts);
|
|
|
|
headerParts=[aHeader componentsSeparatedByString:@";"];
|
|
|
|
NSDebugMLLog(@"requests",@"headerParts=%@",headerParts);
|
|
|
|
partCount=[headerParts count];
|
|
|
|
for(partIndex=0;partIndex<partCount;partIndex++)
|
|
|
|
{
|
|
|
|
NSArray* parsedPart=nil;
|
|
|
|
int parsedPartCount=0;
|
|
|
|
NSString* key=nil;
|
|
|
|
NSString* value=nil;
|
|
|
|
part=[headerParts objectAtIndex:partIndex];
|
|
|
|
NSDebugMLLog(@"requests",@"part=%@",part);
|
|
|
|
part=[part stringByTrimmingSpaces];
|
|
|
|
NSDebugMLLog(@"requests",@"part=%@",part);
|
|
|
|
parsedPart=[part componentsSeparatedByString:@"="];
|
|
|
|
NSDebugMLLog(@"requests",@"parsedPart=%@",parsedPart);
|
|
|
|
parsedPartCount=[parsedPart count];
|
|
|
|
switch(parsedPartCount)
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
key=[parsedPart objectAtIndex:0];
|
|
|
|
value=key;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
key=[parsedPart objectAtIndex:0];
|
|
|
|
value=[parsedPart objectAtIndex:1];
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
NSAssert1(NO,@"objects number != 1 or 2 in %@",parsedPart);
|
|
|
|
//TODO Error
|
|
|
|
break;
|
|
|
|
};
|
|
|
|
NSDebugMLLog(@"requests",@"key=%@",key);
|
|
|
|
NSDebugMLLog(@"requests",@"value=%@",value);
|
|
|
|
if (key && value)
|
|
|
|
{
|
|
|
|
if ([value isQuotedWith:@"\""])
|
|
|
|
value=[value stringWithoutQuote:@"\""];
|
|
|
|
[parsedParts setObject:value
|
|
|
|
forKey:key];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
NSDebugMLLog(@"requests",@"parsedParts=%@",parsedParts);
|
|
|
|
parsedParts=[NSDictionary dictionaryWithDictionary:parsedParts];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return parsedParts;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestI)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)nonNilFormValueForKey:(NSString*)key
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestJ)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)dictionaryWithKeys:(id)unknown
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)selectedButtonName
|
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)valueFromImageMapNamed:(NSString*)aName
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)valueFromImageMapNamed:(NSString*)aName
|
|
|
|
inFramework:(NSString*)aFramework
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)valueFromImageMap:(id)unknown
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)yCoord
|
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(id)xCoord
|
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-07-27 23:48:47 +00:00
|
|
|
-(id)formKeyWithSuffix:(NSString*)suffix
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestK)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// applicationHost
|
|
|
|
// nil if request can be handled by any instance
|
|
|
|
|
|
|
|
-(NSString*)applicationHost
|
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return nil;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// pageName
|
|
|
|
-(NSString*)pageName
|
|
|
|
{
|
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* pageName=nil;
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDictionary* uriElements=[self uriOrFormOrCookiesElements];
|
|
|
|
pageName=[uriElements objectForKey:GSWKey_PageName[GSWebNamingConv]];
|
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
|
|
|
if (!pageName)
|
2002-07-27 23:48:47 +00:00
|
|
|
pageName=[uriElements objectForKey:GSWKey_PageName[GSWebNamingConvInversed]];
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLLog(@"requests",@"request %p: pageName=%@",
|
|
|
|
self,pageName);
|
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
|
|
|
return pageName;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// senderID
|
|
|
|
-(NSString*)senderID
|
|
|
|
{
|
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* senderID=nil;
|
2002-07-27 23:48:47 +00:00
|
|
|
NSDictionary* uriElements=[self uriOrFormOrCookiesElements];
|
|
|
|
senderID=[uriElements objectForKey:GSWKey_ElementID[GSWebNamingConv]];
|
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
|
|
|
if (!senderID)
|
2002-07-27 23:48:47 +00:00
|
|
|
senderID=[uriElements objectForKey:GSWKey_ElementID[GSWebNamingConvInversed]];
|
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
|
|
|
return senderID;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// contextID
|
|
|
|
|
|
|
|
-(NSString*)contextID
|
|
|
|
{
|
2002-07-27 23:48:47 +00:00
|
|
|
NSString* contextID=nil;
|
|
|
|
NSDictionary* uriElements=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-07-27 23:48:47 +00:00
|
|
|
uriElements=[self uriOrFormOrCookiesElements];
|
|
|
|
contextID=[uriElements objectForKey:GSWKey_ContextID[GSWebNamingConv]];
|
|
|
|
if (!contextID)
|
|
|
|
contextID=[uriElements objectForKey:GSWKey_ContextID[GSWebNamingConvInversed]];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-07-27 23:48:47 +00:00
|
|
|
return contextID;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSDictionary*)uriOrFormOrCookiesElements
|
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
return [self uriOrFormOrCookiesElementsByLookingForCookieFirst:[[self class]_lookForIDsInCookiesFirst]];
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(id)uriOrFormOrCookiesElementForKey:(NSString*)key
|
|
|
|
byLookingForCookieFirst:(BOOL)lookCookieFirst
|
|
|
|
{
|
|
|
|
id element=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLLog(@"requests",@"request %p: key=%@",
|
|
|
|
self,key);
|
|
|
|
if (lookCookieFirst)
|
|
|
|
element=[self cookieValueForKey:key];
|
|
|
|
|
|
|
|
if (!element)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
element=[self uriElementForKey:key];
|
|
|
|
if (!element)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
element=[self formValueForKey:key];
|
|
|
|
if (!element && !lookCookieFirst)
|
|
|
|
element=[self cookieValueForKey:key];
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
|
|
|
};
|
2003-01-19 15:33:07 +00:00
|
|
|
NSDebugMLLog(@"requests",@"request %p: key=%@ element=%@",
|
|
|
|
self,key,element);
|
|
|
|
LOGObjectFnStop();
|
|
|
|
return element;
|
|
|
|
}
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSDictionary*)uriOrFormOrCookiesElementsByLookingForCookieFirst:(BOOL)lookCookieFirst
|
|
|
|
{
|
|
|
|
NSMutableDictionary* elements=nil;
|
|
|
|
NSString* tmpString=nil;
|
|
|
|
LOGObjectFnStart();
|
|
|
|
elements=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
|
|
|
|
|
|
|
//SessionID
|
|
|
|
tmpString=[self sessionIDFromValuesOrCookieByLookingForCookieFirst:lookCookieFirst];
|
|
|
|
if (tmpString)
|
|
|
|
[elements setObject:tmpString
|
|
|
|
forKey:GSWKey_SessionID[GSWebNamingConv]];
|
|
|
|
|
|
|
|
//PageName
|
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_PageName[GSWebNamingConv]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
|
|
|
if (!tmpString)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_PageName[GSWebNamingConvInversed]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2003-01-19 15:33:07 +00:00
|
|
|
if (tmpString)
|
|
|
|
[elements setObject:tmpString
|
|
|
|
forKey:GSWKey_PageName[GSWebNamingConv]];
|
|
|
|
|
|
|
|
//ContextID
|
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_ContextID[GSWebNamingConv]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
|
|
|
if (!tmpString)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_ContextID[GSWebNamingConvInversed]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2003-01-19 15:33:07 +00:00
|
|
|
if (tmpString)
|
|
|
|
[elements setObject:tmpString
|
|
|
|
forKey:GSWKey_ContextID[GSWebNamingConv]];
|
|
|
|
|
|
|
|
//ElementID
|
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_ElementID[GSWebNamingConv]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
|
|
|
if (!tmpString)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_ElementID[GSWebNamingConvInversed]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2003-01-19 15:33:07 +00:00
|
|
|
if (tmpString)
|
|
|
|
[elements setObject:tmpString
|
|
|
|
forKey:GSWKey_ElementID[GSWebNamingConv]];
|
|
|
|
|
|
|
|
//InstanceID
|
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_InstanceID[GSWebNamingConv]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
|
|
|
if (!tmpString)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_InstanceID[GSWebNamingConvInversed]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2003-01-19 15:33:07 +00:00
|
|
|
if (tmpString)
|
|
|
|
[elements setObject:tmpString
|
|
|
|
forKey:GSWKey_InstanceID[GSWebNamingConv]];
|
|
|
|
|
|
|
|
//DataID
|
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_Data[GSWebNamingConv]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
|
|
|
if (!tmpString)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
tmpString=[self uriOrFormOrCookiesElementForKey:GSWKey_Data[GSWebNamingConvInversed]
|
|
|
|
byLookingForCookieFirst:lookCookieFirst];
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
2003-01-19 15:33:07 +00:00
|
|
|
if (tmpString)
|
|
|
|
[elements setObject:tmpString
|
|
|
|
forKey:GSWKey_Data[GSWebNamingConv]];
|
|
|
|
|
|
|
|
NSDebugMLLog(@"requests",@"elements=%@",elements);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2003-01-19 15:33:07 +00:00
|
|
|
return elements;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
2003-01-19 15:33:07 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//--------------------------------------------------------------------
|
2003-01-19 15:33:07 +00:00
|
|
|
-(NSDictionary*)_uriElements
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
2003-01-19 15:33:07 +00:00
|
|
|
if (!_uriElements)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
NSMutableDictionary* dict=nil;
|
|
|
|
NSArray* requestHandlerPathArray=nil;
|
|
|
|
int index=0;
|
|
|
|
NSString* tmpString=nil;
|
|
|
|
NSString* gswpage=nil;
|
|
|
|
NSString* gswsid=nil;
|
|
|
|
NSString* gswcid=nil;
|
|
|
|
NSString* gsweid=nil;
|
|
|
|
NSString* gswinst=nil;
|
|
|
|
NSString* requestHandlerKey=nil;
|
|
|
|
int applicationNumber;
|
|
|
|
dict=[[NSMutableDictionary new] autorelease];
|
|
|
|
|
|
|
|
NSDebugMLLog(@"requests",@"request %@",self);
|
|
|
|
|
|
|
|
requestHandlerKey=[((GSWDynamicURLString*)[self uri]) urlRequestHandlerKey];
|
|
|
|
NSDebugMLLog(@"requests",@"request %p: requestHandlerKey=%@",
|
|
|
|
self,requestHandlerKey);
|
|
|
|
|
|
|
|
if (!requestHandlerKey
|
|
|
|
|| (![requestHandlerKey isEqualToString:GSWDirectActionRequestHandlerKey[GSWebNamingConv]]
|
|
|
|
&&![requestHandlerKey isEqualToString:GSWDirectActionRequestHandlerKey[GSWebNamingConvInversed]]))
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
requestHandlerPathArray=[self requestHandlerPathArray];
|
|
|
|
NSDebugMLLog(@"requests",@"request %p: requestHandlerPathArray=%@",
|
|
|
|
self,requestHandlerPathArray);
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
if ([requestHandlerPathArray count]>index)
|
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
tmpString=[requestHandlerPathArray objectAtIndex:index];
|
|
|
|
NSDebugMLLog(@"requests",@"rquest %p: tmpString=%@",
|
|
|
|
self,tmpString);
|
|
|
|
|
|
|
|
if ([tmpString hasSuffix:GSWPagePSuffix[GSWebNamingConv]])
|
|
|
|
{
|
|
|
|
gswpage=[tmpString stringByDeletingSuffix:GSWPagePSuffix[GSWebNamingConv]];
|
|
|
|
NSDebugMLLog(@"requests",@"request %p: gswpage=%@",
|
|
|
|
self,gswpage);
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
else if ([tmpString hasSuffix:GSWPagePSuffix[GSWebNamingConvInversed]])
|
|
|
|
{
|
|
|
|
gswpage=[tmpString stringByDeletingSuffix:GSWPagePSuffix[GSWebNamingConvInversed]];
|
|
|
|
NSDebugMLLog(@"requests",@"request %p: gswpage=%@",
|
|
|
|
self,gswpage);
|
|
|
|
index++;
|
|
|
|
};
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
if ([requestHandlerPathArray count]>index)
|
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
gswsid=[requestHandlerPathArray objectAtIndex:index];
|
|
|
|
NSDebugMLLog(@"requests",@"request %p: gswsid=%@",
|
|
|
|
self,gswsid);
|
2002-07-27 23:48:47 +00:00
|
|
|
index++;
|
2003-01-19 15:33:07 +00:00
|
|
|
|
|
|
|
if ([requestHandlerPathArray count]>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
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
NSString* senderID=[requestHandlerPathArray objectAtIndex:index];
|
|
|
|
NSDebugMLLog(@"requests",@"senderID=%@",senderID);
|
|
|
|
index++;
|
|
|
|
|
|
|
|
if (senderID && [senderID length]>0)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
NSArray* senderIDParts=[senderID componentsSeparatedByString:@"."];
|
|
|
|
NSDebugMLLog(@"requests",@"request %p: senderIDParts=%@",
|
|
|
|
self,senderIDParts);
|
|
|
|
|
|
|
|
if ([senderIDParts count]>0)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
tmpString=[senderIDParts objectAtIndex:0];
|
|
|
|
NSDebugMLLog(@"requests",@"request %p: tmpString=%@",
|
|
|
|
self,tmpString);
|
|
|
|
|
2002-07-27 23:48:47 +00:00
|
|
|
if (tmpString && [tmpString length]>0)
|
2003-01-19 15:33:07 +00:00
|
|
|
gswcid=tmpString;
|
|
|
|
|
|
|
|
if ([senderIDParts count]>1)
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2003-01-19 15:33:07 +00:00
|
|
|
tmpString=[[senderIDParts subarrayWithRange:
|
|
|
|
NSMakeRange(1,[senderIDParts count]-1)]
|
|
|
|
componentsJoinedByString:@"."];
|
|
|
|
NSDebugMLLog(@"requests",@"request %p: tmpString=%@",
|
|
|
|
self,tmpString);
|
|
|
|
|
|
|
|
if (tmpString && [tmpString length]>0)
|
|
|
|
{
|
|
|
|
gsweid=tmpString;
|
|
|
|
NSDebugMLLog(@"requests",@"request %p: gsweid=%@",
|
|
|
|
self,gsweid);
|
|
|
|
};
|
2002-07-27 23:48:47 +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
|
|
|
};
|
2002-07-27 23:48:47 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
if (gswpage)
|
|
|
|
[dict setObject:gswpage
|
|
|
|
forKey:GSWKey_PageName[GSWebNamingConv]];
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
if (gswsid)
|
|
|
|
[dict setObject:gswsid
|
|
|
|
forKey:GSWKey_SessionID[GSWebNamingConv]];
|
2002-07-27 23:48:47 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
if (gswcid)
|
|
|
|
[dict setObject:gswcid
|
|
|
|
forKey:GSWKey_ContextID[GSWebNamingConv]];
|
2002-07-27 23:48:47 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
if (gsweid)
|
|
|
|
[dict setObject:gsweid
|
|
|
|
forKey:GSWKey_ElementID[GSWebNamingConv]];
|
2002-07-27 23:48:47 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
applicationNumber=[_uri urlApplicationNumber];
|
|
|
|
if (applicationNumber<0)
|
|
|
|
{
|
|
|
|
NSString* tmpString2=[self cookieValueForKey:GSWKey_InstanceID[GSWebNamingConv]];
|
|
|
|
if (!tmpString2)
|
|
|
|
tmpString2=[self cookieValueForKey:GSWKey_InstanceID[GSWebNamingConvInversed]];
|
|
|
|
if (tmpString2)
|
|
|
|
applicationNumber=[gswinst intValue];
|
|
|
|
};
|
|
|
|
if (applicationNumber>=0)
|
|
|
|
[dict setObject:[NSString stringWithFormat:@"%d",applicationNumber]
|
|
|
|
forKey:GSWKey_InstanceID[GSWebNamingConv]];
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-01-19 15:33:07 +00:00
|
|
|
ASSIGN(_uriElements,[NSDictionary dictionaryWithDictionary:dict]);
|
|
|
|
NSDebugMLLog(@"requests",@"request %@: _uriElements=%@",
|
|
|
|
self,_uriElements);
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2003-01-19 15:33:07 +00:00
|
|
|
return _uriElements;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWRequest (GSWRequestL)
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_validateAPI
|
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
};
|
|
|
|
|
|
|
|
@end
|