+2008-02-15 Helge Hess <helge.hess@opengroupware.org>
+
+ * WOCookie.m: fixed bug pointed out by Stephane, use -UTF8String to
+ decode the cookie (was -cString) (v4.7.21)
+
2008-02-05 Helge Hess <helge.hess@opengroupware.org>
* DynamicElements/_WOComplexHyperlink.m: use NO, not 'false', as
/*
- Copyright (C) 2000-2005 SKYRIX Software AG
+ Copyright (C) 2000-2008 SKYRIX Software AG
This file is part of SOPE.
+ (id)cookieWithString:(NSString *)_string {
/* private method ! */
- return _parseCookie([_string cString], [_string cStringLength]);
+ const char *utf8 = [_string UTF8String];
+ if (utf8 == NULL) return nil;
+ return _parseCookie(utf8, strlen(utf8));
}
+ (id)cookieWithName:(NSString *)_name value:(NSString *)_value {
expires:(NSDate *)_date
isSecure:(BOOL)_secure
{
- if ((self = [super init])) {
+ if ((self = [super init]) != nil) {
NSZone *z = [self zone];
self->name = [_name copyWithZone:z];
self->value = [_value copyWithZone:z];
self->path = [_path copyWithZone:z];
self->domainName = [_domain copyWithZone:z];
- self->expireDate = [expireDate retain];
+ self->expireDate = [_date retain]; // TBD: should be copy?
self->onlyIfSecure = _secure;
}
return self;