mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Small performance improvement
This commit is contained in:
+8
-1
@@ -65,10 +65,17 @@ final class BufferingSimpleClientHttpRequest extends AbstractBufferingClientHttp
|
||||
this.connection.addRequestProperty(headerName, headerValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.connection.getDoOutput()) {
|
||||
this.connection.setFixedLengthStreamingMode(bufferedOutput.length);
|
||||
}
|
||||
|
||||
this.connection.connect();
|
||||
if (bufferedOutput.length > 0) {
|
||||
|
||||
if (this.connection.getDoOutput()) {
|
||||
FileCopyUtils.copy(bufferedOutput, this.connection.getOutputStream());
|
||||
}
|
||||
|
||||
return new SimpleClientHttpResponse(this.connection);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user