mirror of https://github.com/apache/jclouds.git
fixed accidental chunked encoding on 0 length puts
This commit is contained in:
parent
87127bbc64
commit
c253c1b77d
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue