Differences From Artifact [ad2a18a279]:
- File
src/OFHTTPClient.m
— part of check-in
[58d4025602]
at
2016-01-05 14:10:52
on branch trunk
— Better randomization of HTTP header order
This should randomize the order of all headers now, preventing
fingerprinting by the order of HTTP headers. (user: js, size: 17164) [annotate] [blame] [check-ins using]
To Artifact [c0960d74b1]:
- File
src/OFHTTPClient.m
— part of check-in
[b9c811a236]
at
2016-01-05 14:58:01
on branch trunk
— OFHTTPClient: Allow override of all headers
This makes it possible for the user to override Authorization and
Connection. (user: js, size: 17275) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
392 393 394 395 396 397 398 | } else [headers setObject: [URL host] forKey: @"Host"]; user = [URL user]; password = [URL password]; | | > | 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | } else [headers setObject: [URL host] forKey: @"Host"]; user = [URL user]; password = [URL password]; if (([user length] > 0 || [password length] > 0) && [headers objectForKey: @"Authorization"] == nil) { OFDataArray *authorizationData = [OFDataArray dataArray]; OFString *authorization; [authorizationData addItems: [user UTF8String] count: [user UTF8StringLength]]; [authorizationData addItem: ":"]; [authorizationData addItems: [password UTF8String] |
︙ | ︙ | |||
430 431 432 433 434 435 436 | if ([headers objectForKey: @"Content-Type"] == nil) [headers setObject: @"application/x-www-form-" @"urlencoded; charset=UTF-8" forKey: @"Content-Type"]; } if ([request protocolVersion].major == 1 && | | > | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | if ([headers objectForKey: @"Content-Type"] == nil) [headers setObject: @"application/x-www-form-" @"urlencoded; charset=UTF-8" forKey: @"Content-Type"]; } if ([request protocolVersion].major == 1 && [request protocolVersion].minor == 0 && [headers objectForKey: @"Connection"] == nil) [headers setObject: @"keep-alive" forKey: @"Connection"]; keyEnumerator = [headers keyEnumerator]; objectEnumerator = [headers objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && |
︙ | ︙ |