iPhone

时间:2018-06-18 00:18:51

标签: iphone post safari form-data

我用Python开发了自己的简单Web服务器,它成功处理了运行Chrome或IE的PC的GET和POST请求。但是,当Safari或Chrome从iPhone提交POST请求时,参数列表(通常紧跟在POST请求标头之后)将丢失!

来自在PC上运行的浏览器的POST请求包括以下信息:

POST /IrrCommand.cgi HTTP / 1.1

主持人:xxx.xxx.xxx.xxx

连接:保持活力

内容长度:46

缓存控制:max-age = 0

原产地:http://xxx.xxx.xxx.xxx

升级 - 不安全请求:1

内容类型:application / x-www-form-urlencoded

User-Agent:Mozilla / 5.0(Windows NT 6.1; Win64; x64)AppleWebKit / 537.36(KHTML,与Gecko一样)Chrome / 67.0.3396.87 Safari / 537.36

接受:text / html的,应用/ XHTML + xml的,应用/ XML; Q = 0.9,图像/ WEBP,图像/ APNG, / 的; Q = 0.8

参考者:http://xxx.xxx.xxx.xxx/IrrigationCommand.htm

Accept-Encoding:gzip,deflate

接受语言:en-US,en; q = 0.9

模式=&安培;程序=安培;区域=安培;时间=安培; butViewLog =查看+登录

来自在iPhone上运行的浏览器的POST请求包含以下信息:

POST /IrrCommand.cgi HTTP / 1.1

主持人:xxx.xxx.xxx.xxx:8080

内容类型:application / x-www-form-urlencoded

原产地:http://xxx.xxx.xxx.xxx:8080

Accept-Encoding:gzip,deflate

连接:保持活力

升级 - 不安全请求:1

接受:text / html,application / xhtml + xml,application / xml; q = 0.9, / ; q = 0.8

User-Agent:Mozilla / 5.0(iPhone; CPU iPhone OS 11_4,如Mac OS X)AppleWebKit / 604.1.34(KHTML,类似Gecko)CriOS / 67.0.3396.87 Mobile / 15F79 Safari / 604.1

参考者:http://xxx.xxx.xxx.xxx:8080/IrrigationCommand.htm

内容长度:56

接受语言:en-us

请注意,参数列表“Mode =& Program =& Zone =& Time =& butViewLog = View + Log”缺失。

我搜索过高低,我找不到任何有关此事的报告给其他人。令人困惑的是,我没有看到服务器如何影响浏览器发送POST请求的内容,除非页面原始GET请求的标题中缺少某些属性。

0 个答案:

没有答案
相关问题