ChaithanyaGK commented on this pull request.
> @@ -779,6 +782,22 @@ private static void addHeader(Multimap<String, String>
> headers, Headers header,
return parts.build();
}
+ private static GeneratedHttpRequest
stripExpectHeaderIfContentZero(GeneratedHttpRequest request) {
+ boolean isBodyEmpty = false;
+ if (request.getPayload() != null) {
+ Long length =
request.getPayload().getContentMetadata().getContentLength();
+ if (length != null && length == 0) {
+ isBodyEmpty = true;
+ }
+ } else {
+ isBodyEmpty = true;
+ }
@nacx jclouds don't set the content length in case of `chunked` transfer, that
is the reason I'm not considering the body to be empty if content length is not
set. Please check [this
](https://github.com/jclouds/jclouds/blob/4bbca9edf943852ce1ea5aa579fa0554f770a3ea/core/src/main/java/org/jclouds/http/HttpUtils.java#L242)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1120#discussion_r128180992