HttpListenerReponse和PHP POST请求

时间:2012-10-18 14:41:49

标签: c# php httplistener

以下是数据包的外观

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请求,即使您可以在浏览器中查看两者。我也不打电话给跨域/端口。

如何让第二个请求有效?

1 个答案:

答案 0 :(得分:0)

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

相关问题