As a bonus, this lets our MemoryTracking subsystem track zlib operations. And also fixes a shortcut some zlib 1.2.x versions took using malloc() instead of calloc(), which would trigger memory debuggers warnings on memory being used without having been initialized.
By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
Sebastian V reported bug #3000056 identifying a problem with redirect following. It showed that when curl followed redirects it didn't properly ignore the response body of the 30X response if that response was using compressed Content-Encoding! (http://curl.haxx.se/bug/view.cgi?id=3000056)
…libcurl to automatically uncompress it with the CURLOPT_ENCODING option, libcurl could wrongly provide the callback with more data than what the maximum documented amount. An application could thus get tricked into badness if the maximum limit was trusted to be enforced by libcurl itself (as it is documented). This is further detailed and explained in the libcurl security advisory 20100209 at http://curl.haxx.se/docs/adv_20100209.html
…pression of streams that had some parts (legitimately) missing. We now provide and use a proper cleanup function for the content encoding submodule. http://curl.haxx.se/mail/lib-2009-05/0092.html
…d memory leak like that fixed on the 14th. When zlib returns failure, we need to cleanup properly before returning error.
…acs' copyright-update script thinks
… encoding code, which could happen on libz errors.
… data that is inited at the start of the DO action. I removed the Curl_transfer_keeper struct completely, and I had to move out a few struct members (that had to be set before DO or used after DONE) to the UrlState struct. The SingleRequest struct is accessed with SessionHandle->req. One of the biggest reasons for doing this was the bunch of duplicate struct members in HandleData and Curl_transfer_keeper since it was really messy to keep track of two variables with the same name and basically the same purpose!
…urce code consistency
countermeasures code path.
…he TYPE command on subsequent requests on a re-used connection unless it has to.
…g when the stream (wrongly) lacks a proper zlib header. This seems to be the case on too many actual server implementations.
produce a zlib error.
warnings from picky compilers
memory.h is included everywhere for this.
…less warnings. Minor edits by me.