| CARVIEW |
v1.0.6 2nd August 2009
Improved support for proxy servers:
- Proxy autodetection should now find the best proxy for the particular url you are requesting
- ASIHTTPRequest can now find out about proxies from PAC files. This works when you have specified a PAC file in your network settings, or when you use setPACurl.
- ASIHTTPRequest now supports proxies that require authentication. Set proxyUsername / proxyPassword manually, or have your delegate respond to proxyAuthorizationNeededForRequest:
- You can now set proxies manually using proxyHost / proxyPort
Please let me know if you find problems with the new proxy functionality, it hasn't been widely tested. I have no idea if it works with NTLM proxies or not, but I think theoretically it should do...
Also:
- Fixed a bug that could cause erroneous timeouts when not using a downloadProgressDelegate. Thanks to Martin Destagnol for his assistance in tracking down this issue!
- iPhone demo app now includes the authentication example from the Mac demo app
- Cleanups to delegate authentication code
v1.0.5 26rd July 2009
- Fixed a potential crasher where requests might attempt to access the readstream after it had been released
- ASIHTTPRequest now generates a nice user agent for you if you don't set one yourself, assuming you've set a CFBundleDisplayName or CFBundleName. Thanks to Andy Fowler for the code!
- url is now a publicly settable property to get around problems with subclasses. Thanks to Charley Lanusse for his bug report!
- Updated GHUnit, Tests now build on the device
- Fix tests so they pass on the device (attempting to write outside the sandbox, doh!)
- Progress delegate-related tests should be more reliable
v1.0.4 23rd July 2009
- requestCookies is now emptied before a redirect. Any cookies in the persistent store (including session cookies) will be re-applied. This will ensure cookies are not present in the redirected request more than once, and that they won't be presented to the wrong domain (if we redirect to a different domain).
- Fixed a memory leak that crept in with the new redirection code
Thanks again to Austin France for taking the time to track these down!
- ASINetworkQueue's requestsCount property is now public-readable
v1.0.3 19th July 2009
- All convenience constructors (eg [ASINetworkQueue queue]) now return instances of the class they were called on, so you can now safely use these in your subclasses
- ASINetworkQueue now shows the network activity indicator (in the status bar) on the iPhone platform when network operations are in progress
- ASINetworkQueues now use accessors throughout to make subclassing less painful
Many thanks to Ken Collins for his patch and pointing me at his subclass!
18th July 2009
- Added gzip compression for request bodies (More info)
- Various tweaks and cleanups
v1.0.2 16th July 2009
Fixed a nasty bug where requests would call both their didFinishSelector and didFailSelector under certain circumstances. I've added checks that should ensure this never happens.
Many thanks to Mike DeSaro for reporting this issue!
v1.0.1 15th July 2009
- ASIHTTPRequest will now redirect as a GET request when it encounters a 303 HTTP status code, regardless of the original request method, as per RFC2616. Many thanks to Rick Moynihan for pointing out this problem!
- S3: Added object copy support
v1.0 14th July 2009
- Added experimental support for Amazon S3 (More info here)
- Automatic redirection for 30x status codes is now handled by ASIHTTPRequest rather than CFNetwork. This means that the redirected request will use cookies set by the initial request. This might well be useful if you use session-based authentication and want to authenticate in your very first request. Many thanks to Austin France for highlighting this issue!
v0.995 25th June 2009
ASIHTTPRequest should now auto-detect system proxy settings, and apply those to requests. Mac apps using ASIHTTPRequest will now need to link against the SystemConfiguration framework, this is not necessary for iPhone apps.
This hasn't had a lot of testing (I used Privoxy as a test server), so please let me know if you experience problems.
Thanks to everyone who requested this, most recently Malcolm Hall, Bill Tschumy and John Ngo.
v0.994 21st June 2009
Removed NSHTTPCookieAdditions, replaced with ASINSStringAdditions.
Cookies values are no longer automatically encoded and decoded because NSHTTPCookie won't let you create cookies containing certain characters (eg line breaks), which would cause an exception while building responseCookies when a (valid, url-encoded) line break was present in the value.
Cookies values stored in the shared NSHTTPCookieStorage store are now stored with their values encoded.
If you want to create cookies manually in your own apps, you should encode the string you are using as the value with [myValue encodedCookieValue].
If you need to read the value of a cookie, you can use [[cookie value] decodedCookieValue] to get a url-decoded representation of the cookie value.
This change means that cookies stored in the shared cookie storage with previous versions of ASIHTTPRequest will be presented to the server un-encoded, which might cause problems.
Including ASINSStringAdditions.h and ASINSStringAdditions.m in your own programs is optional - if you don't want to read url-decoded cookie values, or to build you own cookies, you don't need them.
This release also includes various fixes:
- Setting an empty string for a form post value with an ASIFormDataRequest should work now (Thanks to Jacky for finding this!)
- Fixed some problems with SSL error detection on the iPhone platform (Thanks to Jane Sales for catching this!)
- Tweaked the sample code the documentation to remove the autoreleased NSOperationQueue, because an autoreleased queue might be unsafe (Thanks to Scotch Vail for pointing this out!)
- Update docs to point out the iPhone 3.0 SDK makes upload progress tracking work better (Thanks, Apple!)
v0.99 7th June 2009
Added validatesSecureCertificate property. Set this to no to skip the validation of secure certificates, for example when using self-signed certificates during testing. DO NOT USE IN PRODUCTION. :)
Thanks to everyone who requested this, most recently Aaron Attar and Gary Fung.
v0.98 31st May 2009
- ASIHTTPRequest should now redirect automatically when it encounters a 30x header. You can disable this by setting shouldRedirect to NO. (Thanks to Michele Campeotto for this suggestion!)
- Added convenience constructors:
All return a new, auto-released instance, as you might expect.ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; ASINetworkQueue *queue = [ASINetworkQueue queue]; - Added Foundation.h imports to headers to allow ASIHTTPRequest to be built as part of a static library (Thanks to Steven Osborn for this!)
- Added useHTTPVersionOne property to force the use of HTTP 1.0 instead of 1.1 (Thanks to Basil Shkara!)
- NetworkRequestErrorDomain is now exported so you can compare it against the domain of errors generated by ASIHTTPRequest (Thanks to Roger Nolan for this!)
- Code cleanup - many properties are now declared inside ASIHTTPRequest.m to keep them private. If I have made something private that you were previously relying on, please let me know!
- Renamed outputStream to fileDownloadOutputStream for clarity
v0.97 16th May 2009
ASINetworkQueues no longer hijack the delegates of requests you add to them.
This means:
- Delegates you set on requests will have their requestDidFinishSelectors and requestDidFailSelectors called when they are run from a queue.
- You can now set downloadProgressDelegates and uploadProgressDelegates on requests you add to a queue, and these will be called when progress changes. The download progress queue example in the Mac sample application has been updated to demonstrate this: You can now have a progress indicator per request *and* an overall progress indicator for the queue.
See also the updated documentation on progress tracking.
Thanks to Serge Huber for pointing out this issue on his blog, I have no idea why I didn't implement it like this to begin with... :)
The marvelous GHUnit is now included with ASIHTTPRequest, so running the tests should be as easy as choosing the test target.
This release also has a couple of tweaks to the tests, and a fix to prevent the Content-length header from being added to requests without a body, which could cause issues with some servers (eg lighty). Thanks once again to Roman Busyghin for contributing this patch.
Finally, I've updated the documentation to clarify a few things, including
- Added a note about why you probably don't want to use synchronous requests
- Added a note about using NTLM authentication
- Added a note about using delegation to provide authentication credentials
- Tweaked the explanation of progress tracking, as noted above
v0.96 5th April 2009
Another big update:
- ASIHTTPRequest can now stream the request body directly from disk. This should result in a big drop in memory use for large posts (which is especially great news for iPhone). More info here. Thanks to Neil Martin for his bug report!
- Fixed some issues with multiple requests in an ASINetworkQueue when accurate progress was off
- Added a couple of new tests
- Fixed a couple of bugs in the tests
- Some code restructuring, more comments
- Fixed an issue with cookies being re-encoded each time they were added to the headers. Thanks to Richard Caetano for reporting this problem!
- Fix two memory leaks, my thanks to Max Horváth for finding them, and also thanks to Max for suggesting the new Lighthouse issue tracker!
v0.951 22nd March 2009
- Giant file layout cleanup. I've split the Mac and iPhone targets into two XCode projects, which should mean a) it ought to work with the new SDK, and b) I should stop running into all those quirky bugs XCode has when changing to a target with a different SDK.
- Requests and ASINetworkQueues now include the amount of data already downloaded in progress display when resuming a file download. Also, a you can now call [request removeTemporaryDownloadFile] to remove partial downloads. This is only necessary if a request does not complete successfully. (If you didn't specify your own custom temporaryFileDownloadPath, ASIHTTPRequest stores this file in a temporary folder anyway, so it will probably be cleaned up in the fullness of time.) Thanks to Matt Coneybeare for these requests.
- Added userInfo NSDictionary to ASIHTTPRequest. You can this to store context-specific data that's related to a particular request without subclassing, much like many of the Apple-supplied classes. Thanks to Roman Busyghin for this patch.
v0.94 16th March 2009
ASIHTTPRequest now supports resuming cancelled or interrupted file downloads. More information here.
Thanks to Matt Coneybeare for this feature request!
v0.93 12th March 2009
- NTLM authentication should now be possible. I've made various structural changes to the authentication retry process to make this work. An NTLM test is also included, but you'll need to add your own server details if you want to run this test. I'm very grateful to Justim Odendaal for providing me with access to a test server to get this working.
- Fixed a small issue with the testRequestMethod test, and a nasty crasher that was triggered if you tried to upload to an invalid host when tracking upload progress. Many thanks to Michael Krause for contributing these fixes and the associated test!
- handleBytesAvailable now uses a larger buffer size when the Content-Length header is set and the size of the body is larger than 64KB, hopefully this should improve download performance. Thanks to Matt Coneybeare for highlighting this!
- Fixed a leak with setting responseHeaders
v0.92 27th February 2009
Unit tests now use the wonderful GHUnit instead of SenTestingKit. GHUnit provides a neat user interface, it makes debugging tests easy, and you can build iPhone unit tests! I've removed the old Tests target from the xcode project, and added in two new targets: Tests (GHUnit) and iPhone Tests (GHUnit).
If you want to run the tests, follow the instructions on this page.
Additionally, a bug fix for parsing the charset from the Content-Type header is included. Many thanks for the patch contributed by Roman Busyghin!
Finally, I have removed the erroneous statements in the documentation that falsely suggested downloading to a file is not supported on iPhone. Thanks to Serge Kolokolkin for pointing out the error of my ways! :)
v0.9 23rd February 2009
Added gzip support for response data. When allowCompressedResponse is true (it is by default), ASIHTTPRequest will add a header to notify the server that it will accept a compressed response. This change should help speed up requests when the response can be compressed. More information on gzip support is available here.
Other miscellaneous changes:
- It is now necessary to link against zlib to use ASIHTTPRequest. I have added a new page to the documentation that explains how to link against zlib and CFNetwork
- The dataString method has been renamed to responseString
- File downloads now save their data to a temporary file whose path is stored in temporaryFileDownloadPath. When the download completes, the contents of the downloaded file will be decompressed to downloadDestinationPath when the response is gzipped, the temporary file will be moved to downloadDestinationPath when the response is not compressed.
- When not downloading to a file, response data is now stored in rawResponseData. If the data is compressed, calls to responseData will return uncompressed data, or rawResponseData otherwise
- You can call isResponseCompressed to find out if the response was compressed or not
- Added a note about the limitations of upload progress tracking to the documentation
Thanks once again to Shaun Harrison of Enormego for contributing the gzip code!
v0.89 9th January 2009
ASIHTTPRequest now parses the text encoding from the Content-Type header when supplied. See the how to use section for information on how ASIHTTPRequest handles text encodings.
Many thanks to Shaun Harrison for this suggestion!
v0.881 5th January 2009
- ASIFormDataRequest: setPostValue:forKey now takes any object that conforms to the NSObject protocol
- ASIHTTPRequest subclasses no longer recreate statics when initalize is called, which would cause them to leak once for every subclass
Thanks to EgoAleSum and René Post for these!
v0.87 31th December 2008
- Requests larger than 128KB will no longer timeout until more than 128KB of data has been uploaded. This is a workaround primarily targeted at apps running in low-bandwidth situations (eg: 3G / Edge on iPhone), where requests that took longer than the timeout to send 128KB of data (the upload buffer size) would always timeout, even if they had been sending data.
- Related to the above: upload progress delegates now ignore the first 128KB of progress. You should no longer see a jump in progress at the beginning of a request, followed by no progress until more than 128KB had been sent.
- Added POST progress example to the iPhone sample app
- Removed debug code that could prevent UIProgressViews from updating
- CFNetwork.h is now only imported when targeting iPhone, fingers crossed ASIHTTPRequest should now build cleanly on both platforms out of the box...
Many thanks to René Post for highlighting the first two issues!
v0.86 20th December 2008
- Import CFNetwork header in ASIHTTPRequest.h so iPhone targets build in release configuration out of the box
- Use removeItemAtPath rather than removeFileAtPath to get rid of a warning when targeting iPhone
Thanks to Jake Olefsky and Kiichi Takeuchi for these!
v0.85 9th December 2008
HEAD requests created by ASINetworkQueues to calculate accurate progress now reuse request headers (including authentication information and cookies) from their main request. Additionally, these HEAD requests will now set the error property of the main request, and call the main request's delegate, rather than their own, when an error is generated.
Thanks to Alex Reynolds for pointing out this bug!
v0.84 17th November 2008
- Added the ability to pass an NSData object to ASIFormDataRequest as an alternative to a file path
- Fixed a type conversion bug that could cause UIProgressViews to show progress incorrectly
Thanks to Roman Busyghin for pointing these out!
v0.82 12th November 2008
Reworked error system. Errors are now split into 7 types, see ASIHTTPRequest.h for the constants you can use in your code to find out what went wrong. Errors now use the standard NSLocalizedDescriptionKey in their userInfo dictionary.
v0.8: 11th November 2008
Made some major changes to the progress system and ASINetworkQueue.
ASIHTTPRequests and ASINetworkQueues now have a new property, showAccurateProgress. When turned on, requests will update the progress delegates to show the amount downloaded / uploaded so far (this was the previous behaviour). When turned off, they will only update the progress delegate when the request completes. The default is on for ASIHTTPRequests, but off for requests added to an ASINetworkQueue.
If you turn showAccurateProgress on for an ASINetworkQueue, the queue will perform HTTP HEAD requests for every GET request in the queue before any downloads begin. This allows the queue to calculate the total size to download before any downloads take place, and should stop progress indicators jumping backwards and forwards. It’s probably best to leave showAccurateProgress off for ASINetworkQueues unless you have very large requests or the size of requests varies greatly, to avoid the overhead of the HEAD requests.
For POST requests, ASINetworkQueues now call buildPostBody on each request when showAccurateProgress is on. The default implementation is empty, but subclasses are expected to have a complete request body (setPostBody) by the time this method completes. This is so ASINetworkQueues can gather the total size of upload requests before they begin, again to provide a more accurate indication of progress. Previously, building the post body was part of the main method that ran just before the request was loaded. ASIFormDataRequest uses setPostBody to create the post content, see that class for an example.
It is now necessary to call go on a ASINetworkQueue to start it. This is so the queue can reset the progressDelegates when necessary.
Both the Mac and iPhone sample apps now have a checkbox to turn accurate progress on and off in the ‘queue’ examples, so you can get an idea how it works.
Locking behaviour has been revised to fix a few deadlocks, and you no longer need to worry about the whole thing grinding to a halt when the main thread is busy (eg with waitUntilAllOperationsAreFinished).
Finally, there are a couple of new tests for authentication.
v0.7: 8th November 2008
ASIHTTPRequest has had a major overhaul with lots of new features, including iPhone support and progress tracking for multiple requests. If you are already using an older version of ASIHTTPRequest, you may need to make changes to your code.
© Ben Copsey, All-Seeing Interactive 2008-2009.
