fix HttpClient lost body bug

This commit is contained in:
Looly
2023-10-08 21:16:31 +08:00
parent bdf71b5e71
commit 5aed18a51b
4 changed files with 56 additions and 4 deletions

View File

@@ -70,6 +70,6 @@ public class HttpClient4BodyEntity extends AbstractHttpEntity {
@Override
public long getContentLength() {
return 0;
return -1;
}
}

View File

@@ -12,9 +12,9 @@
package org.dromara.hutool.http.client.engine.httpclient5;
import org.apache.hc.core5.http.io.entity.AbstractHttpEntity;
import org.dromara.hutool.http.client.body.BytesBody;
import org.dromara.hutool.http.client.body.HttpBody;
import org.apache.hc.core5.http.io.entity.AbstractHttpEntity;
import java.io.InputStream;
import java.io.OutputStream;
@@ -67,6 +67,6 @@ public class HttpClient5BodyEntity extends AbstractHttpEntity {
@Override
public long getContentLength() {
return 0;
return -1;
}
}