Index: src/OFHTTPRequest.h ================================================================== --- src/OFHTTPRequest.h +++ src/OFHTTPRequest.h @@ -50,11 +50,11 @@ } of_http_request_protocol_version_t; /*! * @brief A class for storing HTTP requests. */ -@interface OFHTTPRequest: OFObject +@interface OFHTTPRequest: OFObject { OFURL *_URL; of_http_request_type_t _requestType; of_http_request_protocol_version_t _protocolVersion; OFDictionary *_headers; Index: src/OFHTTPRequest.m ================================================================== --- src/OFHTTPRequest.m +++ src/OFHTTPRequest.m @@ -74,10 +74,30 @@ [_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;