Differences From Artifact [f1cfec9f86]:
- File src/OFHTTPResponse.m — part of check-in [6ae98c1dcf] at 2021-04-25 19:58:13 on branch trunk — Last round of renames (hopefully) (user: js, size: 8125) [annotate] [blame] [check-ins using] [more...]
To Artifact [17a72a5d36]:
- File
src/OFHTTPResponse.m
— part of check-in
[16d3902e6d]
at
2022-06-05 10:43:20
on branch trunk
— OFHTTPResponse: Make "string" a method
This should not be a property as it reads from the stream and therefore
mutates it. (user: js, size: 8137) [annotate] [blame] [check-ins using] [more...]
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2008-2022 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * |
︙ | ︙ | |||
292 293 294 295 296 297 298 | - (OFString *)protocolVersionString { return [OFString stringWithFormat: @"%hhu.%hhu", _protocolVersion.major, _protocolVersion.minor]; } | | | | | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | - (OFString *)protocolVersionString { return [OFString stringWithFormat: @"%hhu.%hhu", _protocolVersion.major, _protocolVersion.minor]; } - (OFString *)readString { return [self readStringWithEncoding: OFStringEncodingAutodetect]; } - (OFString *)readStringWithEncoding: (OFStringEncoding)encoding { void *pool = objc_autoreleasePoolPush(); OFString *contentType, *contentLengthString, *ret; OFData *data; if (encoding == OFStringEncodingAutodetect && (contentType = [_headers objectForKey: @"Content-Type"]) != nil) |
︙ | ︙ |