简体   繁体   English

非HTTP的分块多部分POST与Apache的HttpClient

[英]Non-HTTP-Chunked Multipart POST with apache httpclient

Is there a way to send multipart POST requests via the Apache HTTPClient library that does not use Chunked HTTP Encoding? 有没有一种方法可以通过不使用分块HTTP编码的Apache HTTPClient库发送多部分POST请求?

I'm trying to upload files to Wikimedia Commons, and they are still using HTTP/1.0 - so I'm unable to actually upload anything. 我正在尝试将文件上传到Wikimedia Commons,而它们仍在使用HTTP / 1.0-因此我无法实际上传任何东西。

All you have to do is to configure HttpClient to use HTTP/1.0. 您所要做的就是将HttpClient配置为使用HTTP / 1.0。 This will automatically disable chunk coded transfer encoding for entity closing requests. 这将自动为实体关闭请求禁用组块编码的传输编码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM