︙ | | |
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
-
-
+
+
+
|
if ((tmp = strchr(str_c, ';')) != NULL) {
*tmp = '\0';
parameters = [[OFString alloc]
initWithCString: tmp + 1];
}
path = [[OFString alloc] initWithCString: str_c];
}
path = [[OFString alloc] initWithFormat: @"/%s", str_c];
} else
path = @"";
} @catch (id e) {
[self release];
@throw e;
} @finally {
free(str_c2);
}
|
︙ | | |
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
-
+
|
if ((tmp = strchr(str_c, ';')) != NULL) {
*tmp = '\0';
parameters = [[OFString alloc]
initWithCString: tmp + 1];
}
if (*str_c == '/')
path = [[OFString alloc] initWithCString: str_c + 1];
path = [[OFString alloc] initWithCString: str_c];
else {
OFAutoreleasePool *pool;
OFString *s;
pool = [[OFAutoreleasePool alloc] init];
if ([url->path hasSuffix: @"/"])
|
︙ | | |
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
|
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
|
-
+
+
+
+
+
+
+
+
|
- (OFString*)path
{
return [[path copy] autorelease];
}
- (void)setPath: (OFString*)path_
{
OFString *old = path;
OFString *old;
if (([scheme isEqual: @"http"] || [scheme isEqual: @"https"]) &&
![path_ hasPrefix: @"/"])
@throw [OFInvalidArgumentException newWithClass: isa
selector: _cmd];
old = path;
path = [path_ copy];
[old release];
}
- (OFString*)parameters
{
return [[parameters copy] autorelease];
|
︙ | | |
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
|
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
|
-
-
+
|
if (([scheme isEqual: @"http"] && port == 80) ||
([scheme isEqual: @"https"] && port == 443))
needPort = NO;
if (needPort)
[desc appendFormat: @":%d", port];
if (path != nil)
[desc appendFormat: @"/%@", path];
[desc appendString: path];
if (parameters != nil)
[desc appendFormat: @";%@", parameters];
if (query != nil)
[desc appendFormat: @"?%@", query];
|
︙ | | |