Bugs fixed in V0.2-3
There have been a few more bugs since the release of the last bug fix
version V0.2-2 and which this release attempts to fix. Here is the list
of them:
- The authorization header parser has been reworked. There were some bugs
and a few cases where it was unecessarily picky.
- The Codecs.java contained some code where, according to the
JLS, an explicit cast is needed; however javac compiled it fine... It
should now compile on all compilers.
- The Codecs.java and Util.java contained some legal
code which the Visual J++ compiler unfortunately was not able to deal
with. They have been rewritten.
- HTTPResponse.getHeaderAsInt() was supposed to return -1 if
the header didn't exist. However, it didn't, and anyway, this was
bad design in the first place. It now throws
NumberFormatException if the header does not exist or
it's value is not a number.
- HTTPResponse.getHeaderAsDate() was supposed to return null
if the header didn't exists. However, it didn't. Now it does.
- There was a problem where, if the responses weren't closed by the caller
of the library, a number of Timeout threads would hang about. These
threads are killed now and the GC should be able to clean up stuff.
However, the caller code should always call either getData()
or getInputStream() and close() on every response
to make sure the response stream is closed in a timely fashion.
- A minor bug caused connections to an HTTP/1.1 server to sometimes be
closed unecessarily. This had no impact on the correct functioning,
though.
- A few bugs in the StreamDemultiplexor were fixed. The effect was that
exceptions weren't always correctly thrown.
- a new method Post(String, NVPair[], NVPair[]) has been added
to HTTPConnection. This was missing and will be available in all future
versions of the client.
- a rudimentary stop() method has been added to HTTPConnection
which will abort current transaction and close the socket. However,
there are some problems with it and a cleaner version will be
supplied in V0.3. It is recommened therefore that this method not be
used unless absolutely necessary.
- Added method HTTPResponse.getLocalPort(). This was added
because of a request to do so. However, I'm unclear as to why this
would be useful. If you need/use this method, please let me know.
Otherwise I'll remove it again.
Ronald Tschalär / 27 October 1997 /
ronald@innovation.ch.