goas 2015-10-26 07:45 采纳率: 60%
浏览 2221

httpclient4+怎么禁用编码(Content-Transfer-Encoding)

httpclient
当POST表单时使用了Content-Type:multipart/form-data时表单自动编码了:
如下

POST  ------------------ HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/form-data; boundary=
MIME-Version: 1.0
Content-Length: 6329
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.3.1 (java 1.5)
Cookie: JSESSIONID=
Cookie2: $Version=1

- - - -   -=_Part_35_1834923761.1445844705665
Content-Type: text/plain; charset=UTF-8 
Content-Transfer-Encoding: quoted-printable
Content-Disposition: form-data; name="content"

<?xml version=3D'1.0' encoding=3D"GBK" standalone=3D"yes"?>
<Package xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <RequestType>01</RequestType>
    <SendTime>2014-11-28 11:35:05</SendTime>
    <ThirdSerial>R2015030501</ThirdSerial>
    <ComSerial xsi:nil=3D"true"/>
    <Asyn>0</Asyn>
    <ProductCode>0001</ProductCode>
  </Header>
  <Request>

POST是一个表单 ,xml本身是表单content的值,
可是服务器不支持quoted-printable这个编码,tmd.
求解

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 gradio的web端页面格式不对的问题
    • ¥15 求大家看看Nonce如何配置
    • ¥15 Matlab怎么求解含参的二重积分?
    • ¥15 苹果手机突然连不上wifi了?
    • ¥15 cgictest.cgi文件无法访问
    • ¥20 删除和修改功能无法调用
    • ¥15 kafka topic 所有分副本数修改
    • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
    • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?
    • ¥40 串口调试助手打开串口后,keil5的代码就停止了