Overview
Comment: | OFURL: Allow all RFC 1808 compatible schemes |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
65afbedbd40aade681832780347509fd |
User & Date: | js on 2014-07-07 22:28:00 |
Other Links: | manifest | tags |
Context
2014-07-10
| ||
07:35 | OFHTTPClient: Minor improvements check-in: 4b8c4cac59 user: js tags: trunk | |
2014-07-07
| ||
22:28 | OFURL: Allow all RFC 1808 compatible schemes check-in: 65afbedbd4 user: js tags: trunk | |
22:05 | Add OFUnknownXMLEntityException check-in: 6e5a920567 user: js tags: trunk | |
Changes
Modified src/OFDataArray.m from [e58d501e5e] to [41037dbb74].
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - - - - - - + - - + + + - - - + - - - + - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + + + - + | return self; } #endif - initWithContentsOfURL: (OFURL*)URL { void *pool; |
︙ |
Modified src/OFHTTPClient.m from [ab4c72054a] to [7e8bacfd9a].
︙ | |||
557 558 559 560 561 562 563 564 565 566 567 | 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 | + - + | [response setKeepAlive: true]; _socket = [socket retain]; _lastURL = [URL copy]; _lastResponse = [response retain]; } /* FIXME: Case-insensitive check of redirect's scheme */ if (redirects > 0 && (status == 301 || status == 302 || status == 303 || status == 307) && (redirect = [serverHeaders objectForKey: @"Location"]) != nil && (_insecureRedirectsAllowed || [scheme isEqual: @"http"] || |
︙ |
Modified src/OFString.m from [c9e153f6dd] to [1c567dbe1d].
︙ | |||
874 875 876 877 878 879 880 | 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | - - - - - - + - - - + + + - - - + - - - + - - - + + + + + + - - - - + + + + - + - - - + + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - + + + + + - - - - + + + + - + | encoding: OF_STRING_ENCODING_AUTODETECT]; } - initWithContentsOfURL: (OFURL*)URL encoding: (of_string_encoding_t)encoding { void *pool; |
︙ |
Modified src/OFURL.m from [2209074f5b] to [5ebb65d404].
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + | * file. */ #include "config.h" #include <stdlib.h> #include <string.h> #include <ctype.h> #import "OFURL.h" #import "OFString.h" #import "OFArray.h" #import "OFXMLElement.h" #import "OFInvalidArgumentException.h" |
︙ | |||
53 54 55 56 57 58 59 | 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 81 82 83 84 85 86 87 88 89 | - - + + + + - - - - + + + + + + - - - - - - - - + + + + + + + + - + | self = [super init]; @try { char *tmp, *tmp2; if ((UTF8String2 = of_strdup([string UTF8String])) == NULL) @throw [OFOutOfMemoryException |
︙ | |||
116 117 118 119 120 121 122 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | - - - - - + + | portString = [OFString stringWithUTF8String: tmp2]; if ([portString decimalValue] > 65535) @throw [OFInvalidFormatException exception]; _port = [portString decimalValue]; |
︙ | |||
362 363 364 365 366 367 368 | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | - - - | - (OFString*)scheme { OF_GETTER(_scheme, true) } - (void)setScheme: (OFString*)scheme { |
︙ | |||
415 416 417 418 419 420 421 | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | - - - - | - (OFString*)path { OF_GETTER(_path, true) } - (void)setPath: (OFString*)path { |
︙ | |||
473 474 475 476 477 478 479 | 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - + + | else if (_user != nil) [ret appendFormat: @"%@@", _user]; if (_host != nil) [ret appendString: _host]; if (([_scheme isEqual: @"http"] && _port != 80) || |
︙ |
Modified tests/OFURLTests.m from [d80e8f78e3] to [364e1aed63].
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + - - - | TEST(@"-[query]", [[u1 query] isEqual: @"q"] && [u4 query] == nil) TEST(@"-[fragment]", [[u1 fragment] isEqual: @"f"] && [u4 fragment] == nil) TEST(@"-[copy]", R(u4 = [[u1 copy] autorelease])) TEST(@"-[isEqual:]", [u1 isEqual: u4] && ![u2 isEqual: u3] && |