问题描述
我在一个项目中找到了这个表单,它在Chrome中运行正常,但在Internet Explorer中无法运行。 IE8确实将表单提交为POST,但不发送隐藏的输入:
< form name =logout_frmid = logoutaction =index.phpmethod =post>
< label>注销< / label>
< input type =hiddenname =logoutvalue =1/>
< input type =submitname =logoutBtnvalue =logout/>
< / form>
这是我从也是WebForms选项卡为空:
POST https:// example.com/index.php HTTP / 1.1
接受:application / x-ms-application,image / jpeg,application / xaml + xml,image / gif,image / pjpeg,application / x-ms-xbap, * / *
Referer:https://hostname.net/index.php
Accept-Language:de-DE
用户代理:Mozilla / 4.0(兼容; MSIE 8.0; Windows NT 6.1; WOW64; Trident / 4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Content-Type:application / x-www-form-urlencoded
Accept-Encoding:gzip,deflate
Host:hostname.net
Content-Length:0
连接:Keep-Alive
Cache-Control:no-cache
Cookie:GUEST_LANGUAGE_ID = en_US; COOKIE_SUPPORT = TRUE; NTLM = 1; PHPSESSID = 28b0fbgol5bnq56qqst423p80ota470sqclbnpc4p5egqqdbt4tw
授权:NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAAAbEdAAAAAA ==
更新
如果我清除缓存并重新加载页面,它将只运行一次,但只能运行一次。也许这与NTLM登录授权:NTLM
。
当我注意到它是关于的时候,只是禁用了它现在它可以工作:
< META HTTP-EQUIV =PragmaCONTENT =no-cache>
< META HTTP-EQUIV =ExpiresCONTENT = - 1>
这不是一个真正的答案,因为它不能解释这里正在做什么,但它是一种解决方法。
I found this form in a project and it works fine in Chrome but not in Internet Explorer. IE8 does submit the form as POST but does not send the hidden input:
<form name="logout_frm" id="logout" action="index.php" method="post">
<label>Logout</label>
<input type="hidden" name="logout" value="1" />
<input type="submit" name="logoutBtn" value="logout" />
</form>
This is the raw data I get from fiddle2 also WebForms Tab is empty:
POST https://example.com/index.php HTTP/1.1
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, */*
Referer: https://hostname.net/index.php
Accept-Language: de-DE
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Host: hostname.net
Content-Length: 0
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: GUEST_LANGUAGE_ID=en_US; COOKIE_SUPPORT=true; ntlm=1; PHPSESSID=28b0fbgol5bnq56qqst423p80ota470sqclbnpc4p5egqqdbt4tw
Authorization: NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAAAbEdAAAAAA==
Update
If I clear the cache and reload the page it works one time but only once. Maybe this is somehow related to the NTLM login Authorization: NTLM
.
After I noticed it is something about caching simply disabled it and now it works:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
This is not really an answer as it does not explain what is doing on here but it is a workaround.
这篇关于IE8不会在表单中提交隐藏的输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!