diff options
author | Neil Fuller <nfuller@google.com> | 2014-03-03 13:52:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-03-03 13:52:35 +0000 |
commit | a14ac2dd5ce05adfbe803bd0f8a07cdd7088cc47 (patch) | |
tree | 30b91c0f7b16d8d80428ecd700231d9ef2408109 /luni | |
parent | 5a57ed5f213aad62255884b2eacb6aece630e9ed (diff) | |
parent | 9749b98a92fbf2bfe095b7ec884789f62ab293d8 (diff) | |
download | libcore-a14ac2dd5ce05adfbe803bd0f8a07cdd7088cc47.zip libcore-a14ac2dd5ce05adfbe803bd0f8a07cdd7088cc47.tar.gz libcore-a14ac2dd5ce05adfbe803bd0f8a07cdd7088cc47.tar.bz2 |
Merge "Fix URLConnectionTest#testSetChunkedStreamingMode"
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/test/java/libcore/java/net/URLConnectionTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/luni/src/test/java/libcore/java/net/URLConnectionTest.java b/luni/src/test/java/libcore/java/net/URLConnectionTest.java index bda8aff..906dbe0 100644 --- a/luni/src/test/java/libcore/java/net/URLConnectionTest.java +++ b/luni/src/test/java/libcore/java/net/URLConnectionTest.java @@ -1072,7 +1072,11 @@ public final class URLConnectionTest extends TestCase { server.play(); HttpURLConnection urlConnection = (HttpURLConnection) server.getUrl("/").openConnection(); - urlConnection.setChunkedStreamingMode(1); + // Later releases of Android ignore the value for chunkLength if it is > 0 and default to + // a fixed chunkLength. During the change-over period while the chunkLength indicates the + // chunk buffer size (inc. header) the chunkLength has to be >= 8. This enables the flush() + // to dictate the size of the chunks. + urlConnection.setChunkedStreamingMode(50 /* chunkLength */); urlConnection.setDoOutput(true); OutputStream outputStream = urlConnection.getOutputStream(); String outputString = "ABCDEFGH"; |