ObjFW  Check-in [7efd17523d]

Overview
Comment:OFHTTPRequest: Conform to OFCopying.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7efd17523d9f52c1d3ec1d140240f907ed589e9ed10d56d4e96711ea57c3e238
User & Date: js on 2013-08-15 17:40:41
Other Links: manifest | tags
Context
2013-08-15
17:43
OFHTTPResponse: Include self in -[description]. check-in: c0616f3c1e user: js tags: trunk
17:40
OFHTTPRequest: Conform to OFCopying. check-in: 7efd17523d user: js tags: trunk
17:39
OFHTTPRequest: Add -[isEqual:] and -[hash]. check-in: 7cb70e45cf user: js tags: trunk
Changes

Modified src/OFHTTPRequest.h from [daf0e520ee] to [a983083af8].

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
	/*! The minor of the HTTP version */
	uint8_t minor;
} of_http_request_protocol_version_t;

/*!
 * @brief A class for storing HTTP requests.
 */
@interface OFHTTPRequest: OFObject
{
	OFURL *_URL;
	of_http_request_type_t _requestType;
	of_http_request_protocol_version_t _protocolVersion;
	OFDictionary *_headers;
	OFDataArray *_POSTData;
	OFString *_MIMEType;







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
	/*! The minor of the HTTP version */
	uint8_t minor;
} of_http_request_protocol_version_t;

/*!
 * @brief A class for storing HTTP requests.
 */
@interface OFHTTPRequest: OFObject <OFCopying>
{
	OFURL *_URL;
	of_http_request_type_t _requestType;
	of_http_request_protocol_version_t _protocolVersion;
	OFDictionary *_headers;
	OFDataArray *_POSTData;
	OFString *_MIMEType;

Modified src/OFHTTPRequest.m from [ee350c6f2d] to [5824c67d6a].

72
73
74
75
76
77
78




















79
80
81
82
83
84
85
	[_headers release];
	[_POSTData release];
	[_MIMEType release];
	[_remoteAddress release];

	[super dealloc];
}





















- (bool)isEqual: (id)object
{
	OFHTTPRequest *request;

	if (![object isKindOfClass: [OFHTTPRequest class]])
		return false;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
	[_headers release];
	[_POSTData release];
	[_MIMEType release];
	[_remoteAddress release];

	[super dealloc];
}

- copy
{
	OFHTTPRequest *copy = [[OFHTTPRequest alloc] init];

	@try {
		copy->_requestType = _requestType;
		copy->_protocolVersion = _protocolVersion;
		[copy setURL: _URL];
		[copy setHeaders: _headers];
		[copy setPOSTData: _POSTData];
		[copy setMIMEType: _MIMEType];
		[copy setRemoteAddress: _remoteAddress];
	} @catch (id e) {
		[copy release];
		@throw e;
	}

	return copy;
}

- (bool)isEqual: (id)object
{
	OFHTTPRequest *request;

	if (![object isKindOfClass: [OFHTTPRequest class]])
		return false;