小编Hur*_*rby的帖子

HTTP:非法分块编码

我有一个 .NET 客户端应用程序,它使用第三方库通过 http 访问服务器。该库抛出以下错误:

The server committed a protocol violation. Section=ResponseBody Detail=Response chunk format is invalid
Run Code Online (Sandbox Code Playgroud)

该软件已经安装了数十次,所以我认为这一定是客户系统中的问题,我怀疑是之间的代理。

我已经使用 Fiddler 来获得第一个提示。在嗅探 Fiddler 时注意到违反协议:

Illegal chunked encoding. 'MIME-Version: 1.0' is not a hexadecimal number.
Run Code Online (Sandbox Code Playgroud)

Fiddler 显示以下响应:

MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary_RsidtvFKHs9ymusS/NI6l56qcD8r76ye; type=text/xml

--MIME_boundary_RsidtvFKHs9ymusS/NI6l56qcD8r76ye
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <osci@message>
Content-Length: 1545

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ soapMessageEncrypted.xsd http://www.w3.org/2000/09/xmldsig# oscisig.xsd http://www.w3.org/2001/04/xmlenc# oscienc.xsd"><soap:Body><xenc:EncryptedData MimeType="Multipart/Related"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"></xenc:EncryptionMethod><ds:KeyInfo><xenc:EncryptedKey><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"></xenc:EncryptionMethod><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIID0jCCArqgAwIBAgIJAMg6MGbE+zZRMA0GCSqGSIb3DQEBDQUAMIGJMQswCQYDVQQGEwJERTEf
MB0GA1UECAwWTWVja2xlbmJ1cmctVm9ycG9tbWVybjERMA8GA1UEBwwIU2Nod2VyaW4xLDAqBgNV
BAoMI0NvbXB1dGVyLUJlcm
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,响应意外停止。

有谁知道问题可能是什么或如何解决?

mime protocols http http-1.1 chunked

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

chunked ×1

http ×1

http-1.1 ×1

mime ×1

protocols ×1