cappuccino/cappuccino — pull request #2272 by ahankinson (2014-12-04 23:34:54+00:00)
Title: Rework of withCredentials, CPURLRequest, and CPURLConnection

This Pull Request deals with three inter-related issues.

1. The presence of `withCredentials` on CPURLConnection required that the connection be initialized with credentials or not. This commit moves `withCredentials` to CPURLRequest, where it can be set prior to initializing the connection. This setting will then get picked up and transferred to the underlying CFHTTPRequest as needed. This also simplifies the implementation of `withCredentials` in Capp.

2. CPURLConnection was missing the `originalRequest` and `currentRequest` methods, present in Cocoa since 10.8. These were added.

3. CPURLRequests were not able to be deep copied using the `copy` method (provided by CPCopying). The CPCopying protocol was added to CPURLRequest to implement the copy method allowing CPURLRequest objects to be deep copied.

Refs: #2158, #2237, #2209.