twitter/CocoaSPDY — pull request #81 by kgoodier (2014-11-05 01:53:27+00:00)
Title: Support for app retrieving metadata

Setting a non-primitive type in the NSURLRequest properties generated
an error when the request and response were being cached to disk, so
we're going with a different solution. This removes all code related
to the extended delegate, including the unit tests.

Using either the NSURLResponse or the NSError provided from the URL
loading system, the app can retrieve the SPDY metadata at any time until
the final delegate callback is made. This is achieved using an opaque
weak reference and a simple lookup dictionary, and relies on the
strong reference from SPDYProtocol to SPDYStream to SPDYMetadata.

A new way to test the metadata and know definitively when a request
has finished is included here by mocking the NSURLProtocolClient
protocol. This should be very useful for future tests, especially ones
that want to act like an app.