fixed accidental chunked encoding on 0 length puts

This commit is contained in:
Adrian Cole 2010-11-07 01:44:46 +01:00
parent 87127bbc64
commit c253c1b77d
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorSe
connection.setRequestProperty(HttpHeaders.CONTENT_LENGTH, "0");
// for some reason POST/PUT undoes the content length header above.
if (connection.getRequestMethod().equals("POST") || connection.getRequestMethod().equals("PUT"))
connection.setChunkedStreamingMode(0);
connection.setFixedLengthStreamingMode(0);
}
return connection;