Fix HttpURLConnection's chunked encoding behavior.
A third-party developer who wasn't reading to the end of the stream found that
their next connection would return junk, which turned out to be the tail of
the first response (thanks to connection recycling). Make sure we clean up
a chunked-encoding stream before allowing the connection to be reused.
Enhance our test web server to implement chunked encoding properly, with
configurable chunk sizes, rather than just responding with a single chunk.
Bug: http://code.google.com/p/android/issues/detail?id=2939
5 files changed