Differences From Artifact [e499272015]:
- File
utils/ofhttp/OFHTTP.m
— part of check-in
[b6ee372b98]
at
2020-08-11 19:45:36
on branch trunk
— OFString: Rework number parsing API
This solves the old signed vs. unsigned problem and allows for more
bases than just 8, 10 and 16, as well as auto-detection of the base (if
base is 0). (user: js, size: 28612) [annotate] [blame] [check-ins using]
To Artifact [636026cd3b]:
- File
utils/ofhttp/OFHTTP.m
— part of check-in
[d74f244ab7]
at
2020-08-12 20:56:32
on branch trunk
— Avoid using (u)intmax_t in methods
It is not guaranteed that a type encoding for it exists. (user: js, size: 28644) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
330 331 332 333 334 335 336 | if ([path isEqual: @"-"]) _body = [of_stdin copy]; else { _body = [[OFFile alloc] initWithPath: path mode: @"r"]; @try { | > | | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | if ([path isEqual: @"-"]) _body = [of_stdin copy]; else { _body = [[OFFile alloc] initWithPath: path mode: @"r"]; @try { unsigned long long fileSize = [[OFFileManager defaultManager] attributesOfItemAtPath: path].fileSize; contentLength = [OFString stringWithFormat: @"%ju", fileSize]; [_clientHeaders setObject: contentLength forKey: @"Content-Length"]; } @catch (OFRetrieveItemAttributesFailedException *e) { |
︙ | ︙ | |||
1006 1007 1008 1009 1010 1011 1012 | _currentFileName = [_outputPath copy]; if (_currentFileName == nil) _currentFileName = [URL.path.lastPathComponent copy]; if (_continue) { @try { | > | | 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 | _currentFileName = [_outputPath copy]; if (_currentFileName == nil) _currentFileName = [URL.path.lastPathComponent copy]; if (_continue) { @try { unsigned long long size = [[OFFileManager defaultManager] attributesOfItemAtPath: _currentFileName].fileSize; OFString *range; if (size > ULLONG_MAX) @throw [OFOutOfRangeException exception]; _resumedFrom = (unsigned long long)size; |
︙ | ︙ |