Differences From Artifact [64f6fe7e2e]:
- File utils/ofhttp/OFHTTP.m — part of check-in [53e3ae1e45] at 2019-03-12 23:20:17 on branch trunk — utils: Use dot syntax (user: js, size: 26737) [annotate] [blame] [check-ins using]
To Artifact [6159de2c20]:
- File
utils/ofhttp/OFHTTP.m
— part of check-in
[a7872e1065]
at
2019-03-18 21:27:20
on branch trunk
— ofhttp: Only print HEAD request for -O with -v
This also fixes trying to print the name when it has not been detected
yet. (user: js, size: 26791) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
763 764 765 766 767 768 769 | void *pool = objc_autoreleasePoolPush(); OFEnumerator OF_GENERIC(OFString *) *keyEnumerator = [headers keyEnumerator]; OFEnumerator OF_GENERIC(OFString *) *objectEnumerator = [headers objectEnumerator]; OFString *key, *object; | | | | 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 |
void *pool = objc_autoreleasePoolPush();
OFEnumerator OF_GENERIC(OFString *) *keyEnumerator =
[headers keyEnumerator];
OFEnumerator OF_GENERIC(OFString *) *objectEnumerator =
[headers objectEnumerator];
OFString *key, *object;
if (statusCode / 100 == 2 && _currentFileName != nil) {
[of_stdout writeString: @" "];
[of_stdout writeLine: OF_LOCALIZED(
@"info_name_unaligned",
@"Name: %[name]",
@"name", _currentFileName)];
}
while ((key = [keyEnumerator nextObject]) != nil &&
(object = [objectEnumerator nextObject]) != nil)
[of_stdout writeFormat: @" %@: %@\n",
key, object];
objc_autoreleasePoolPop(pool);
} else if (statusCode / 100 == 2 && !_detectFileNameRequest) {
[of_stdout writeString: @" "];
[of_stdout writeLine: OF_LOCALIZED(@"info_name",
@"Name: %[name]",
@"name", _currentFileName)];
[of_stdout writeString: @" "];
[of_stdout writeLine: OF_LOCALIZED(@"info_type",
@"Type: %[type]",
|
| ︙ | ︙ |