fix #2540 check a size of request body
This commit is contained in:
parent
2758ed9d30
commit
9b6ec3a8f3
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ public class EsApiManager extends BaseApiManager {
|
|||
});
|
||||
try (final CurlResponse curlResponse = curlRequest.onConnect((req, con) -> {
|
||||
con.setDoOutput(true);
|
||||
if (httpMethod != Method.GET) {
|
||||
if (httpMethod != Method.GET && request.getContentLength() > 2) {
|
||||
try (ServletInputStream in = request.getInputStream(); OutputStream out = con.getOutputStream()) {
|
||||
CopyUtil.copy(in, out);
|
||||
} catch (final IOException e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue