2

如果我在本地发出请求(POST [http://localhost:8790/blah/]),我会得到以下响应标头:

Cache-Control   private
Content-Length  32
Content-Type    application/json
Date    Tue, 19 Mar 2013 13:59:34 GMT
Server  Microsoft-IIS/7.5
X-AspNet-Version    4.0.30319
X-AspNetMvc-Version 4.0
X-Powered-By    ASP.NET

如果我远程发出请求(POST [http://123.456.1789:8790/blah/]),我会得到以下响应标头:

Cache-Control   private
Content-Length  11
Content-Type    text/html
Date    Tue, 19 Mar 2013 14:08:40 GMT
Server  Microsoft-IIS/7.5
X-AspNet-Version    4.0.30319
X-AspNetMvc-Version 4.0
X-Powered-By    ASP.NET

POST参数比较肤浅:name=value1&name2=value2

如您所见,内容类型不同,因此返回的数据也不同。

有谁知道发生了什么?

编辑本地请求

Accept  application/json
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Cache-Control   no-cache
Connection  keep-alive
Content-Length  36
Content-Type    application/x-www-form-urlencoded; charset=UTF-8
Cookie  blah=blah;
Host    localhost:8790
Pragma  no-cache
Referer [http://localhost:8790/blah/]
User-Agent  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
X-Requested-With    XMLHttpRequest

远程请求

Accept  application/json
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Cache-Control   no-cache
Connection  keep-alive
Content-Length  36
Content-Type    application/x-www-form-urlencoded; charset=UTF-8
Cookie  blah=blah;
Host    123.456.1789:8790
Pragma  no-cache
Referer [http://123.456.1789:8790/blah/]
User-Agent  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
X-Requested-With    XMLHttpRequest
4

0 回答 0