POST数据丢失:内容长度= 0

时间:2010-05-26 09:28:51

标签: forms post content-length

我一直试图找到一个解决方案多年没有成功。在我们的应用程序中,客户提交表单,在下一页我们处理它。有时虽然数据永远不会到来。这似乎只发生在我们的一些客户身上。似乎是在IE7和使用代理时发生的。

这是一些标题,请注意HTTP_VIA:

X-REWRITE-URL: /process.asp?r=699743 
APPL_MD_PATH: /LM/W3SVC/31555/ROOT
APPL_PHYSICAL_PATH: C:\inetpub\vhosts\mysite.com\httpdocs\
AUTH_PASSWORD: 
AUTH_TYPE: 
AUTH_USER: 
CERT_COOKIE: 
CERT_FLAGS: 
CERT_ISSUER: 
CERT_KEYSIZE: 
CERT_SECRETKEYSIZE: 
CERT_SERIALNUMBER: 
CERT_SERVER_ISSUER: 
CERT_SERVER_SUBJECT: 
CERT_SUBJECT: 
CONTENT_LENGTH: 0
CONTENT_TYPE: application/x-www-form-urlencoded
GATEWAY_INTERFACE: CGI/1.1
HTTPS: off
HTTPS_KEYSIZE: 
HTTPS_SECRETKEYSIZE: 
HTTPS_SERVER_ISSUER: 
HTTPS_SERVER_SUBJECT: 
INSTANCE_ID: 31555
INSTANCE_META_PATH: /LM/W3SVC/31555
LOCAL_ADDR: XXX.XXX.XXX.XXX
LOGON_USER: 
PATH_INFO: /process.asp
PATH_TRANSLATED: C:\inetpub\vhosts\mysite.com\httpdocs\process.asp
QUERY_STRING: r=699743
REMOTE_ADDR: YYY.YYY.YYY.YYY
REMOTE_HOST: YYY.YYY.YYY.YYY
REMOTE_USER: 
REQUEST_METHOD: POST
SCRIPT_NAME: /process.asp
SERVER_NAME: www.mysite.com
SERVER_PORT: 80
SERVER_PORT_SECURE: 0
SERVER_PROTOCOL: HTTP/1.1
SERVER_SOFTWARE: Microsoft-IIS/7.0
URL: /process.asp
HTTP_CONNECTION: Keep-Alive
HTTP_PRAGMA: no-cache
HTTP_VIA: 1.1 WEBCACHE-2
HTTP_CONTENT_LENGTH: 0
HTTP_CONTENT_TYPE: application/x-www-form-urlencoded
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
HTTP_ACCEPT_LANGUAGE: en-gb
HTTP_COOKIE: ASPSESSIONIDQCKSDCTS=FENMPCMDCHEOENGOJPGDGPLN;
HTTP_HOST: www.mysite.com
HTTP_REFERER: http://www.mysite.com/theform.asp
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
HTTP_UA_CPU: x86
HTTP_X_REWRITE_URL: /process.asp?r=699743

2 个答案:

答案 0 :(得分:1)

我们遇到了同样的问题。

来自IE7 / IE8的通过ISA代理的POST请求有时(可能是50次中的一次)错过了POST数据,并且内容长度为0。

这是ISA的已知问题 - 请参阅提供修复的http://support.microsoft.com/kb/942638

答案 1 :(得分:0)

我今天有类似的问题,有关该主题的所有答案都以Windows NTLM答案结尾。我使用Linux和Chrome,POST总是得到CONTENT_LENGTH=0,并且正在使用C ++代码进行调试以了解我做错了什么。最终发现,我在name字段中缺少<input ..../>属性。没有名字,没有提交。希望它对寻找类似问题的人有所帮助。