SPR-8809 - RestTemplate headers not sent when bufferRequestBody is false

This commit is contained in:
Arjen Poutsma
2011-11-30 11:07:38 +00:00
parent 951514a576
commit 91c14bd1fe
2 changed files with 37 additions and 4 deletions

View File

@@ -85,9 +85,8 @@ class InterceptingClientHttpRequest extends AbstractBufferingClientHttpRequest {
delegate.getHeaders().putAll(request.getHeaders());
if (body.length > 0) {
FileCopyUtils.copy(body, delegate.getBody());
}
FileCopyUtils.copy(body, delegate.getBody());
return delegate.execute();
}
}