Committed by
Ben Copsey
Set responseStatusCode on cached responses to 200, so the cache is transparent to the client.
(The cache only stores 200 response codes.) The client can still check if the cache was used or not by checking 'didUseCachedResponse'.
Showing
1 changed file
with
5 additions
and
1 deletions
@@ -2831,7 +2831,11 @@ static NSOperationQueue *sharedQueue = nil; | @@ -2831,7 +2831,11 @@ static NSOperationQueue *sharedQueue = nil; | ||
2831 | return NO; | 2831 | return NO; |
2832 | } | 2832 | } |
2833 | } | 2833 | } |
2834 | - | 2834 | + |
2835 | + // only 200 responses are stored in the cache, so let the client know | ||
2836 | + // this was a successful response | ||
2837 | + self.responseStatusCode = 200; | ||
2838 | + | ||
2835 | [self setDidUseCachedResponse:YES]; | 2839 | [self setDidUseCachedResponse:YES]; |
2836 | 2840 | ||
2837 | ASIHTTPRequest *theRequest = self; | 2841 | ASIHTTPRequest *theRequest = self; |
-
Please register or login to post a comment