Differences From Artifact [2d1b69a80f]:
- File src/OFHTTPRequest.m — part of check-in [a013a9d577] at 2020-03-22 16:15:08 on branch trunk — ofhttp: Allow all request methods (user: js, size: 6166) [annotate] [blame] [check-ins using] [more...]
To Artifact [a65b94e9ae]:
- File
src/OFHTTPRequest.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: 6168) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
210 211 212 213 214 215 216 |
return _protocolVersion;
}
- (void)setProtocolVersionString: (OFString *)string
{
void *pool = objc_autoreleasePoolPush();
OFArray *components = [string componentsSeparatedByString: @"."];
| | | | | | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
return _protocolVersion;
}
- (void)setProtocolVersionString: (OFString *)string
{
void *pool = objc_autoreleasePoolPush();
OFArray *components = [string componentsSeparatedByString: @"."];
unsigned long long major, minor;
of_http_request_protocol_version_t protocolVersion;
if (components.count != 2)
@throw [OFInvalidFormatException exception];
major = [components.firstObject unsignedLongLongValue];
minor = [components.lastObject unsignedLongLongValue];
if (major > UINT8_MAX || minor > UINT8_MAX)
@throw [OFOutOfRangeException exception];
protocolVersion.major = (uint8_t)major;
protocolVersion.minor = (uint8_t)minor;
self.protocolVersion = protocolVersion;
|
| ︙ | ︙ |