Fix HttpURLConnection.setFixedLengthStreamingMode.

Add better testing of chunked and fixed-length modes, and fix fixed-length mode
so it doesn't try to buffer all the output (which is the last thing you want
because the only point of that mode is to explicitly disable as much buffering
as possible).

Bug: http://code.google.com/p/android/issues/detail?id=3164
Change-Id: Ie0adc374b9c8093ab55211222cec0eeab0e27e96
2 files changed