繁体   English   中英

HttpListenerReponse和PHP POST请求

[英]HttpListenerReponse and PHP POST requests

这是数据包的外观

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

如何使第二个请求生效?

添加了一些标题,删除了一些标题,一切开始正常工作! 您需要允许访问控制源,否则它只能在IE上运行。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM