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

发布于 2024-09-02 20:21:36 字数 1970 浏览 3 评论 0原文

多年来我一直在尝试寻找解决方案,但没有成功。在我们的应用程序上,客户提交一份表单,然后我们在下一页上对其进行处理。有时虽然数据永远不会到达。这种情况似乎只发生在我们的少数客户身上。似乎是在 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

I've been trying to find a solution for ages with no success. On our app, customers submit a form and on the next page we process it. Sometimes though the data never arrives. This seems to happen for just a few of our customers. Seems to happen with IE7 and using a proxy.

Here's some headers, note the 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

朱染 2024-09-09 20:21:36

我们也遇到了同样的问题。

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

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

We've been having the same problem.

POST requests from IE7/IE8 that go through ISA proxy are sometimes (maybe one time in 50) missing the POST data, and have a content-length of 0.

This is a known issue with ISA - see http://support.microsoft.com/kb/942638 which provides a fix.

闻呓 2024-09-09 20:21:36

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

I had similar problem today and all answers on topic end up with Windows NTLM answer. I had Linux and Chrome, POST always got CONTENT_LENGTH=0 and I was debugging in C++ code to understand what I did wrong. As I finally found out, I was missing name attribute in <input ..../> fields. Without names nothing was submitted. Hope it helps someone who looks for similar issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文