mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-23 11:41:20 +00:00
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
104 lines
2.9 KiB
Objective-C
104 lines
2.9 KiB
Objective-C
/** GSWHTMLComment.m - <title>GSWeb: Class GSWRequest</title>
|
|
|
|
Copyright (C) 1999-2003 Free Software Foundation, Inc.
|
|
|
|
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
|
Date: Sept 1999
|
|
|
|
$Revision$
|
|
$Date$
|
|
|
|
This file is part of the GNUstep Web Library.
|
|
|
|
<license>
|
|
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.
|
|
</license>
|
|
**/
|
|
|
|
#include "config.h"
|
|
|
|
RCS_ID("$Id$")
|
|
|
|
#include "GSWeb.h"
|
|
|
|
//====================================================================
|
|
@implementation GSWHTMLComment
|
|
|
|
//--------------------------------------------------------------------
|
|
-(id)init
|
|
{
|
|
if ((self=[super init]))
|
|
{
|
|
_encoding = [GSWMessage defaultEncoding];
|
|
};
|
|
return self;
|
|
};
|
|
|
|
//--------------------------------------------------------------------
|
|
-(id)initWithString:(NSString*)aString
|
|
{
|
|
if ((self=[self init]))
|
|
{
|
|
ASSIGN(_string,aString);
|
|
};
|
|
return self;
|
|
};
|
|
|
|
//--------------------------------------------------------------------
|
|
-(void)dealloc
|
|
{
|
|
DESTROY(_string);
|
|
DESTROY(_data);
|
|
[super dealloc];
|
|
}
|
|
|
|
//--------------------------------------------------------------------
|
|
-(NSString*)description
|
|
{
|
|
return [NSString stringWithFormat:@"<%s %p - String:[%@]>",
|
|
object_get_class_name(self),
|
|
(void*)self,
|
|
_string];
|
|
};
|
|
|
|
@end
|
|
|
|
//====================================================================
|
|
@implementation GSWHTMLComment (GSWHTMLCommentA)
|
|
|
|
//--------------------------------------------------------------------
|
|
-(void)appendToResponse:(GSWResponse*)aResponse
|
|
inContext:(GSWContext*)aContext
|
|
{
|
|
LOGObjectFnStart();
|
|
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[aContext elementID]);
|
|
[aResponse _appendContentAsciiString:@"<!--"];
|
|
[aResponse _appendContentAsciiString:_string];
|
|
[aResponse _appendContentAsciiString:@"-->"];
|
|
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[aContext elementID]);
|
|
LOGObjectFnStop();
|
|
};
|
|
|
|
@end
|
|
|
|
//====================================================================
|
|
@implementation GSWHTMLComment (GSWHTMLCommentB)
|
|
|
|
//--------------------------------------------------------------------
|
|
+(id)elementWithString:(NSString*)aString
|
|
{
|
|
return [[[GSWHTMLComment alloc]initWithString:aString] autorelease];
|
|
};
|
|
@end
|