NSURLRequest cache policy change

Originator:scottg042
Number:rdar://12410553 Date Originated:01-Oct-2012 05:52 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:6.0
Classification:Serious Bug Reproducible:Always
 
Summary:
NSURLRequest caches all responses in iOS 6.0 which is different than how iOS 5 and previous handled the cache. This results in URL calls with distinct headers returning back the same cached results.

Steps to Reproduce:
Create a URL request object with unique headers (we use a header for passing an authorization token).
Execute the request and inspect the contents.
Create another URL request with the same URL but different headers (again we use one header to pass in the account authorization token).
Execute request and inspect the contents.

Expected Results:
It is expected that the second request would return unique results because the request is unique. Even though the URL is the same, the headers are different.

Actual Results:
The NSURLRequest will return the results from the first request to the second request which appears to be from the cache.

Regression:
Works as expected in all previous iOS version before 6.0.

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!