This commit is contained in:
jinyu 2015-12-14 20:00:09 +08:00
parent d820d3d18b
commit 12367d63c6
3 changed files with 3 additions and 1 deletions

View File

@ -85,7 +85,7 @@ public class InputStreamBody extends AbstractContentBody {
}
public long getContentLength() {
return contentLength;
return this.contentLength;
}
public String getFilename() {

View File

@ -165,5 +165,6 @@ public class MultipartEntity implements HttpEntity {
public void writeTo(final OutputStream outstream) throws IOException {
this.multipart.writeTo(outstream);
outstream.flush();
}
}

View File

@ -145,6 +145,7 @@ public class Netty4HttpClient extends AbstractHttpClient {
ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer();
ByteBufOutputStream out = new ByteBufOutputStream(byteBuf);
entity.writeTo(out);
out.flush();
out.close();
uriRequest = new DefaultFullHttpRequest(
uriRequest.getProtocolVersion(), uriRequest.getMethod(),