Bugs fixed in V0.2-2
There have been a few more bugs since the release of the last bug fix
   version V0.2-1 and which this release attempts to fix. Here is the list
   of them:
- If redirecting a request containing a query string, then the old query
    string was added to the new location even if the new location contained
    a new query string.
- In a proxy redirect (status code 305) the wrong resource was used for
    the new request.
- A few problems with the chunked encoding were solved. There was a bug
    were multiple responses on the same connection that used this encoding
    would be decoded wrong. Furthermore, the parser for the chunk length has
    been loosend to accept non-conforming chunk headers.
- Most of the timeout thread problems have been worked around.
    suspend()is not used anymore to avoid Netscape problems,
    and the thread is set to daemon mode to avoid hanging at exit time.
- The JDK 1.0.2 (and possibly other VMs) has a bug where it doesn't
    release resources referenced by a thread if the thread is
    stop()'d instead of being allowed to fall off the end
    of run(). This meant that the Timeout thread would keep a large part
    of the resources from being gc'd, thereby creating the equivalent of
    a memory leak. Therefore the thread is notstop()'d
    anymore, but instead falls of the end of it'srun().
- The parser for responses has been loosend up. It now deals with erroneous
    white space preceding the response, it correctly handles non existent
    reason phrases, and it also handles responses from buggy NCSA servers.
    It also now throws a ProtocolExceptionif the response
    version is not HTTP/0.9 or HTTP/1.* .
- HTTPResponse.getHeaderAsXXX()would not work if they were
    the first header requested (i.e. no other- getHeader()had
    been called previously). The side effect of this fix is that these two
    methods may now (correctly) also throw an- IOException.
- A couple deadlock problems in the response stream handling have been
    fixed. One could only turn up if you had done a
    setRawMode(true)for the connection, and the other turned
    up under certain conditions when an IOException occured.
- Sending a request URI "*" would not work correctly when using a proxy.
- Some (buggy) servers return a 500 status on a HTTP/1.1 request. This
    situation is now handled by retrying the request as HTTP/1.0 .
- Some (buggy) servers don't like a port specification in the Host: header
    if the port is the default port (80). The port part is now only sent if
    a non-default port is used.
- The max parameter in the Keep-Alive header is now
    honored. This is necessary as Apache would ReSeT a connection (instead
    of just closing it) if too many requests were sent, resulting in
    unnecessary IOExceptions.
- The signature of the Codecs.mpFormDataEncode()method has
    been changed slightly: the last parameter is now an array of NVPairs
    instead of an NVPair. This was a bug in that NVPair ought to be
    immutable, but this method violated that.
Thanx to Doron Shpasser and Kuo Chiang for finding and reporting a number
of the bugs.
![[HTTPClient]](images/back.gif) 
Ronald Tschalär / 23 March 1997 /
ronald@innovation.ch.