You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as expected the application is sending invalid Content-Type header
[org.apache.http.headers] http-outgoing-5 >> Content-Type: multipart/form-data
Please do not set Content-Type manually and let HttpClient generate it for you based on properties of the HttpEntity enclosed in the request_
The text was updated successfully, but these errors were encountered:
经我验证在代码:
me.chanjar.weixin.common.util.http.MediaUploadRequestExecutor.java中
HttpEntity entity = MultipartEntityBuilder
.create()
.addBinaryBody("media", file)
.setMode(HttpMultipartMode.RFC6532)
.build();
httpPost.setEntity(entity);
httpPost.setHeader("Content-Type", ContentType.MULTIPART_FORM_DATA.toString());
最后设置的contentType导致,去掉此设置即可。
参考:
_Try removing this line
httppost.setHeader("Content-Type", "multipart/form-data");
Updated
as expected the application is sending invalid Content-Type header
[org.apache.http.headers] http-outgoing-5 >> Content-Type: multipart/form-data
Please do not set Content-Type manually and let HttpClient generate it for you based on properties of the HttpEntity enclosed in the request_
The text was updated successfully, but these errors were encountered: