The issue here was not what I expected. The real problem was that redirects were not being handled correctly, since the following code was not there:
- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response {
[[self client] URLProtocol:self wasRedirectedToRequest:request redirectResponse:response];
return request;
}
Without this code, redirects were not being cached so requests so sequential requests to a redirected URL like wikipedia.com resulted in redirects every single time.