mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-20 12:19:16 +00:00
Fixing the build
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3084 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+4
-3
@@ -522,12 +522,13 @@ public class RestTemplate extends HttpAccessor implements RestOperations {
|
||||
public void doWithRequest(ClientHttpRequest httpRequest) throws IOException {
|
||||
super.doWithRequest(httpRequest);
|
||||
if (!requestEntity.hasBody()) {
|
||||
HttpHeaders httpHeaders = httpRequest.getHeaders();
|
||||
HttpHeaders requestHeaders = requestEntity.getHeaders();
|
||||
if (!requestHeaders.isEmpty()) {
|
||||
httpRequest.getHeaders().putAll(requestHeaders);
|
||||
httpHeaders.putAll(requestHeaders);
|
||||
}
|
||||
if (httpRequest.getHeaders().getContentLength() == -1) {
|
||||
httpRequest.getHeaders().setContentLength(0L);
|
||||
if (httpHeaders.getContentLength() == -1) {
|
||||
httpHeaders.setContentLength(0L);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user