Differences From Artifact [2c42d95890]:
- File
src/OFHTTPResponse.m
— part of check-in
[6e42ee482f]
at
2020-10-10 10:58:30
on branch trunk
— Make HTTP status code consistently a short
It used to be a short in some places and an int in other places. (user: js, size: 8311) [annotate] [blame] [check-ins using]
To Artifact [4e1a4b346b]:
- File src/OFHTTPResponse.m — part of check-in [ac004e624d] at 2020-10-10 21:54:38 on branch trunk — More type cleanups (user: js, size: 8331) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
251 252 253 254 255 256 257 | [super dealloc]; } - (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion { if (protocolVersion.major != 1 || protocolVersion.minor > 1) @throw [OFUnsupportedVersionException exceptionWithVersion: | | | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | [super dealloc]; } - (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion { if (protocolVersion.major != 1 || protocolVersion.minor > 1) @throw [OFUnsupportedVersionException exceptionWithVersion: [OFString stringWithFormat: @"%hhu.%hhu", protocolVersion.major, protocolVersion.minor]]; _protocolVersion = protocolVersion; } - (of_http_request_protocol_version_t)protocolVersion |
︙ | ︙ | |||
276 277 278 279 280 281 282 | if (components.count != 2) @throw [OFInvalidFormatException exception]; major = [components.firstObject unsignedLongLongValue]; minor = [components.lastObject unsignedLongLongValue]; | | | | | | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | if (components.count != 2) @throw [OFInvalidFormatException exception]; major = [components.firstObject unsignedLongLongValue]; minor = [components.lastObject unsignedLongLongValue]; if (major > UCHAR_MAX || minor > UCHAR_MAX) @throw [OFOutOfRangeException exception]; protocolVersion.major = (unsigned char)major; protocolVersion.minor = (unsigned char)minor; self.protocolVersion = protocolVersion; objc_autoreleasePoolPop(pool); } - (OFString *)protocolVersionString { return [OFString stringWithFormat: @"%hhu.%hhu", _protocolVersion.major, _protocolVersion.minor]; } - (OFString *)string { return [self stringWithEncoding: OF_STRING_ENCODING_AUTODETECT]; |
︙ | ︙ |