Apple's iOS documentation on NSMutableURLRequest says:
NSURLConnection makes a deep copy of each NSMutableURLRequest object passed to one of its initializers.
How is this implemented? I don't see any documented way of performing deep copy of NSMutableURLRequest
objects. Field by field copying is not good enough, as NSMutableURLRequest
can be subclassed.
My use case: I'm implementing NSURLProtocol
for a custom protocol built on top of http. My NSURLProtocol
implementation will do its custom stuff, then use NSURLConnection
with a slightly modified NSURLRequest
.