* If key is empty, don't add anything (value can be empty) * All file/data methods now do through the long form addData:withFileName:andContentType:forKey: method, to cut down on a bit of duplication Thanks to Bas Scheffers for suggesting changes here!
…IAuthenticationDialog Comment tweaks
…Second). Otherwise value like 1024 will be false
ASIDownloadCache will now store 301, 302, 303 and 307 redirect responses in the cache. Requests pulling from the cache will automatically redirect (assuming shouldRedirect is true) as if they'd received a Location header from the server. This change should allow the download cache to operate more effectively as an offline fallback when no internet connection is available. Additionally, requests encountering a 304 will no longer read from the cache and then write back to it. Instead, they merely update the expiry date (if an updated date was supplied). As part of this work, two new required methods were added to the ASICacheDelegate protocol, see ASICacheDelegate.h for more info Finally, ASIDownloadCache now stores the response status code in a custom header in the cached headers dictionary, and requests will have their response status code set to this when they are pulled from the cache.
…Path in cancelLoad if the whole download is complete * Also, don't clear responseHeaders in cancelLoad closes gh-182
1) Fix a problem where a temporary request body would be discarded when retrying on a new connection 2) By default, all requests using POST, PUT or having a body at the time requestMethod is set will NOT use a persistent connection. You can override this by setting requestMethod manually, then setting shouldAttemptPersistentConnection to YES closes gh-94
All requests now store a single expiry timestamp constructed from either secondsToCache, a cache-control: max-age header, or an expires header (in order of precedence) This is used for all expiry checks, and should speed up checking if cached data is stale because it elimiates the need for NSDateFormatter or NSScanner when reading from the cache (closes gh-173)
Internal tweaks to remove a bit of duplication
…SSL error message closes gh-164