Index: src/OFHTTPClient.m ================================================================== --- src/OFHTTPClient.m +++ src/OFHTTPClient.m @@ -304,11 +304,11 @@ bool keepAlive; OFString *location; response = [[[OFHTTPClientResponse alloc] initWithSocket: sock] autorelease]; - [response setProtocolVersionFromString: _version]; + [response setProtocolVersionString: _version]; [response setStatusCode: _status]; [response setHeaders: _serverHeaders]; connectionHeader = [_serverHeaders objectForKey: @"Connection"]; if ([_version isEqual: @"1.1"]) { Index: src/OFHTTPRequest.h ================================================================== --- src/OFHTTPRequest.h +++ src/OFHTTPRequest.h @@ -89,11 +89,11 @@ @property (nonatomic) of_http_request_protocol_version_t protocolVersion; /*! * @brief The protocol version of the HTTP request as a string. */ -@property (readonly, nonatomic) OFString *protocolVersionString; +@property (copy, nonatomic) OFString *protocolVersionString; /*! * @brief The request method of the HTTP request. */ @property (nonatomic) of_http_request_method_t method; @@ -130,18 +130,10 @@ * * @param URL The URL for the request * @return An initialized OFHTTPRequest */ - (instancetype)initWithURL: (OFURL *)URL; - -/*! - * @brief Sets the protocol version of the HTTP request to the version - * described by the specified string. - * - * @param string A string describing an HTTP version - */ -- (void)setProtocolVersionFromString: (OFString *)string; @end #ifdef __cplusplus extern "C" { #endif Index: src/OFHTTPRequest.m ================================================================== --- src/OFHTTPRequest.m +++ src/OFHTTPRequest.m @@ -207,11 +207,11 @@ - (of_http_request_protocol_version_t)protocolVersion { return _protocolVersion; } -- (void)setProtocolVersionFromString: (OFString *)string +- (void)setProtocolVersionString: (OFString *)string { void *pool = objc_autoreleasePoolPush(); OFArray *components = [string componentsSeparatedByString: @"."]; intmax_t major, minor; of_http_request_protocol_version_t protocolVersion; Index: src/OFHTTPResponse.h ================================================================== --- src/OFHTTPResponse.h +++ src/OFHTTPResponse.h @@ -41,11 +41,11 @@ @property (nonatomic) of_http_request_protocol_version_t protocolVersion; /*! * @brief The protocol version of the HTTP request reply as a string. */ -@property (readonly, nonatomic) OFString *protocolVersionString; +@property (copy, nonatomic) OFString *protocolVersionString; /*! * @brief The status code of the reply to the HTTP request. */ @property (nonatomic) short statusCode; @@ -59,18 +59,10 @@ /*! * @brief The reply as a string, trying to detect the encoding. */ @property (readonly, nonatomic) OFString *string; -/*! - * @brief Sets the protocol version of the HTTP request reply to the version - * described by the specified string. - * - * @param string A string describing an HTTP version - */ -- (void)setProtocolVersionFromString: (OFString *)string; - /*! * @brief Returns the reply as a string, trying to detect the encoding and * falling back to the specified encoding if not detectable. * * @return The reply as a string Index: src/OFHTTPResponse.m ================================================================== --- src/OFHTTPResponse.m +++ src/OFHTTPResponse.m @@ -176,11 +176,11 @@ - (of_http_request_protocol_version_t)protocolVersion { return _protocolVersion; } -- (void)setProtocolVersionFromString: (OFString *)string +- (void)setProtocolVersionString: (OFString *)string { void *pool = objc_autoreleasePoolPush(); OFArray *components = [string componentsSeparatedByString: @"."]; intmax_t major, minor; of_http_request_protocol_version_t protocolVersion;