2004-09-23 Helge Hess <helge.hess@skyrix.com>
+
+ * v4.3.43
+ * WOCoreApplication.m: improved handling of WOPort default (detect
+ numeric ports)
+
+ * Defaults.plist: changed default WOPort value from '"*:20000"' to
+ just 20000 (which is the same like *:20000' but compatible to WO)
+
+ * WOHttpAdaptor/WOHttpAdaptor.m: for numberic WOPort's, retrieve the
+ port from the WOApplication object
+
* WOCoreApplication.m: use NGResourceLocator to determine search pathes
(v4.3.42)
WOPageRequestHandlerDebugEnabled = NO;
WOParsersUseUTF8 = NO;
WOPermanentPageCacheSize = 30;
- WOPort = "*:20000";
+ WOPort = 20000;
WOProfileApplication = NO;
WOProfileComponents = NO;
WOProfileDirectActionRequestHandler = NO;
/*
- Copyright (C) 2000-2003 SKYRIX Software AG
+ Copyright (C) 2000-2004 SKYRIX Software AG
- This file is part of OGo
+ This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#ifndef __NGHttp_NGHttpMessage_H__
#define __NGHttp_NGHttpMessage_H__
# version file
-SUBMINOR_VERSION:=42
+SUBMINOR_VERSION:=43
# v4.3.42 requires libNGExtensions v4.3.116
# v4.3.40 requires libNGExtensions v4.3.115
apath = [self findNGObjWebResource:@"Defaults" ofType:@"plist"];
if (apath == nil)
NSLog(@"ERROR: cannot find Defaults.plist resource of NGObjWeb library!");
+#if HEAVY_DEBUG
+ else
+ NSLog(@"Note: loading default defaults: %@", apath);
+#endif
owDefaults = [NSDictionary dictionaryWithContentsOfFile:apath];
if (owDefaults) {
woport = [[self userDefaults] objectForKey:@"WOPort"];
if ([woport isKindOfClass:[NSNumber class]])
return woport;
-
woport = [woport stringValue];
+ if ([woport length] > 0 && isdigit([woport characterAtIndex:0]))
+ return [NSNumber numberWithInt:[woport intValue]];
+
addr = NGSocketAddressFromString(woport);
if ([addr isKindOfClass:[NGInternetSocketAddress class]])
return [NSNumber numberWithInt:[(NGInternetSocketAddress *)addr port]];
-
+
+ NSLog(@"GOT NO PORT FOR ADDR: %@ (%@)", addr, woport);
return nil;
}
@end
+@interface WOCoreApplication(Port)
+- (NSNumber *)port;
+@end
+
@implementation WOHttpAdaptor
static BOOL WOHttpAdaptor_LogStream = NO;
#endif
if ([_args count] < 1) {
- NSString *arg;
const char *cstr;
- arg = WOPort;
-
self->address = nil;
- if ([arg isEqualToString:@"auto"]) {
+ if ([WOPort isEqualToString:@"auto"])
self->address = [self autoBindAddress];
- }
- if ((self->address == nil) && (cstr = [arg cString])) {
+ if ((self->address == nil) && ((cstr = [WOPort cString]) != NULL)) {
if (isdigit(*cstr)) {
+ NSNumber *p;
+
+ p = [(WOCoreApplication *)[_application class] port];
+ if (p == nil) p = (id)WOPort;
+
self->address =
- [NGInternetSocketAddress wildcardAddressWithPort:[arg intValue]];
+ [NGInternetSocketAddress wildcardAddressWithPort:[p intValue]];
}
}
if (self->address == nil)
- self->address = NGSocketAddressFromString(arg);
+ self->address = NGSocketAddressFromString(WOPort);
}
else {
NSString *arg = nil;
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include "WOSimpleHTTPParser.h"
#include <NGObjWeb/WOResponse.h>