2002-07-27 23:48:47 +00:00
/ * * GSWRequest . m - < title > GSWeb : Class GSWRequest < / title >
2004-05-14 12:00:56 +00:00
Copyright ( C ) 1999 -2004 Free Software Foundation , Inc .
2000-01-22 12:49:49 +00:00
2002-07-27 23:48:47 +00:00
Written by : Manuel Guesdon < mguesdon @ orange - concept . com >
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-08-25 20:15:32 +00:00
# include < GNUstepBase / GSMime . h >
2003-11-23 18:27:14 +00:00
# include "GSWInputStreamData.h"
2005-04-05 11:54:36 +00:00
# include "GSWPrivate.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 ;
2007-04-13 18:32:02 +00:00
2003-05-14 08:30:22 +00:00
valuesAndQualities = [ string componentsSeparatedByString : @ "," ] ;
count = [ valuesAndQualities count ] ;
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 ] ;
if ( [ [ qv value ] length ] > 0 )
[ qvs addObject : qv ] ;
} ;
count = [ qvs count ] ;
if ( count > 0 )
{
2004-04-22 12:08:29 +00:00
unsigned int i ;
2003-05-14 08:30:22 +00:00
// Sor oon quality desc
[ qvs sortUsingSelector : @ selector ( compareOnQualityDesc : ) ] ;
// Remove Duplicates
for ( i = 0 ; i < count ; i + + )
{
int j = 0 ;
2005-04-05 11:54:36 +00:00
GSWValueQualityHeaderPart * qv = [ qvs objectAtIndex : i ] ;
NSString * value = [ qv value ] ;
2003-05-14 08:30:22 +00:00
for ( j = i + 1 ; j < count ; j + + )
{
2005-04-05 11:54:36 +00:00
GSWValueQualityHeaderPart * qv2 = [ qvs objectAtIndex : j ] ;
NSString * value2 = [ qv2 value ] ;
2003-05-14 08:30:22 +00:00
if ( [ value2 isEqual : value ] )
{
[ qvs removeObjectAtIndex : j ] ;
count - - ;
} ;
} ;
} ;
// Finally keep only values
values = [ qvs valueForKey : @ "value" ] ;
} ;
} ;
2007-04-13 18:32:02 +00:00
2003-05-14 08:30:22 +00:00
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 ;
2004-04-22 12:08:29 +00:00
NSRange qualitySeparatorRange ;
2003-05-14 08:30:22 +00:00
string = [ string stringByTrimmingSpaces ] ;
2004-04-22 12:08:29 +00:00
qualitySeparatorRange = [ string rangeOfString : @ ";q=" ] ;
2003-05-14 08:30:22 +00:00
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
{
2007-11-25 16:49:37 +00:00
if ( ( self = [ super init ] ) ) {
NSString * adaptorVersion = nil ;
2007-04-13 18:32:02 +00:00
2007-11-25 16:49:37 +00:00
if ( ( ! aMethod ) || ( [ aMethod length ] = = 0 ) ) {
ExceptionRaise ( @ "GSWRequest" , @ "Empty/Null method during initialization" ) ;
}
if ( ( [ aMethod isEqualToString : @ "GET" ] = = NO ) && ( [ aMethod isEqualToString : @ "POST" ] = = NO ) &&
( [ aMethod isEqualToString : @ "HEAD" ] = = NO ) ) {
2003-11-23 18:27:14 +00:00
2007-11-25 16:49:37 +00:00
ExceptionRaise ( @ "GSWRequest" , @ "Method '%@' is not supported. To support '%@', you will have to implement a subclass of GSWRequest, and force GSWeb to instantiate it." , aMethod , aMethod ) ;
}
2003-11-23 18:27:14 +00:00
2007-11-25 16:49:37 +00:00
if ( ( ! anURL ) / * || ( [ anURL length ] = = 0 ) * / ) {
ExceptionRaise ( @ "GSWRequest" , @ "Empty/Null uri during initialization" ) ;
}
if ( ( ! aVersion ) || ( [ aVersion length ] = = 0 ) ) {
ExceptionRaise ( @ "GSWRequest" , @ "Empty/Null http version during initialization" ) ;
}
2003-11-23 18:27:14 +00:00
2007-11-25 16:49:37 +00:00
ASSIGNCOPY ( _method , aMethod ) ;
[ self setHTTPVersion : aVersion ] ;
[ self setHeaders : headers ] ;
_defaultFormValueEncoding = [ [ self class ] defaultEncoding ] ;
_applicationNumber = -9999 ;
adaptorVersion = [ self headerForKey : GSWHTTPHeader_AdaptorVersion [ GSWebNamingConv ] ] ;
if ( ! adaptorVersion ) {
adaptorVersion = [ self headerForKey : GSWHTTPHeader_AdaptorVersion [ GSWebNamingConvInversed ] ] ;
}
[ self _setIsUsingWebServer : ( adaptorVersion ! = nil ) ] ;
_uri = [ [ GSWDynamicURLString alloc ] initWithString : anURL ] ;
[ _uri checkURL ] ;
if ( ! content )
content = [ NSData data ] ;
[ self setContent : content ] ;
[ self setUserInfo : userInfo ] ;
}
2000-01-22 12:49:49 +00:00
return self ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) dealloc
{
2002-07-27 23:48:47 +00:00
DESTROY ( _method ) ;
DESTROY ( _uri ) ;
DESTROY ( _formValues ) ;
2003-01-19 15:33:07 +00:00
DESTROY ( _uriElements ) ;
2002-07-27 23:48:47 +00:00
DESTROY ( _cookie ) ;
DESTROY ( _applicationURLPrefix ) ;
DESTROY ( _requestHandlerPathArray ) ;
DESTROY ( _browserLanguages ) ;
2003-05-14 08:30:22 +00:00
DESTROY ( _browserAcceptedEncodings ) ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
[ super dealloc ] ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-07-27 23:48:47 +00:00
- ( id ) copyWithZone : ( NSZone * ) zone
2000-01-22 12:49:49 +00:00
{
2003-11-23 18:27:14 +00:00
GSWRequest * clone = ( GSWRequest * ) [ super copyWithZone : zone ] ;
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 ) ;
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
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
// method
// GET or PUT
2000-01-22 12:49:49 +00:00
2003-11-23 18:27:14 +00:00
- ( NSString * ) method
2000-01-22 12:49:49 +00:00
{
2003-11-23 18:27:14 +00:00
return _method ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
// uri
- ( NSString * ) uri
2000-01-22 12:49:49 +00:00
{
2003-11-23 18:27:14 +00:00
return ( NSString * ) _uri ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
// NDFN
- ( NSString * ) urlProtocol
2000-01-22 12:49:49 +00:00
{
2003-11-23 18:27:14 +00:00
NSString * urlProtocol = [ _uri urlProtocol ] ;
if ( ! urlProtocol )
{
urlProtocol = [ self headerForKey : GSWHTTPHeader_RequestScheme [ GSWebNamingConv ] ] ;
if ( ! urlProtocol )
{
urlProtocol = [ self headerForKey : GSWHTTPHeader_RequestScheme [ GSWebNamingConvInversed ] ] ;
if ( ! urlProtocol )
urlProtocol = GSWProtocol_HTTP ;
} ;
} ;
return urlProtocol ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
// NDFN
- ( NSString * ) _remoteAddress
2000-01-22 12:49:49 +00:00
{
2003-11-23 18:27:14 +00:00
NSString * remoteAddress = nil ;
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
2003-11-23 18:27:14 +00:00
remoteAddress = [ self headerForKey : GSWHTTPHeader_RemoteAddress [ GSWebNamingConv ] ] ;
if ( ! remoteAddress )
{
remoteAddress = [ self headerForKey : GSWHTTPHeader_RemoteAddress [ GSWebNamingConvInversed ] ] ;
if ( ! remoteAddress )
remoteAddress = [ self headerForKey : @ "remote_addr" ] ;
} ;
return remoteAddress ;
} ;
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
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
// NDFN
- ( NSString * ) remoteAddress
2000-01-22 12:49:49 +00:00
{
2003-11-23 18:27:14 +00:00
return [ self _remoteAddress ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
// NDFN
- ( NSString * ) _remoteHost
2000-01-22 12:49:49 +00:00
{
2003-11-23 18:27:14 +00:00
NSString * remoteHost = nil ;
remoteHost = [ self headerForKey : GSWHTTPHeader_RemoteHost [ GSWebNamingConv ] ] ;
if ( ! remoteHost )
{
remoteHost = [ self headerForKey : GSWHTTPHeader_RemoteHost [ GSWebNamingConvInversed ] ] ;
if ( ! remoteHost )
remoteHost = [ self headerForKey : @ "remote_host" ] ;
} ;
return remoteHost ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
// NDFN
- ( NSString * ) remoteHost
2000-01-22 12:49:49 +00:00
{
2003-11-23 18:27:14 +00:00
return [ self _remoteHost ] ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
2003-11-23 18:27:14 +00:00
- ( NSString * ) _serverName
2000-01-22 12:49:49 +00:00
{
2003-11-23 18:27:14 +00:00
NSString * serverName = nil ;
if ( [ self _isUsingWebServer ] )
2003-04-09 12:03:17 +00:00
{
2003-11-23 18:27:14 +00:00
serverName = [ self headerForKey : GSWHTTPHeader_ServerName [ GSWebNamingConv ] ] ;
if ( ! serverName )
2003-04-09 12:03:17 +00:00
{
2003-11-23 18:27:14 +00:00
serverName = [ self headerForKey : GSWHTTPHeader_ServerName [ GSWebNamingConvInversed ] ] ;
if ( ! serverName )
{
serverName = [ self headerForKey : @ "server_name" ] ;
if ( ! serverName )
{
serverName = [ self headerForKey : @ "host" ] ;
if ( ! serverName )
ExceptionRaise ( @ "GSWRequest" , @ "No server name" ) ;
} ;
} ;
2003-04-09 12:03:17 +00:00
} ;
2003-11-23 18:27:14 +00:00
}
else
{
serverName = [ GSWApplication host ] ;
}
return serverName ;
}
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
} ;
2003-11-23 18:27:14 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) _serverPort
{
NSString * serverPort = nil ;
if ( [ self _isUsingWebServer ] )
{
serverPort = [ self headerForKey : GSWHTTPHeader_ServerPort [ GSWebNamingConv ] ] ;
if ( ! serverPort )
serverPort = [ self headerForKey : GSWHTTPHeader_ServerPort [ GSWebNamingConvInversed ] ] ;
}
else
{
NSArray * adaptors = [ [ GSWApplication application ] adaptors ] ;
if ( [ adaptors count ] > 0 )
2004-09-01 14:49:27 +00:00
serverPort = GSWIntToNSString ( [ ( GSWAdaptor * ) [ adaptors objectAtIndex : 0 ] port ] ) ;
2003-11-23 18:27:14 +00:00
}
return serverPort ;
}
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
} ;
2003-11-23 18:27:14 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) userAgent
{
NSString * userAgent = nil ;
userAgent = [ self headerForKey : GSWHTTPHeader_UserAgent ] ;
return userAgent ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) referer
{
NSString * referer = nil ;
referer = [ self headerForKey : GSWHTTPHeader_Referer ] ;
return referer ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSArray * ) browserLanguages
{
// OK
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
if ( ! _browserLanguages )
{
NSMutableArray * browserLanguages = nil ;
NSString * header = [ self headerForKey : GSWHTTPHeader_AcceptLanguage ] ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
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 ] ;
if ( browserLanguages )
{
// Remove Duplicates
int i = 0 ;
2004-12-31 14:33:16 +00:00
int browserLanguagesCount = 0 ;
2002-07-27 23:48:47 +00:00
browserLanguages = [ browserLanguages mutableCopy ] ;
2004-12-31 14:33:16 +00:00
browserLanguagesCount = [ browserLanguages count ] ;
for ( i = 0 ; i < browserLanguagesCount ; i + + )
2002-07-27 23:48:47 +00:00
{
int j = 0 ;
NSString * language = [ browserLanguages objectAtIndex : i ] ;
2004-12-31 14:33:16 +00:00
for ( j = browserLanguagesCount -1 ; j > i ; j - - )
2002-07-27 23:48:47 +00:00
{
NSString * language2 = [ browserLanguages objectAtIndex : j ] ;
if ( [ language2 isEqual : language ] )
2004-12-31 14:33:16 +00:00
{
[ browserLanguages removeObjectAtIndex : j ] ;
browserLanguagesCount - - ;
} ;
2002-07-27 23:48:47 +00:00
} ;
} ;
} ;
}
else
{
LOGError0 ( @ "No languages header" ) ;
} ;
if ( ! browserLanguages )
{
LOGError0 ( @ "No known languages" ) ;
browserLanguages = ( NSMutableArray * ) [ NSArray array ] ;
} ;
ASSIGN ( _browserLanguages , browserLanguages ) ;
} ;
2007-04-13 18:32:02 +00:00
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
2007-04-13 18:32:02 +00:00
2003-05-14 08:30:22 +00:00
if ( ! _browserAcceptedEncodings )
{
NSString * header = [ self headerForKey : GSWHTTPHeader_AcceptEncoding ] ;
2007-04-13 18:32:02 +00:00
2003-05-14 08:30:22 +00:00
if ( header )
{
NSArray * values = [ GSWValueQualityHeaderPart valuesFromHeaderString : header ] ;
if ( ! values )
values = [ NSArray array ] ;
ASSIGN ( _browserAcceptedEncodings , values ) ;
} ;
} ;
2007-04-13 18:32:02 +00:00
2003-05-14 08:30:22 +00:00
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
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( 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 ,
2003-11-23 18:27:14 +00:00
_contentData ,
2002-07-27 23:48:47 +00:00
_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
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// 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
{
2005-10-02 20:34:57 +00:00
return _formValueEncoding ? _formValueEncoding : _defaultFormValueEncoding ;
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 ;
2007-04-13 18:32:02 +00:00
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 ] ;
2007-04-13 18:32:02 +00:00
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 ;
2007-04-13 18:32:02 +00:00
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
[ localException raise ] ;
} ;
NS_ENDHANDLER ;
2002-07-27 23:48:47 +00:00
formValuesForKey = [ formValues objectForKey : key ] ;
2007-04-13 18:32:02 +00:00
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
{
2002-07-27 23:48:47 +00:00
id formValue = nil ;
NSArray * formValuesForKey = nil ;
2007-04-13 18:32:02 +00:00
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 ] ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
return formValue ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-23 18:27:14 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) stringFormValueForKey : ( NSString * ) key
{
id value = nil ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
value = [ self formValueForKey : key ] ;
if ( value && ! [ value isKindOfClass : [ NSString class ] ] )
value = [ value description ] ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
return value ;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSNumber * ) numberFormValueForKey : ( NSString * ) key
withFormatter : ( NSNumberFormatter * ) formatter
{
NSNumber * value = nil ;
NSString * stringValue = nil ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
stringValue = [ self stringFormValueForKey : key ] ;
if ( stringValue && formatter )
{
NSString * errorDscr = nil ;
if ( ! [ formatter getObjectValue : & value
forString : stringValue
errorDescription : & errorDscr ] )
{
NSLog ( @ "Error: %@" , errorDscr ) ;
} ;
} ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
return value ;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSCalendarDate * ) dateFormValueForKey : ( NSString * ) key
withFormatter : ( NSDateFormatter * ) formatter
{
NSCalendarDate * value = nil ;
NSString * stringValue = nil ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
stringValue = [ self stringFormValueForKey : key ] ;
if ( stringValue && formatter )
{
NSString * errorDscr = nil ;
if ( ! [ formatter getObjectValue : & value
forString : stringValue
errorDescription : & errorDscr ] )
{
NSLog ( @ "Error: %@" , errorDscr ) ;
} ;
} ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
return value ;
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// formValues
- ( NSDictionary * ) formValues
{
2002-07-27 23:48:47 +00:00
NSDictionary * formValues = nil ;
2007-04-13 18:32:02 +00:00
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 ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
return formValues ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-23 18:27:14 +00:00
- ( void ) appendFormValue : ( id ) value
forKey : ( NSString * ) key
{
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
if ( value )
{
NSMutableDictionary * formValues = nil ;
NSMutableArray * keyValues = nil ;
formValues = ( NSMutableDictionary * ) [ self _formValues ] ;
if ( formValues )
{
if ( ! [ formValues isKindOfClass : [ NSMutableDictionary class ] ] )
{
formValues = [ [ formValues mutableCopy ] autorelease ] ;
ASSIGN ( _formValues , formValues ) ;
} ;
}
else
{
formValues = ( NSMutableDictionary * ) [ NSMutableDictionary dictionary ] ;
ASSIGN ( _formValues , formValues ) ;
} ;
keyValues = [ formValues objectForKey : key ] ;
if ( keyValues )
{
if ( ! [ keyValues isKindOfClass : [ NSMutableArray class ] ] )
{
keyValues = [ [ formValues mutableCopy ] autorelease ] ;
[ formValues setObject : keyValues
forKey : key ] ;
} ;
}
else
{
keyValues = ( NSMutableArray * ) [ NSMutableArray array ] ;
[ formValues setObject : keyValues
forKey : key ] ;
} ;
[ keyValues addObject : value ] ;
} ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
} ;
- ( void ) appendFormValues : ( NSArray * ) values
forKey : ( NSString * ) key
{
if ( values )
{
NSMutableDictionary * formValues = nil ;
NSMutableArray * keyValues = nil ;
formValues = ( NSMutableDictionary * ) [ self _formValues ] ;
if ( formValues )
{
if ( ! [ formValues isKindOfClass : [ NSMutableDictionary class ] ] )
{
formValues = [ [ formValues mutableCopy ] autorelease ] ;
ASSIGN ( _formValues , formValues ) ;
} ;
}
else
{
formValues = ( NSMutableDictionary * ) [ NSMutableDictionary dictionary ] ;
ASSIGN ( _formValues , formValues ) ;
} ;
keyValues = [ formValues objectForKey : key ] ;
if ( keyValues )
{
if ( ! [ keyValues isKindOfClass : [ NSMutableArray class ] ] )
{
keyValues = [ [ formValues mutableCopy ] autorelease ] ;
[ formValues setObject : keyValues
forKey : key ] ;
} ;
}
else
{
keyValues = ( NSMutableArray * ) [ NSMutableArray array ] ;
[ formValues setObject : keyValues
forKey : key ] ;
} ;
[ keyValues addObjectsFromArray : values ] ;
} ;
} ;
2003-01-19 15:33:07 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// uriValueKeys
- ( NSArray * ) uriElementKeys
{
NSDictionary * uriElements = nil ;
NSArray * uriElementKeys = nil ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
NS_DURING
{
uriElements = [ self _uriElements ] ;
}
NS_HANDLER
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "GSWRequest uriElementKeys" ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
[ localException raise ] ;
} ;
NS_ENDHANDLER ;
uriElementKeys = [ uriElements allKeys ] ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
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 ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
NS_DURING
{
uriElements = [ self _uriElements ] ;
}
NS_HANDLER
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException , @ "GSWRequest uriElementForKey:" ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
[ localException raise ] ;
} ;
NS_ENDHANDLER ;
uriElement = [ uriElements objectForKey : key ] ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
return uriElement ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// uriElements
- ( NSDictionary * ) uriElements
{
NSDictionary * uriElements = nil ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
NS_DURING
{
uriElements = [ self _uriElements ] ;
}
NS_HANDLER
{
localException = ExceptionByAddingUserInfoObjectFrameInfo0 ( localException ,
@ "GSWRequest uriElements" ) ;
LOGException ( @ "%@ (%@)" , localException , [ localException reason ] ) ;
[ localException raise ] ;
} ;
NS_ENDHANDLER ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
return uriElements ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// isFromClientComponent
- ( BOOL ) isFromClientComponent
{
// OK
2002-07-27 23:48:47 +00:00
NSString * remoteInvocationPost = nil ;
BOOL isFromClientComponent = NO ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
remoteInvocationPost = [ self formValueForKey : GSWFormValue_RemoteInvocationPost [ GSWebNamingConv ] ] ;
isFromClientComponent = ( remoteInvocationPost ! = nil ) ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
return isFromClientComponent ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) setCookieFromHeaders
{
2002-07-27 23:48:47 +00:00
NSDictionary * cookie = nil ;
2000-01-22 12:49:49 +00:00
NSString * cookieHeader = nil ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
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 ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
while ( ( key = [ enumerator nextObject ] ) )
{
value = [ cookieStrings objectForKey : key ] ;
if ( value )
{
id cookieValue = nil ;
int index = 0 ;
2004-12-31 14:33:16 +00:00
int valueCount = [ value count ] ;
for ( index = 0 ; index < valueCount ; index + + )
2002-07-27 23:48:47 +00:00
{
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 ) ;
2007-04-13 18:32:02 +00:00
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// 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 ;
2003-11-23 18:27:14 +00:00
NSDictionary * cookieValues = nil ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
cookieValues = [ self cookieValues ] ;
cookieValuesForKey = [ cookieValues objectForKey : key ] ;
2007-04-13 18:32:02 +00:00
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
{
2003-11-23 18:27:14 +00:00
NSArray * values = nil ;
2002-07-27 23:48:47 +00:00
NSString * cookieValueForKey = nil ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
values = [ self cookieValuesForKey : key ] ;
if ( [ values count ] > 0 )
cookieValueForKey = [ values objectAtIndex : 0 ] ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
return cookieValueForKey ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// cookieValues
- ( NSDictionary * ) cookieValues
{
2003-11-23 18:27:14 +00:00
NSDictionary * cookieValues = nil ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
cookieValues = [ self _initCookieDictionary ] ;
2007-04-13 18:32:02 +00:00
2003-11-23 18:27:14 +00:00
return cookieValues ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
// Dictionary of ccokie name / cookie value
2000-01-22 12:49:49 +00:00
- ( NSDictionary * ) _initCookieDictionary
{
2002-07-27 23:48:47 +00:00
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 ;
2004-12-31 14:33:16 +00:00
int cookiesArrayCount = [ cookiesArray count ] ;
for ( i = 0 ; i < cookiesArrayCount ; i + + )
2002-07-27 23:48:47 +00:00
{
2004-12-31 14:33:16 +00:00
int cookieCount = 0 ;
2002-07-27 23:48:47 +00:00
cookieString = [ cookiesArray objectAtIndex : i ] ;
cookie = [ cookieString componentsSeparatedByString : @ "=" ] ;
2004-12-31 14:33:16 +00:00
cookieCount = [ cookie count ] ;
if ( cookieCount > 0 )
2002-07-27 23:48:47 +00:00
{
cookieName = [ cookie objectAtIndex : 0 ] ;
2004-12-31 14:33:16 +00:00
if ( cookieCount > 1 )
2002-07-27 23:48:47 +00:00
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 ] ) ;
} ;
return _cookie ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-23 18:27:14 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSDictionary * ) _cookieDictionary
{
return [ self _initCookieDictionary ] ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) _cookieDescription
{
// OK
2002-07-27 23:48:47 +00:00
NSString * cookieHeader = nil ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
cookieHeader = [ self headerForKey : GSWHTTPHeader_Cookie ] ;
2003-11-23 18:27:14 +00:00
if ( ! cookieHeader )
cookieHeader = [ self headerForKey : GSWHTTPHeader_CookieStupidIIS ] ; // God damn it
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
return cookieHeader ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-23 18:27:14 +00:00
- ( NSArray * ) cookies
{
// build super -> cookies
if ( ! _cookies )
{
2004-05-14 12:00:56 +00:00
NSDictionary * cookies = nil ;
NSEnumerator * keysEnum = nil ;
NSString * key = nil ;
2003-11-23 18:27:14 +00:00
[ self _initCookies ] ; // super cookies init
2004-04-22 12:08:29 +00:00
cookies = [ self cookieValues ] ;
keysEnum = [ cookies keyEnumerator ] ;
key = nil ;
2003-11-23 18:27:14 +00:00
while ( ( key = [ keysEnum nextObject ] ) )
{
NSString * value = [ cookies objectForKey : key ] ;
[ _cookies addObject : [ GSWCookie cookieWithName : key
value : value ] ] ;
}
} ;
return _cookies ;
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 ;
2007-04-13 18:32:02 +00:00
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 ] ;
} ;
2007-04-13 18:32:02 +00:00
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
} ;
2007-04-13 18:32:02 +00:00
- ( void ) _setApplicationNumber : ( int ) newValue force : ( BOOL ) yn
{
if ( yn || ( _applicationNumber = = -9999 ) )
{
_applicationNumber = newValue ;
}
}
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
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 ;
2004-12-31 14:33:16 +00:00
int allKeysCount = 0 ;
2005-03-10 16:10:03 +00:00
# warning we should use ACSII encoding here ? dave @ turbocat . de
// according to the the standard http : // www . w3 . org / International / O - URL - code . html ,
// URIs are encoded in NSASCIIStringEncoding with escape sequences cooresponding
// to the hexadecimal value of the UTF -8 encoding . Therefore the encoding should
// only be relevant for - dictionaryQueryString and not for formString .
// Yet it seems that browsers do not use UTF -8 consistently but the encoding
// specified by the response .
2002-07-27 23:48:47 +00:00
formString = [ [ [ NSString alloc ] initWithData : aFormData
encoding : encoding ] autorelease ] ;
2004-12-31 14:33:16 +00:00
2005-03-10 16:10:03 +00:00
tmpFormData = [ formString dictionaryQueryStringWithEncoding : encoding ] ;
2004-12-31 14:33:16 +00:00
2002-07-27 23:48:47 +00:00
allKeys = [ tmpFormData allKeys ] ;
2004-12-31 14:33:16 +00:00
allKeysCount = [ allKeys count ] ;
if ( allKeysCount > 0 )
2002-07-27 23:48:47 +00:00
{
int i = 0 ;
NSString * key = nil ;
BOOL ismapCoordsFound = NO ;
NSArray * value = nil ;
2004-12-31 14:33:16 +00:00
for ( i = 0 ; i < allKeysCount && ! ismapCoordsFound ; i + + )
2002-07-27 23:48:47 +00:00
{
key = [ allKeys objectAtIndex : i ] ;
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 ] ;
} ;
} ;
} ;
2007-04-13 18:32:02 +00:00
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
{
2005-10-02 20:34:57 +00:00
return [ self formValueEncoding ] ; // TODO
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSData * ) _formData
{
// OK
2002-07-27 23:48:47 +00:00
NSData * data = nil ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
if ( [ _method isEqualToString : GSWHTTPHeader_MethodGet ] )
{
NSString * urlQueryString = [ self _urlQueryString ] ;
2007-04-13 18:32:02 +00:00
* GSWeb.framework/GSWApplication.m (GSWApplicationMainReal):
Remove assertion for defined GNUSTEP_STRING_ENCODING.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([+sendResponse:toStream:
withNamingConv:withAdditionalHeaderLines:withRemoteAddress:]):
Use contentEncoding of response instead of
NSISOLatin1StringEncoding.
* GSWeb.framework/GSWHTMLComment.m ([-init]): Use
+[GSWMessage defaultEncoding] instead of
NSISOLatin1StringEncoding.
* GSWeb.framework/GSWHTMLDynamicElement.m
([-addURL:forCIDKeyAssociation:CIDStoreAssociation:inContext:]):
Use NSUnicodeStringEncoding instead NSISOLatin1StringEncoding
for hash value.
* GSWeb.framework/GSWMessage.m ([+initialize]): Set
globalDefaultEncoding to NSISOLatin1StringEncoding only if
WOStrictFlag default flag is set. Otherwise default to
GetDefEncoding().
* GSWeb.framework/GSWRequest.m
([-_formValueEncodingFromFormData:]): Use +[GSWMessage
defaultEncoding] instead of NSISOLatin1StringEncoding.
([-_formData], [-_getFormValuesFromMultipartFormDataOld]):
Ditto.
([-_getFormValuesFromMultipartFormData]): Ditto.
([-_decodeMultipartBody:boundary:], -[_parseData:]): Ditto.
* GSWeb.framework/GSWTemplateParserXML.m
([-templateElements]): Ditto.
* GSWeb.framework/NSString+HTML.m (-[decodeURL]): Ditto.
* INSTALL: Remove reference to GNUSTEP_STRING_ENCODING.
* Examples/hello/HelloPage.gswc/HelloPage.gswi,
* GSWExtensions.framework/French.lproj/
GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswi,
GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.gswi
* GSWExtensions.framework/
GSWCollapsibleComponentContent.gswc/GSWCollapsibleComponentContent.gswi
GSWDictionaryRepetition.gswc/GSWDictionaryRepetition.gswi,
GSWIFrame.gswc/GSWIFrame.gswi,
GSWMetaRefresh.gswc/GSWMetaRefresh.gswi,
GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.gswi,
GSWRedirect.gswc/GSWRedirect.gswi,
GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswi,
GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.gswi
GSWStatsPage.gswc/GSWStatsPage.gswi,
GSWTable.gswc/GSWTable.gswi,
GSWTableString.gswc/GSWTableString.gswi,
Correct encoding declaration.
* GSWExtensions.framework/
GSWKeyValueConditional.gswc/GSWKeyValueConditional.gswd,
GSWKeyValueConditional.gswc/GSWKeyValueConditional.gswi,
GSWKeyValueConditional.gswc/GSWKeyValueConditional.html:
Correct encoding declaration and line terminators.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@20347 72102866-910b-0410-8b05-ffd578937521
2004-11-12 13:47:05 +00:00
data = [ urlQueryString dataUsingEncoding : [ self formValueEncoding ] ] ; // ? ?
2002-07-27 23:48:47 +00:00
}
else if ( [ _method isEqualToString : GSWHTTPHeader_MethodPost ] )
{
2003-11-23 18:27:14 +00:00
data = _contentData ;
2002-07-27 23:48:47 +00:00
} ;
2007-04-13 18:32:02 +00:00
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 ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
contentType = [ self headerForKey : GSWHTTPHeader_ContentType ] ;
2007-04-13 18:32:02 +00:00
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 ] ;
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
return contentType ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( NSString * ) _urlQueryString
{
// OK
2002-07-27 23:48:47 +00:00
NSString * urlQueryString = nil ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
urlQueryString = [ _uri urlQueryString ] ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
return urlQueryString ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2007-12-02 20:28:33 +00:00
// FIXME : check if that is needed for 4.5 compat
2000-01-22 12:49:49 +00:00
- ( BOOL ) _isUsingWebServer
{
2002-07-27 23:48:47 +00:00
return _isUsingWebServer ;
2007-12-02 20:28:33 +00:00
}
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 ;
2007-12-02 20:28:33 +00:00
}
- ( BOOL ) isUsingWebServer
{
return _isUsingWebServer ;
}
2000-01-22 12:49:49 +00:00
2007-12-02 20:28:33 +00:00
- ( void ) setIsUsingWebServer : ( BOOL ) flag
{
_isUsingWebServer = flag ;
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
- ( BOOL ) _isSessionIDInRequest
2000-01-22 12:49:49 +00:00
{
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
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
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
- ( BOOL ) _isSessionIDInCookies
2000-01-22 12:49:49 +00:00
{
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
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
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-11-23 18:27:14 +00:00
- ( BOOL ) _isSessionIDInFormValues
2000-01-22 12:49:49 +00:00
{
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
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 ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2004-01-09 11:34:39 +00:00
/ * * urlPrefix will prefix url ( before the / GSWeb ) * * /
- ( GSWDynamicURLString * ) _urlWithURLPrefix : ( NSString * ) urlPrefix
requestHandlerKey : ( NSString * ) key
path : ( NSString * ) path
queryString : ( NSString * ) queryString
2000-01-22 12:49:49 +00:00
{
2004-05-14 12:00:56 +00:00
GSWDynamicURLString * url = nil ;
url = [ self _applicationURLPrefix ] ;
2004-01-09 11:34:39 +00:00
if ( urlPrefix )
2005-04-05 11:54:36 +00:00
[ url setURLPrefix : [ urlPrefix stringByAppendingString : [ url urlPrefix ] ] ] ;
2004-05-14 12:00:56 +00:00
2002-07-27 23:48:47 +00:00
[ url setURLRequestHandlerKey : key ] ;
[ url setURLRequestHandlerPath : path ] ;
[ url setURLQueryString : queryString ] ;
2004-05-14 12:00:56 +00:00
2002-07-27 23:48:47 +00:00
return url ;
2000-01-22 12:49:49 +00:00
} ;
2004-01-09 11:34:39 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( GSWDynamicURLString * ) _urlWithRequestHandlerKey : ( NSString * ) key
path : ( NSString * ) path
queryString : ( NSString * ) queryString
{
2004-05-14 12:00:56 +00:00
GSWDynamicURLString * url = nil ;
url = [ self _urlWithURLPrefix : nil
requestHandlerKey : key
path : path
queryString : queryString ] ;
return url ;
2004-01-09 11:34:39 +00:00
} ;
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( GSWDynamicURLString * ) _applicationURLPrefix
{
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
2003-01-19 15:33:07 +00:00
if ( ! _formValues || ! _finishedParsingMultipartFormData )
2002-07-27 23:48:47 +00:00
{
NSString * contentType = [ self _contentType ] ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
if ( ! contentType || [ contentType isEqualToString : GSWHTTPHeader_FormURLEncoded ] )
{
[ self _getFormValuesFromURLEncoding ] ;
}
else if ( [ contentType isEqualToString : GSWHTTPHeader_MultipartFormData ] )
{
[ self _getFormValuesFromMultipartFormData ] ;
}
else
{
2007-04-13 18:32:02 +00:00
// NSDebugMLLog ( @ "requests" , @ "contentType=%@" , contentType ) ;
2002-07-27 23:48:47 +00:00
} ;
2003-01-19 15:33:07 +00:00
_finishedParsingMultipartFormData = YES ;
2002-07-27 23:48:47 +00:00
} ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
return _formValues ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _getFormValuesFromURLEncoding
{
2002-07-27 23:48:47 +00:00
NSData * formData = nil ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
formData = [ self _formData ] ;
2005-03-10 16:10:03 +00:00
2002-07-27 23:48:47 +00:00
if ( formData )
{
NSStringEncoding formValueEncoding = [ self _formValueEncodingFromFormData : formData ] ;
NSDictionary * formValues = nil ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
formValues = [ self _extractValuesFromFormData : formData
withEncoding : formValueEncoding ] ;
ASSIGN ( _formValues , formValues ) ;
} ;
2000-01-22 12:49:49 +00:00
} ;
2003-11-23 18:27:14 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2003-01-19 15:33:07 +00:00
+ ( BOOL ) _lookForIDsInCookiesFirst
{
return NO ;
}
2000-01-22 12:49:49 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( BOOL ) _hasFormValues
{
2002-07-27 23:48:47 +00:00
NSDictionary * formValues = [ self _formValues ] ;
return [ formValues count ] > 0 ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 ;
2005-04-05 11:54:36 +00:00
IMP headersString_appendStringIMP = NULL ;
2005-03-21 19:17:18 +00:00
NSStringEncoding e ;
2003-01-19 15:33:07 +00:00
formValues = ( NSMutableDictionary * ) [ NSMutableDictionary dictionary ] ;
2005-04-05 11:54:36 +00:00
// Append Each Header
2003-01-19 15:33:07 +00:00
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 + + )
2005-04-05 11:54:36 +00:00
{
// append "key: value\n" to headersString
GSWeb_appendStringWithImpPtr ( headersString ,
& headersString_appendStringIMP ,
key ) ;
GSWeb_appendStringWithImpPtr ( headersString ,
& headersString_appendStringIMP ,
@ ": " ) ;
GSWeb_appendStringWithImpPtr ( headersString ,
& headersString_appendStringIMP ,
[ value objectAtIndex : i ] ) ;
GSWeb_appendStringWithImpPtr ( headersString ,
& headersString_appendStringIMP ,
@ "\n" ) ;
} ;
2003-01-19 15:33:07 +00:00
} ;
2005-04-05 11:54:36 +00:00
// Append \ n to specify headers end .
GSWeb_appendStringWithImpPtr ( headersString ,
& headersString_appendStringIMP ,
@ "\n" ) ;
// headersData = [ headersString dataUsingEncoding : [ self formValueEncoding ] ] ;
// NSASCIIStringEncoding should be ok dave @ turbocat . de
2005-03-11 10:31:26 +00:00
headersData = [ headersString dataUsingEncoding : NSASCIIStringEncoding allowLossyConversion : YES ] ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
parser = [ GSMimeParser mimeParser ] ;
[ parser parse : headersData ] ;
2003-03-24 07:45:52 +00:00
[ parser expectNoHeaders ] ;
2005-10-04 10:24:42 +00:00
e = [ self formValueEncoding ] ;
switch ( e )
2005-03-21 19:17:18 +00:00
{
2005-10-04 10:24:42 +00:00
case NSISOLatin1StringEncoding :
[ parser setDefaultCharset : @ "iso-8859-1" ] ;
break ;
case NSUTF8StringEncoding :
[ parser setDefaultCharset : @ "utf-8" ] ;
break ;
default :
[ parser setDefaultCharset :
2008-03-09 17:02:01 +00:00
[ GSObjCClass ( [ parser mimeDocument ] ) charsetFromEncoding : e ] ] ;
2005-10-04 10:24:42 +00:00
break ;
2005-03-21 19:17:18 +00:00
}
2005-10-04 10:24:42 +00:00
2003-11-23 18:27:14 +00:00
if ( [ parser parse : _contentData ] )
2003-01-19 15:33:07 +00:00
[ parser parse : nil ] ;
if ( [ parser isComplete ] = = NO )
{
// TODO
}
else
{
GSMimeDocument * document = [ parser mimeDocument ] ;
2003-03-03 08:47:29 +00:00
NSArray * content = nil ;
NSString * contentSubtype = nil ;
2007-04-13 18:32:02 +00:00
2003-03-03 08:47:29 +00:00
content = [ document content ] ;
contentSubtype = [ document 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
{
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 ) ;
aDocContent = [ aDoc content ] ;
contentDispositionHeader = [ aDoc headerNamed : @ "content-disposition" ] ;
contentDispositionValue = [ contentDispositionHeader value ] ;
contentDispositionParams = [ contentDispositionHeader parameters ] ;
if ( [ contentDispositionValue isEqual : @ "form-data" ] )
{
NSString * formDataName = [ contentDispositionParams objectForKey : @ "name" ] ;
if ( ! formDataName )
{
ExceptionRaise ( @ "GSWRequest" ,
@ "GSWRequest: No name \n%@\n" ,
aDoc ) ;
}
else
{
NSString * paramName = nil ;
NSEnumerator * paramNamesEnumerator = [ contentDispositionParams keyEnumerator ] ;
while ( ( paramName = [ paramNamesEnumerator nextObject ] ) )
{
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 ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
paramValue = [ contentDispositionParams objectForKey : paramName ] ;
paramFormValueName = [ NSString stringWithFormat : @ "%@.%@" , formDataName , paramName ] ;
2003-03-21 14:32:57 +00:00
previous = [ formValues objectForKey : paramFormValueName ] ;
2007-04-13 18:32:02 +00:00
2003-03-21 14:32:57 +00:00
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 ) ;
} ;
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 ;
2004-12-31 14:33:16 +00:00
int partsCount = 0 ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
boundaryString = [ NSString stringWithFormat : @ "--%@\r\n" , aBoundary ] ; // Add "--" and "\r\n"
* GSWeb.framework/GSWApplication.m (GSWApplicationMainReal):
Remove assertion for defined GNUSTEP_STRING_ENCODING.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([+sendResponse:toStream:
withNamingConv:withAdditionalHeaderLines:withRemoteAddress:]):
Use contentEncoding of response instead of
NSISOLatin1StringEncoding.
* GSWeb.framework/GSWHTMLComment.m ([-init]): Use
+[GSWMessage defaultEncoding] instead of
NSISOLatin1StringEncoding.
* GSWeb.framework/GSWHTMLDynamicElement.m
([-addURL:forCIDKeyAssociation:CIDStoreAssociation:inContext:]):
Use NSUnicodeStringEncoding instead NSISOLatin1StringEncoding
for hash value.
* GSWeb.framework/GSWMessage.m ([+initialize]): Set
globalDefaultEncoding to NSISOLatin1StringEncoding only if
WOStrictFlag default flag is set. Otherwise default to
GetDefEncoding().
* GSWeb.framework/GSWRequest.m
([-_formValueEncodingFromFormData:]): Use +[GSWMessage
defaultEncoding] instead of NSISOLatin1StringEncoding.
([-_formData], [-_getFormValuesFromMultipartFormDataOld]):
Ditto.
([-_getFormValuesFromMultipartFormData]): Ditto.
([-_decodeMultipartBody:boundary:], -[_parseData:]): Ditto.
* GSWeb.framework/GSWTemplateParserXML.m
([-templateElements]): Ditto.
* GSWeb.framework/NSString+HTML.m (-[decodeURL]): Ditto.
* INSTALL: Remove reference to GNUSTEP_STRING_ENCODING.
* Examples/hello/HelloPage.gswc/HelloPage.gswi,
* GSWExtensions.framework/French.lproj/
GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswi,
GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.gswi
* GSWExtensions.framework/
GSWCollapsibleComponentContent.gswc/GSWCollapsibleComponentContent.gswi
GSWDictionaryRepetition.gswc/GSWDictionaryRepetition.gswi,
GSWIFrame.gswc/GSWIFrame.gswi,
GSWMetaRefresh.gswc/GSWMetaRefresh.gswi,
GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.gswi,
GSWRedirect.gswc/GSWRedirect.gswi,
GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswi,
GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.gswi
GSWStatsPage.gswc/GSWStatsPage.gswi,
GSWTable.gswc/GSWTable.gswi,
GSWTableString.gswc/GSWTableString.gswi,
Correct encoding declaration.
* GSWExtensions.framework/
GSWKeyValueConditional.gswc/GSWKeyValueConditional.gswd,
GSWKeyValueConditional.gswc/GSWKeyValueConditional.gswi,
GSWKeyValueConditional.gswc/GSWKeyValueConditional.html:
Correct encoding declaration and line terminators.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@20347 72102866-910b-0410-8b05-ffd578937521
2004-11-12 13:47:05 +00:00
dataBoundary = [ boundaryString dataUsingEncoding : [ self formValueEncoding ] ] ; // TODO
2002-07-27 23:48:47 +00:00
parts = [ aBody componentsSeparatedByData : dataBoundary ] ;
2004-12-31 14:33:16 +00:00
partsCount = [ parts count ] ;
for ( i = 0 ; i < partsCount ; i + + )
{
tmpData = [ parts objectAtIndex : i ] ;
if ( [ tmpData length ] < 400 )
{
NSString * _dataString = nil ;
_dataString = [ [ [ NSString alloc ] initWithData : tmpData
encoding : [ self formValueEncoding ] ] autorelease ] ;
}
else
{
2007-04-13 18:32:02 +00:00
// NSDebugMLLog ( @ "requests" , @ "tmpData=%@" , tmpData ) ;
2002-07-27 23:48:47 +00:00
} ;
2004-12-31 14:33:16 +00:00
} ;
2000-01-22 12:49:49 +00:00
// The 1 st part should be empty ( or it ' s only a warning message . . . )
2004-12-31 14:33:16 +00:00
if ( partsCount > 0 )
2002-07-27 23:48:47 +00:00
{
2004-12-31 14:33:16 +00:00
parts = [ parts subarrayWithRange : NSMakeRange ( 1 , partsCount -1 ) ] ;
partsCount = [ parts count ] ;
2002-07-27 23:48:47 +00:00
} ;
2004-12-31 14:33:16 +00:00
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 ] ;
2004-12-31 14:33:16 +00:00
for ( i = 0 ; i < partsCount ; i + + )
2002-07-27 23:48:47 +00:00
{
tmpData = [ parts objectAtIndex : i ] ;
2004-12-31 14:33:16 +00:00
if ( i = = partsCount -1 )
2002-07-27 23:48:47 +00:00
{
// Delete the last \ r \ nseparator - - \ r \ n
boundaryString = [ NSString stringWithFormat : @ "\r\n%@--\r\n" , aBoundary ] ;
* GSWeb.framework/GSWApplication.m (GSWApplicationMainReal):
Remove assertion for defined GNUSTEP_STRING_ENCODING.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([+sendResponse:toStream:
withNamingConv:withAdditionalHeaderLines:withRemoteAddress:]):
Use contentEncoding of response instead of
NSISOLatin1StringEncoding.
* GSWeb.framework/GSWHTMLComment.m ([-init]): Use
+[GSWMessage defaultEncoding] instead of
NSISOLatin1StringEncoding.
* GSWeb.framework/GSWHTMLDynamicElement.m
([-addURL:forCIDKeyAssociation:CIDStoreAssociation:inContext:]):
Use NSUnicodeStringEncoding instead NSISOLatin1StringEncoding
for hash value.
* GSWeb.framework/GSWMessage.m ([+initialize]): Set
globalDefaultEncoding to NSISOLatin1StringEncoding only if
WOStrictFlag default flag is set. Otherwise default to
GetDefEncoding().
* GSWeb.framework/GSWRequest.m
([-_formValueEncodingFromFormData:]): Use +[GSWMessage
defaultEncoding] instead of NSISOLatin1StringEncoding.
([-_formData], [-_getFormValuesFromMultipartFormDataOld]):
Ditto.
([-_getFormValuesFromMultipartFormData]): Ditto.
([-_decodeMultipartBody:boundary:], -[_parseData:]): Ditto.
* GSWeb.framework/GSWTemplateParserXML.m
([-templateElements]): Ditto.
* GSWeb.framework/NSString+HTML.m (-[decodeURL]): Ditto.
* INSTALL: Remove reference to GNUSTEP_STRING_ENCODING.
* Examples/hello/HelloPage.gswc/HelloPage.gswi,
* GSWExtensions.framework/French.lproj/
GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswi,
GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.gswi
* GSWExtensions.framework/
GSWCollapsibleComponentContent.gswc/GSWCollapsibleComponentContent.gswi
GSWDictionaryRepetition.gswc/GSWDictionaryRepetition.gswi,
GSWIFrame.gswc/GSWIFrame.gswi,
GSWMetaRefresh.gswc/GSWMetaRefresh.gswi,
GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.gswi,
GSWRedirect.gswc/GSWRedirect.gswi,
GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswi,
GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.gswi
GSWStatsPage.gswc/GSWStatsPage.gswi,
GSWTable.gswc/GSWTable.gswi,
GSWTableString.gswc/GSWTableString.gswi,
Correct encoding declaration.
* GSWExtensions.framework/
GSWKeyValueConditional.gswc/GSWKeyValueConditional.gswd,
GSWKeyValueConditional.gswc/GSWKeyValueConditional.gswi,
GSWKeyValueConditional.gswc/GSWKeyValueConditional.html:
Correct encoding declaration and line terminators.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@20347 72102866-910b-0410-8b05-ffd578937521
2004-11-12 13:47:05 +00:00
dataBoundary = [ boundaryString dataUsingEncoding : [ self formValueEncoding ] ] ; // TODO
2002-07-27 23:48:47 +00:00
tmpData = [ tmpData dataByDeletingLastBytesCount : [ dataBoundary length ] ] ;
}
else
{
tmpData = [ tmpData dataByDeletingLastBytesCount : 2 ] ;
} ;
[ ( NSMutableArray * ) parts replaceObjectAtIndex : i
withObject : tmpData ] ;
} ;
2004-12-31 14:33:16 +00:00
for ( i = 0 ; i < partsCount ; i + + )
{
tmpData = [ parts objectAtIndex : i ] ;
if ( [ tmpData length ] < 400 )
{
NSString * dataString = nil ;
dataString = [ [ [ NSString alloc ] initWithData : tmpData
encoding : [ self formValueEncoding ] ] autorelease ] ;
}
else
{
} ;
} ;
2002-07-27 23:48:47 +00:00
return parts ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Convert :
// < 436 f6e74 656 e742d 44697370 6 f736974 696 f6e3a 20666 f72 6 d2d6461 74613 b20 6 e616d65 3 d22392e 31223 b20 66696 c65 6 e616d65 3 d22433a 5 c54454d 505 c7a61 686 e2e74 7874220 d 0 a436f6e 74656 e74 2 d547970 653 a2074 6578742 f 706 c6169 6 e0d0a0d 0 a415145 41414151 774 d4441 79666 f30 546 c4e2b 58586843 5769314 b 50516351 59735736 77426 d33 6 f526172 47365846 334 c7a64 55563766 4 e39654b 6 b764b4a 43717150 59674172 50593748 63783979 4436506 b 66774 a75 50465 a41 412 f3034 63446 c50 72485256 70537 a41 35676647 38623645 72443141 58372 b70 67734 c50 75304 b4d 770 d0a0d 0 a >
// Into :
// (
// {
// "content-disposition" = "form-data; name=\" 9.1 \ "; filename=\" C : \ \ TEMP \ \ zahn . txt \ "" ;
// "content-type" = text / plain ;
// } ,
// < 41514541 41415177 4 d444179 666 f3054 6 c4e2b58 58684357 69314 b50 51635159 73573677 426 d336f 52617247 36584633 4 c7a6455 5637664 e 39654 b6b 764 b4a43 71715059 67417250 59374863 78397944 36506 b66 774 a7550 465 a4141 2 f303463 446 c5072 48525670 537 a4135 67664738 62364572 44314158 372 b7067 734 c5075 304 b4d77 0 d0a0d0a >
// )
// convert :
// < 436 f6e74 656 e742d 44697370 6 f736974 696 f6e3a 20666 f72 6 d2d6461 74613 b20 6 e616d65 3 d22392e 33220 d0a 0 d0a7375 626 d6974 >
// Into :
// (
// {
// "content-disposition" = "form-data; name=\" 9.3 \ "" ;
// } ,
// < 7375626 d 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 ;
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
* GSWeb.framework/GSWApplication.m (GSWApplicationMainReal):
Remove assertion for defined GNUSTEP_STRING_ENCODING.
* GSWeb.framework/GSWDefaultAdaptorThread.m
([+sendResponse:toStream:
withNamingConv:withAdditionalHeaderLines:withRemoteAddress:]):
Use contentEncoding of response instead of
NSISOLatin1StringEncoding.
* GSWeb.framework/GSWHTMLComment.m ([-init]): Use
+[GSWMessage defaultEncoding] instead of
NSISOLatin1StringEncoding.
* GSWeb.framework/GSWHTMLDynamicElement.m
([-addURL:forCIDKeyAssociation:CIDStoreAssociation:inContext:]):
Use NSUnicodeStringEncoding instead NSISOLatin1StringEncoding
for hash value.
* GSWeb.framework/GSWMessage.m ([+initialize]): Set
globalDefaultEncoding to NSISOLatin1StringEncoding only if
WOStrictFlag default flag is set. Otherwise default to
GetDefEncoding().
* GSWeb.framework/GSWRequest.m
([-_formValueEncodingFromFormData:]): Use +[GSWMessage
defaultEncoding] instead of NSISOLatin1StringEncoding.
([-_formData], [-_getFormValuesFromMultipartFormDataOld]):
Ditto.
([-_getFormValuesFromMultipartFormData]): Ditto.
([-_decodeMultipartBody:boundary:], -[_parseData:]): Ditto.
* GSWeb.framework/GSWTemplateParserXML.m
([-templateElements]): Ditto.
* GSWeb.framework/NSString+HTML.m (-[decodeURL]): Ditto.
* INSTALL: Remove reference to GNUSTEP_STRING_ENCODING.
* Examples/hello/HelloPage.gswc/HelloPage.gswi,
* GSWExtensions.framework/French.lproj/
GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswi,
GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.gswi
* GSWExtensions.framework/
GSWCollapsibleComponentContent.gswc/GSWCollapsibleComponentContent.gswi
GSWDictionaryRepetition.gswc/GSWDictionaryRepetition.gswi,
GSWIFrame.gswc/GSWIFrame.gswi,
GSWMetaRefresh.gswc/GSWMetaRefresh.gswi,
GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.gswi,
GSWRedirect.gswc/GSWRedirect.gswi,
GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswi,
GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.gswi
GSWStatsPage.gswc/GSWStatsPage.gswi,
GSWTable.gswc/GSWTable.gswi,
GSWTableString.gswc/GSWTableString.gswi,
Correct encoding declaration.
* GSWExtensions.framework/
GSWKeyValueConditional.gswc/GSWKeyValueConditional.gswd,
GSWKeyValueConditional.gswc/GSWKeyValueConditional.gswi,
GSWKeyValueConditional.gswc/GSWKeyValueConditional.html:
Correct encoding declaration and line terminators.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@20347 72102866-910b-0410-8b05-ffd578937521
2004-11-12 13:47:05 +00:00
encoding : [ self formValueEncoding ] ] autorelease ] ;
2002-07-27 23:48:47 +00:00
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
2007-04-13 18:32:02 +00:00
NSLog ( @ "Error in %s line %d" , __PRETTY _FUNCTION __ , __LINE __ ) ;
2002-07-27 23:48:47 +00:00
}
else
{
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 ] ;
} ;
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 ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
parsedParts = ( NSMutableDictionary * ) [ NSMutableDictionary dictionary ] ;
headerParts = [ aHeader componentsSeparatedByString : @ ";" ] ;
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 ] ;
part = [ part stringByTrimmingSpaces ] ;
parsedPart = [ part componentsSeparatedByString : @ "=" ] ;
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 ;
} ;
if ( key && value )
{
if ( [ value isQuotedWith : @ "\" " ] )
value = [ value stringWithoutQuote : @ "\" " ] ;
[ parsedParts setObject : value
forKey : key ] ;
} ;
} ;
parsedParts = [ NSDictionary dictionaryWithDictionary : parsedParts ] ;
2007-04-13 18:32:02 +00:00
2002-07-27 23:48:47 +00:00
return parsedParts ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2002-07-27 23:48:47 +00:00
- ( id ) nonNilFormValueForKey : ( NSString * ) key
2000-01-22 12:49:49 +00:00
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
return nil ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 ;
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// 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 ] ] ;
2007-04-13 18:32:02 +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
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 ;
2007-04-13 18:32:02 +00:00
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 ] ] ;
2007-04-13 18:32:02 +00:00
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 ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
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
} ;
} ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
return element ;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// NDFN
- ( NSDictionary * ) uriOrFormOrCookiesElementsByLookingForCookieFirst : ( BOOL ) lookCookieFirst
{
NSMutableDictionary * elements = nil ;
NSString * tmpString = nil ;
2007-04-13 18:32:02 +00:00
2003-01-19 15:33:07 +00:00
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 ] ] ;
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
2007-04-13 18:32:02 +00:00
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 ] ;
requestHandlerKey = [ ( ( GSWDynamicURLString * ) [ self uri ] ) urlRequestHandlerKey ] ;
if ( ! requestHandlerKey
|| ( ! [ requestHandlerKey isEqualToString : GSWDirectActionRequestHandlerKey [ GSWebNamingConv ] ]
&& ! [ requestHandlerKey isEqualToString : GSWDirectActionRequestHandlerKey [ GSWebNamingConvInversed ] ] ) )
2002-07-27 23:48:47 +00:00
{
2004-12-31 14:33:16 +00:00
int requestHandlerPathArrayCount = 0 ;
2003-01-19 15:33:07 +00:00
requestHandlerPathArray = [ self requestHandlerPathArray ] ;
2004-12-31 14:33:16 +00:00
requestHandlerPathArrayCount = [ requestHandlerPathArray count ] ;
if ( requestHandlerPathArrayCount > index )
2002-07-27 23:48:47 +00:00
{
2003-01-19 15:33:07 +00:00
tmpString = [ requestHandlerPathArray objectAtIndex : index ] ;
if ( [ tmpString hasSuffix : GSWPagePSuffix [ GSWebNamingConv ] ] )
{
gswpage = [ tmpString stringByDeletingSuffix : GSWPagePSuffix [ GSWebNamingConv ] ] ;
index + + ;
}
else if ( [ tmpString hasSuffix : GSWPagePSuffix [ GSWebNamingConvInversed ] ] )
{
gswpage = [ tmpString stringByDeletingSuffix : GSWPagePSuffix [ GSWebNamingConvInversed ] ] ;
index + + ;
} ;
2004-12-31 14:33:16 +00:00
if ( requestHandlerPathArrayCount > index )
2002-07-27 23:48:47 +00:00
{
2003-01-19 15:33:07 +00:00
gswsid = [ requestHandlerPathArray objectAtIndex : index ] ;
2002-07-27 23:48:47 +00:00
index + + ;
2003-01-19 15:33:07 +00:00
2004-12-31 14:33:16 +00:00
if ( requestHandlerPathArrayCount > 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 ] ;
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 : @ "." ] ;
if ( [ senderIDParts count ] > 0 )
2002-07-27 23:48:47 +00:00
{
2003-01-19 15:33:07 +00:00
tmpString = [ senderIDParts objectAtIndex : 0 ] ;
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 : @ "." ] ;
if ( tmpString && [ tmpString length ] > 0 )
{
gsweid = tmpString ;
} ;
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 )
2004-09-01 14:49:27 +00:00
[ dict setObject : GSWIntToNSString ( applicationNumber )
2003-01-19 15:33:07 +00:00
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 ] ) ;
} ;
return _uriElements ;
2000-01-22 12:49:49 +00:00
} ;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ( void ) _validateAPI
{
LOGObjectFnNotImplemented ( ) ; // TODOFN
} ;
@ end