Overview
Comment: | Add support for file:// to OFURL. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
245f519a50cfe4368a785e44a0e7a5f5 |
User & Date: | js on 2011-02-17 17:23:44 |
Other Links: | manifest | tags |
Context
2011-02-17
| ||
18:29 | Add -[stringWithContentsOfURL:encoding:]. check-in: d932adccc3 user: js tags: trunk | |
17:23 | Add support for file:// to OFURL. check-in: 245f519a50 user: js tags: trunk | |
17:12 | Add more -W flags. check-in: 797e00a919 user: js tags: trunk | |
Changes
Modified src/OFURL.m from [2d664c10f0] to [ef4737e3c3].
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + + + + - + | if ((str_c2 = strdup([str cString])) == NULL) @throw [OFOutOfMemoryException newWithClass: isa requestedSize: [str cStringLength]]; str_c = str_c2; if (!strncmp(str_c, "file://", 7)) { scheme = @"file"; path = [[OFString alloc] initWithCString: str_c + 7]; return self; |
︙ | |||
479 480 481 482 483 484 485 486 487 488 489 490 491 492 | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 | + + + + + | } - (OFString*)description { OFMutableString *desc = [OFMutableString stringWithFormat: @"%@://", scheme]; BOOL needPort = YES; if ([scheme isEqual: @"file"]) { [desc appendString: path]; return desc; } if (user != nil && password != nil) [desc appendFormat: @"%@:%@@", user, password]; else if (user != nil) [desc appendFormat: @"%@@", user]; [desc appendString: host]; |
︙ |
Modified tests/OFURLTests.m from [7e19b927ee] to [8cc6f93e13].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + + - + + - - - - + + + + + + - - - - + + + + + + + | { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFURL *u1, *u2, *u3, *u4; TEST(@"+[URLWithString:]", R(u1 = [OFURL URLWithString: url_str]) && R(u2 = [OFURL URLWithString: @"http://foo:80"]) && |
︙ |