mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 15:33:43 +00:00
* GSWeb/Resources/languages.plist
add more languages * GSWeb/GSWHyperlink.m _appendQueryStringToResponse:inContext:requestHandlerPath:htmlEscapeURL: use encodeAsCGIFormValuesEscapeAmpersand: not encodeAsCGIFormValues appendAttributesToResponse:inContext: use _appendQueryStringToResponse:inContext:requestHandlerPath:htmlEscapeURL: not _appendQueryStringToResponse:inContext: * GSWeb/GSWSession.m do not dealloc _autoreleasePool in dealloc This seems to fix * GSWeb/NSDictionary+HTML.h * GSWeb/NSDictionary+HTML.m fix typo in method name encodeAsCGIFormValuesEscapeAmpersand * GSWeb/GSWActionURL.m use _appendQueryStringToResponse:inContext:requestHandlerPath:htmlEscapeURL: not _appendQueryStringToResponse:inContext: * GSWeb/GSWDynamicURLString.m disable NSLog * GSWeb/GSWSessionStore.m _checkInSessionForContext: enable [session _releaseAutoreleasePool] add comment git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@30764 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
416e6cad91
commit
bf698d682f
9 changed files with 240 additions and 60 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
|||
2010-06-16 David Wetzel <dave@turbocat.de>
|
||||
* GSWeb/Resources/languages.plist
|
||||
add more languages
|
||||
* GSWeb/GSWHyperlink.m
|
||||
_appendQueryStringToResponse:inContext:requestHandlerPath:htmlEscapeURL:
|
||||
use encodeAsCGIFormValuesEscapeAmpersand: not encodeAsCGIFormValues
|
||||
appendAttributesToResponse:inContext:
|
||||
use _appendQueryStringToResponse:inContext:requestHandlerPath:htmlEscapeURL:
|
||||
not _appendQueryStringToResponse:inContext:
|
||||
* GSWeb/GSWSession.m
|
||||
do not dealloc _autoreleasePool in dealloc
|
||||
This seems to fix
|
||||
* GSWeb/NSDictionary+HTML.h
|
||||
* GSWeb/NSDictionary+HTML.m
|
||||
fix typo in method name encodeAsCGIFormValuesEscapeAmpersand
|
||||
* GSWeb/GSWActionURL.m
|
||||
use _appendQueryStringToResponse:inContext:requestHandlerPath:htmlEscapeURL:
|
||||
not _appendQueryStringToResponse:inContext:
|
||||
* GSWeb/GSWDynamicURLString.m
|
||||
disable NSLog
|
||||
* GSWeb/GSWSessionStore.m
|
||||
_checkInSessionForContext:
|
||||
enable [session _releaseAutoreleasePool]
|
||||
add comment
|
||||
|
||||
2010-06-13 David Wetzel <dave@turbocat.de>
|
||||
* GSWeb/GSWDeployedBundle.m
|
||||
remove local NSAutoreleasePool
|
||||
|
|
|
@ -72,7 +72,12 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSString * actionURL = [context componentActionURLIsSecure:[self secureInContext:context]];
|
||||
[response appendContentString:actionURL];
|
||||
[self _appendQueryStringToResponse:response inContext: context];
|
||||
|
||||
[self _appendQueryStringToResponse:response
|
||||
inContext:context
|
||||
requestHandlerPath:nil
|
||||
htmlEscapeURL:NO];
|
||||
|
||||
[self _appendFragmentToResponse: response inContext:context];
|
||||
} else {
|
||||
if(url != nil)
|
||||
|
@ -92,16 +97,23 @@ RCS_ID("$Id$")
|
|||
} else {
|
||||
GSWResponse_appendContentString(response,url);
|
||||
}
|
||||
[self _appendQueryStringToResponse:response inContext: context];
|
||||
[self _appendQueryStringToResponse:response
|
||||
inContext:context
|
||||
requestHandlerPath:nil
|
||||
htmlEscapeURL:NO];
|
||||
|
||||
[self _appendFragmentToResponse: response inContext:context];
|
||||
} else {
|
||||
if(_fragmentIdentifier != nil)
|
||||
{
|
||||
fragment = [_fragmentIdentifier valueInComponent:component];
|
||||
if (fragment != nil) {
|
||||
NSLog(@"fragment is kind of class %@", NSStringFromClass([fragment class]));
|
||||
// NSLog(@"fragment is kind of class %@", NSStringFromClass([fragment class]));
|
||||
GSWResponse_appendContentString(response,fragment);
|
||||
[self _appendQueryStringToResponse: response inContext: context requestHandlerPath:@"" htmlEscapeURL:NO];
|
||||
[self _appendQueryStringToResponse:response
|
||||
inContext: context
|
||||
requestHandlerPath:@""
|
||||
htmlEscapeURL:NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -427,7 +427,7 @@ static SEL appendStringSel = NULL;
|
|||
_flags.composed=YES;
|
||||
|
||||
if (([tmpUrl length]==0)) {
|
||||
NSLog(@"%s:cannot parse '%@'", __PRETTY_FUNCTION__, _url);
|
||||
//NSLog(@"%s:cannot parse '%@'", __PRETTY_FUNCTION__, _url);
|
||||
} else {
|
||||
[_url release];
|
||||
_url = [tmpUrl retain];
|
||||
|
|
|
@ -278,8 +278,7 @@ static Class NSStringClass = Nil;
|
|||
inContext: context];
|
||||
|
||||
if ((queryDict != nil) && ([queryDict count] > 0)) {
|
||||
// CHECKME: we should pass htmlEscapeURL to encodeAsCGIFormValues ?? -- dw
|
||||
str = [queryDict encodeAsCGIFormValues];
|
||||
str = [queryDict encodeAsCGIFormValuesEscapeAmpersand:htmlEscapeURL];
|
||||
GSWResponse_appendContentCharacter(response,'?');
|
||||
GSWResponse_appendContentHTMLAttributeValue(response, str);
|
||||
}
|
||||
|
@ -365,7 +364,11 @@ static Class NSStringClass = Nil;
|
|||
if (securestuff) {
|
||||
[context _generateRelativeURLs];
|
||||
}
|
||||
[self _appendQueryStringToResponse:response inContext: context];
|
||||
[self _appendQueryStringToResponse:response
|
||||
inContext:context
|
||||
requestHandlerPath:nil
|
||||
htmlEscapeURL:YES];
|
||||
|
||||
[self _appendFragmentToResponse: response inContext:context];
|
||||
GSWResponse_appendContentCharacter(response,'"');
|
||||
} else {
|
||||
|
@ -387,7 +390,12 @@ static Class NSStringClass = Nil;
|
|||
} else {
|
||||
GSWResponse_appendContentString(response,s1);
|
||||
}
|
||||
[self _appendQueryStringToResponse:response inContext: context];
|
||||
|
||||
[self _appendQueryStringToResponse:response
|
||||
inContext:context
|
||||
requestHandlerPath:nil
|
||||
htmlEscapeURL:YES];
|
||||
|
||||
[self _appendFragmentToResponse: response inContext:context];
|
||||
GSWResponse_appendContentCharacter(response,'"');
|
||||
} else {
|
||||
|
@ -398,7 +406,12 @@ static Class NSStringClass = Nil;
|
|||
GSWResponse_appendContentAsciiString(response,href__Key);
|
||||
GSWResponse_appendContentCharacter(response,'=');
|
||||
GSWResponse_appendContentCharacter(response,'"');
|
||||
[self _appendQueryStringToResponse:response inContext: context];
|
||||
|
||||
[self _appendQueryStringToResponse:response
|
||||
inContext:context
|
||||
requestHandlerPath:nil
|
||||
htmlEscapeURL:YES];
|
||||
|
||||
GSWResponse_appendContentCharacter(response,'#');
|
||||
GSWResponse_appendContentString(response,obj2); // stringValue?
|
||||
GSWResponse_appendContentCharacter(response,'"');
|
||||
|
|
|
@ -65,14 +65,17 @@ extern id gcObjectsToBeVisited;
|
|||
// init
|
||||
-(id)init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
NSNumber *mytimeOutNum = [[GSWApp class] sessionTimeOut];
|
||||
NSTimeInterval mySessionTimeOut = [mytimeOutNum doubleValue];
|
||||
if ((self = [super init]))
|
||||
{
|
||||
NSNumber *mytimeOutNum = [[GSWApp class] sessionTimeOut];
|
||||
NSTimeInterval mySessionTimeOut = [mytimeOutNum doubleValue];
|
||||
|
||||
[self setTimeOut:mySessionTimeOut];
|
||||
[self _initWithSessionID:[[self class] createSessionID]];
|
||||
}
|
||||
_autoreleasePool = nil;
|
||||
|
||||
[self setTimeOut:mySessionTimeOut];
|
||||
[self _initWithSessionID:[[self class] createSessionID]];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -260,7 +263,6 @@ extern id gcObjectsToBeVisited;
|
|||
-(void)dealloc
|
||||
{
|
||||
DESTROY(_sessionID);
|
||||
DESTROY(_autoreleasePool);
|
||||
DESTROY(_contextArrayStack);
|
||||
DESTROY(_contextRecords);
|
||||
DESTROY(_editingContext);
|
||||
|
@ -273,6 +275,9 @@ extern id gcObjectsToBeVisited;
|
|||
DESTROY(_permanentPageCache);
|
||||
DESTROY(_permanentContextIDArray);
|
||||
DESTROY(_domainForIDCookies);
|
||||
// we are NOT destroying the _autoreleasePool here.
|
||||
// this is triggered externally.
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -857,33 +862,25 @@ extern id gcObjectsToBeVisited;
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_releaseAutoreleasePool
|
||||
{
|
||||
//OK
|
||||
// printf("session %p _releaseAutoreleasePool START\n",self);
|
||||
// fprintf(stderr,"session %p _releaseAutoreleasePool START\n",self);
|
||||
//TODO-NOW remettre [GarbageCollector collectGarbages];
|
||||
// printf("session %p _releaseAutoreleasePool after garbage",self);
|
||||
// fprintf(stderr,"session %p _releaseAutoreleasePool after garbage\n",self);
|
||||
DESTROY(_autoreleasePool);
|
||||
// printf("session %p _releaseAutoreleasePool STOP\n",self);
|
||||
// fprintf(stderr,"session %p _releaseAutoreleasePool STOP\n",self);
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_createAutoreleasePool
|
||||
{
|
||||
if (!_autoreleasePool)
|
||||
{
|
||||
_autoreleasePool=[NSAutoreleasePool new];
|
||||
}
|
||||
|
||||
if (!_autoreleasePool)
|
||||
{
|
||||
_autoreleasePool=[NSAutoreleasePool new];
|
||||
} else {
|
||||
[NSException raise:NSInternalInconsistencyException
|
||||
format:@"%s - Can't create an autorelease pool when one already exists.",
|
||||
__PRETTY_FUNCTION__];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWComponent*)_permanentPageWithContextID:(NSString*)aContextID
|
||||
{
|
||||
|
|
|
@ -193,9 +193,10 @@ RCS_ID("$Id$")
|
|||
|
||||
[_timeOutManager updateTimeOutForSessionWithID:sessionID
|
||||
timeOut:sessionTimeOut];
|
||||
|
||||
// why do we do that?
|
||||
//[session _releaseAutoreleasePool];
|
||||
|
||||
// verified with WO 4.5 this is called somewhere in this method
|
||||
// (checkInSessionForContext:)
|
||||
[session _releaseAutoreleasePool];
|
||||
|
||||
[session release];
|
||||
session = nil;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
@interface NSDictionary (HTML)
|
||||
- (NSString*) encodeAsCGIFormValues;
|
||||
- (NSString*) encodeAsCGIFormValuesEscpaeAmpersand:(BOOL) doEscapeAmpersand;
|
||||
- (NSString*) encodeAsCGIFormValuesEscapeAmpersand:(BOOL) doEscapeAmpersand;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ static NSMutableArray* _encodeAsCGIFormValuesInDictionaryUsingEncoding(NSDiction
|
|||
}
|
||||
|
||||
// encodeAsCGIFormValues
|
||||
- (NSString*) encodeAsCGIFormValuesEscpaeAmpersand:(BOOL) doEscapeAmpersand
|
||||
- (NSString*) encodeAsCGIFormValuesEscapeAmpersand:(BOOL) doEscapeAmpersand
|
||||
{
|
||||
NSMutableArray * stringArray = nil;
|
||||
NSString * encodingStr = [self objectForKey:@"WOURLEncoding"];
|
||||
|
|
|
@ -1,26 +1,158 @@
|
|||
{
|
||||
"FR" = "French";
|
||||
"FR-FR" = "French";
|
||||
"fr-ca" = "French";
|
||||
"EN" = "English";
|
||||
"de-at" = "German";
|
||||
"de-ch" = "German";
|
||||
"de-de" = "German";
|
||||
"de-li" = "German";
|
||||
"de-lu" = "German";
|
||||
"en-ca" = "English";
|
||||
"en-en" = "English";
|
||||
"en-us" = "English";
|
||||
"en-ca" = "English";
|
||||
"ES" = "Spanish";
|
||||
"DE-DE" = "German";
|
||||
"DE-AT" = "German";
|
||||
"DE" = "German";
|
||||
"de-ch" = "German";
|
||||
"de-lu" = "German";
|
||||
"de-li" = "German";
|
||||
"nl" = "Dutch";
|
||||
"it" = "Italian";
|
||||
"ja" = "Japanese";
|
||||
"ko" = "Korean";
|
||||
"pl" = "Polish";
|
||||
"ro" = "Romanian";
|
||||
"fr-ca" = "French";
|
||||
"fr-fr" = "French";
|
||||
"zh-cn" = "Chinese";
|
||||
"zh-tw" = "Chinese";
|
||||
"zh-sg" = "Chinese";
|
||||
"cz" = "Czech";
|
||||
"zh-tw" = "Chinese";
|
||||
|
||||
"aa" = "Afar";
|
||||
"ab" = "Abkhazian";
|
||||
"af" = "Afrikaans";
|
||||
"am" = "Amharic";
|
||||
"ar" = "Arabic";
|
||||
"as" = "Assamese";
|
||||
"ay" = "Aymara";
|
||||
"az" = "Azerbaijani";
|
||||
"ba" = "Bashkir";
|
||||
"be" = "Byelorussian";
|
||||
"bg" = "Bulgarian";
|
||||
"bh" = "Bihari";
|
||||
"bi" = "Bislama";
|
||||
"bn" = "Bengali";
|
||||
"bo" = "Tibetan";
|
||||
"br" = "Breton";
|
||||
"ca" = "Catalan";
|
||||
"co" = "Corsican";
|
||||
"cs" = "Czech";
|
||||
"cy" = "Welsh";
|
||||
"da" = "Danish";
|
||||
"de" = "German";
|
||||
"dz" = "Bhutani";
|
||||
"el" = "Greek";
|
||||
"en" = "English";
|
||||
"eo" = "Esperanto";
|
||||
"es" = "Spanish";
|
||||
"et" = "Estonian";
|
||||
"eu" = "Basque";
|
||||
"fa" = "Persian";
|
||||
"fi" = "Finnish";
|
||||
"fj" = "Fiji";
|
||||
"fo" = "Faeroese";
|
||||
"fr" = "French";
|
||||
"fy" = "Frisian";
|
||||
"ga" = "Irish";
|
||||
"gd" = "ScotsGaelic";
|
||||
"gl" = "Galician";
|
||||
"gn" = "Guarani";
|
||||
"gu" = "Gujarati";
|
||||
"ha" = "Hausa";
|
||||
"he" = "Hebrew";
|
||||
"hi" = "Hindi";
|
||||
"hr" = "Croatian";
|
||||
"hu" = "Hungarian";
|
||||
"hy" = "Armenian";
|
||||
"ia" = "Interlingua";
|
||||
"id" = "Indonesian";
|
||||
"ie" = "Interlingue";
|
||||
"ik" = "Inupiak";
|
||||
"in" = "Indonesian";
|
||||
"is" = "Icelandic";
|
||||
"it" = "Italian";
|
||||
"iu" = "Inuktitut";
|
||||
"iw" = "Hebrew";
|
||||
"ja" = "Japanese";
|
||||
"ji" = "Yiddish";
|
||||
"jw" = "Javanese";
|
||||
"ka" = "Georgian";
|
||||
"kk" = "Kazakh";
|
||||
"kl" = "Greenlandic";
|
||||
"km" = "Cambodian";
|
||||
"kn" = "Kannada";
|
||||
"ko" = "Korean";
|
||||
"ks" = "Kashmiri";
|
||||
"ku" = "Kurdish";
|
||||
"ky" = "Kirghiz";
|
||||
"la" = "Latin";
|
||||
"ln" = "Lingala";
|
||||
"lo" = "Laothian";
|
||||
"lt" = "Lithuanian";
|
||||
"lv" = "Latvian";
|
||||
"mg" = "Malagasy";
|
||||
"mi" = "Maori";
|
||||
"mk" = "Macedonian";
|
||||
"ml" = "Malayalam";
|
||||
"mn" = "Mongolian";
|
||||
"mo" = "Moldavian";
|
||||
"mr" = "Marathi";
|
||||
"ms" = "Malay";
|
||||
"mt" = "Maltese";
|
||||
"my" = "Burmese";
|
||||
"na" = "Nauru";
|
||||
"ne" = "Nepali";
|
||||
"nl" = "Dutch";
|
||||
"no" = "Norwegian";
|
||||
"oc" = "Occitan";
|
||||
"om" = "Oromo";
|
||||
"or" = "Oriya";
|
||||
"pa" = "Punjabi";
|
||||
"pl" = "Polish";
|
||||
"ps" = "Pashto";
|
||||
"pt" = "Portuguese";
|
||||
"qu" = "Quechua";
|
||||
"rm" = "RhaetoRomance";
|
||||
"rn" = "Kirundi";
|
||||
"ro" = "Romanian";
|
||||
"ru" = "Russian";
|
||||
"rw" = "Kinyarwanda";
|
||||
"sa" = "Sanskrit";
|
||||
"sd" = "Sindhi";
|
||||
"sg" = "Sangro";
|
||||
"sh" = "SerboCroatian";
|
||||
"si" = "Singhalese";
|
||||
"sk" = "Slovak";
|
||||
"sl" = "Slovenian";
|
||||
"sm" = "Samoan";
|
||||
"sn" = "Shona";
|
||||
"so" = "Somali";
|
||||
"sq" = "Albanian";
|
||||
"sr" = "Serbian";
|
||||
"ss" = "Siswati";
|
||||
"st" = "Sesotho";
|
||||
"su" = "Sundanese";
|
||||
"sv" = "Swedish";
|
||||
"sw" = "Swahili";
|
||||
"ta" = "Tamil";
|
||||
"te" = "Tegulu";
|
||||
"tg" = "Tajik";
|
||||
"th" = "Thai";
|
||||
"ti" = "Tigrinya";
|
||||
"tk" = "Turkmen";
|
||||
"tl" = "Tagalog";
|
||||
"tn" = "Setswana";
|
||||
"to" = "Tonga";
|
||||
"tr" = "Turkish";
|
||||
"ts" = "Tsonga";
|
||||
"tt" = "Tatar";
|
||||
"tw" = "Twi";
|
||||
"ug" = "Uigur";
|
||||
"uk" = "Ukrainian";
|
||||
"ur" = "Urdu";
|
||||
"uz" = "Uzbek";
|
||||
"vi" = "Vietnamese";
|
||||
"vo" = "Volapuk";
|
||||
"wo" = "Wolof";
|
||||
"xh" = "Xhosa";
|
||||
"yi" = "Yiddish";
|
||||
"yo" = "Yoruba";
|
||||
"za" = "Zhuang";
|
||||
"zh" = "Chinese";
|
||||
"zu" = "Zulu";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue