Overview
Comment: | Better randomization of HTTP header order
This should randomize the order of all headers now, preventing |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
58d4025602a056482d499aae532513ee |
User & Date: | js on 2016-01-05 14:10:52 |
Other Links: | manifest | tags |
Context
2016-01-05
| ||
14:55 | OFHTTPServer: Allow setting name to nil check-in: 6b4d138cc3 user: js tags: trunk | |
14:10 | Better randomization of HTTP header order check-in: 58d4025602 user: js tags: trunk | |
2016-01-03
| ||
01:14 | Make more use of fast enumeration check-in: cb0fd980f9 user: js tags: trunk | |
Changes
Modified src/OFHTTPClient.m from [f0a87a8790] to [ad2a18a279].
︙ | |||
309 310 311 312 313 314 315 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | - + - + | { void *pool = objc_autoreleasePoolPush(); OFURL *URL = [request URL]; OFString *scheme = [URL scheme]; of_http_request_method_t method = [request method]; OFMutableString *requestString; OFString *user, *password; |
︙ | |||
373 374 375 376 377 378 379 380 381 | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | + + + + - - - - - + + + + + + + + + - + + - - - - - + + + + + + + - - - + + + - - - + + + - - + + - - + + + + + - - - + + + + + + + + - - - - | of_http_request_method_to_string(method), [URL path], [URL query], [request protocolVersionString]]; else requestString = [OFMutableString stringWithFormat: @"%s /%@ HTTP/%@\r\n", of_http_request_method_to_string(method), [URL path], [request protocolVersionString]]; headers = [[[request headers] mutableCopy] autorelease]; if (headers == nil) headers = [OFMutableDictionary dictionary]; if (([scheme isEqual: @"http"] && [URL port] != 80) || |
︙ |
Modified src/OFHTTPServer.m from [9cfe1fbff0] to [5b5e9e2174].
︙ | |||
203 204 205 206 207 208 209 | 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 243 244 245 246 247 248 | - + - - + - - - - + + + + + + + + + + + + + + + - - + + - - + - + | [super dealloc]; } - (void)OF_sendHeaders { void *pool = objc_autoreleasePoolPush(); |
︙ | |||
654 655 656 657 658 659 660 | 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | - + | } - init { self = [super init]; _name = @"OFHTTPServer (ObjFW's HTTP server class " |
︙ |
Modified tests/OFHTTPClientTests.m from [d1280b74ae] to [b7f6ba3e3b].
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + - - + + | [cond unlock]; client = [listener accept]; if (![[client readLine] isEqual: @"GET /foo HTTP/1.1"]) OF_ENSURE(0); |
︙ | |||
84 85 86 87 88 89 90 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - + - + - + | @end @implementation TestsAppDelegate (OFHTTPClientTests) - (void)HTTPClientTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; HTTPClientTestsServer *server; |
︙ |