ObjFW  Check-in [4ec7e46c8a]

Overview
Comment:Improve property name consistency
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4ec7e46c8a781e0f746b77a8a1d4e2d1aab397c3650e66a92f9164c4ef50214e
User & Date: js on 2018-11-17 22:46:28
Other Links: manifest | tags
Context
2018-11-17
22:53
OFEnumerator: Make allObjects a method check-in: 003c448269 user: js tags: trunk
22:46
Improve property name consistency check-in: 4ec7e46c8a user: js tags: trunk
2018-11-11
22:30
OFApplication: Disallow using a different sandbox check-in: e0c2e70f7b user: js tags: trunk
Changes

Modified src/OFHTTPClient.m from [e9e028700b] to [00205fa304].

302
303
304
305
306
307
308
309

310
311
312
313
314
315
316
302
303
304
305
306
307
308

309
310
311
312
313
314
315
316







-
+







	OFHTTPClientResponse *response;
	OFString *connectionHeader;
	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"]) {
		if (connectionHeader != nil)
			keepAlive = ([connectionHeader caseInsensitiveCompare:

Modified src/OFHTTPRequest.h from [7136743ab3] to [9290a57d05].

87
88
89
90
91
92
93
94

95
96
97
98
99
100
101
87
88
89
90
91
92
93

94
95
96
97
98
99
100
101







-
+







 * @brief The protocol version of the HTTP request.
 */
@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;

/*!
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
128
129
130
131
132
133
134








135
136
137
138
139
140
141







-
-
-
-
-
-
-
-







/*!
 * @brief Initializes an already allocated OFHTTPRequest with the specified URL.
 *
 * @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
/*!
 * @brief Returns a C string describing the specified request method.

Modified src/OFHTTPRequest.m from [f2c9b5d838] to [7c68bfbbc5].

205
206
207
208
209
210
211
212

213
214
215
216
217
218
219
205
206
207
208
209
210
211

212
213
214
215
216
217
218
219







-
+







}

- (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;

	if ([components count] != 2)

Modified src/OFHTTPResponse.h from [7279e666ae] to [adf205a603].

39
40
41
42
43
44
45
46

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
39
40
41
42
43
44
45

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63








64
65
66
67
68
69
70
71
72
73







-
+

















-
-
-
-
-
-
-
-










 * @brief The protocol version of the HTTP request reply.
 */
@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;

/*!
 * @brief The headers of the reply to the HTTP request.
 */
@property (copy, nonatomic) OFDictionary OF_GENERIC(OFString *, OFString *)
    *headers;

/*!
 * @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
 */
- (OFString *)stringWithEncoding: (of_string_encoding_t)encoding;
@end

OF_ASSUME_NONNULL_END

Modified src/OFHTTPResponse.m from [c140db14e6] to [0883cdac2f].

174
175
176
177
178
179
180
181

182
183
184
185
186
187
188
174
175
176
177
178
179
180

181
182
183
184
185
186
187
188







-
+







}

- (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;

	if ([components count] != 2)