0

这是数据包的外观

HTTP/1.1 200 OK
Content-Encoding: gzip
Vary: Accept-Encoding
Date: Thu, 18 Oct 2012 13:52:49 GMT
Server: LiteSpeed
Connection: close
X-Powered-By: PHP/5.3.10
Content-Type: text/html
Content-Length: 35 

HTTP/1.1 200 OK
Content-Length: 35
Content-Type: text/html
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 18 Oct 2012 14:17:13 GMT
Connection: close

两者的 GZIP 输出是相同的,但使用 PHP 生成的顶部的输出有效,而生成的 HttpListenerResponse 的底部不使用 POST 请求,即使您可以在浏览器中查看两者。我也不叫跨域/端口。

如何使第二个请求起作用?

4

1 回答 1

0

添加了一些标题删除了一些标题一切都开始工作了!您需要允许访问控制来源,否则它将仅适用于 IE。

于 2012-10-18T18:31:02.540 回答