ObjFW  Diff

Differences From Artifact [ee6a333bc6]:

To Artifact [ef24e84f97]:


53
54
55
56
57
58
59
60
61


62
63
64
65
66
67

68
69

70
71
72
73
74
75
76
53
54
55
56
57
58
59


60
61
62
63
64
65
66

67
68

69
70
71
72
73
74
75
76







-
-
+
+





-
+

-
+







}

@implementation OFHTTPCookie
@synthesize name = _name, value = _value, expires = _expires, domain = _domain;
@synthesize path = _path, secure = _secure, HTTPOnly = _HTTPOnly;
@synthesize extensions = _extensions;

+ (instancetype)cookieWithName: (OFString*)name
			 value: (OFString*)value
+ (instancetype)cookieWithName: (OFString *)name
			 value: (OFString *)value
{
	return [[[self alloc] initWithName: name
				     value: value] autorelease];
}

+ (OFArray OF_GENERIC(OFHTTPCookie*)*)cookiesForString: (OFString*)string
+ (OFArray OF_GENERIC(OFHTTPCookie *) *)cookiesForString: (OFString *)string
{
	OFMutableArray OF_GENERIC(OFHTTPCookie*) *ret = [OFMutableArray array];
	OFMutableArray OF_GENERIC(OFHTTPCookie *) *ret = [OFMutableArray array];
	void *pool = objc_autoreleasePoolPush();
	const of_unichar_t *characters = [string characters];
	size_t length = [string length], last = 0;
	enum {
		STATE_PRE_NAME,
		STATE_NAME,
		STATE_EXPECT_VALUE,
245
246
247
248
249
250
251
252
253


254
255
256
257
258
259
260
245
246
247
248
249
250
251


252
253
254
255
256
257
258
259
260







-
-
+
+







}

- init
{
	OF_INVALID_INIT_METHOD
}

- initWithName: (OFString*)name
	 value: (OFString*)value
- initWithName: (OFString *)name
	 value: (OFString *)value
{
	self = [super init];

	@try {
		_name = [name copy];
		_value = [value copy];
		_extensions = [[OFMutableArray alloc] init];
343
344
345
346
347
348
349
350

351
352
353
354
355
356
357
343
344
345
346
347
348
349

350
351
352
353
354
355
356
357







-
+







		[copy release];
		@throw e;
	}

	return copy;
}

- (OFString*)description
- (OFString *)description
{
	OFMutableString *ret = [OFMutableString
	    stringWithFormat: @"%@=%@", _name, _value];
	void *pool = objc_autoreleasePoolPush();

	if (_expires != nil)
		[ret appendString: