Why “Content-Length: 0” in POST requests?

后端 未结 13 1509
轻奢々
轻奢々 2020-11-28 05:50

A customer sometimes sends POST requests with Content-Length: 0 when submitting a form (10 to over 40 fields).

We tested it with different browsers and

13条回答
  •  感情败类
    2020-11-28 06:07

    Microsoft's hotfix for KB821814 can set Content-Length to 0:

    The hotfix that this article describes implements a code change in Wininet.dll to:

    • Detect the RESET condition on a POST request.
    • Save the data that is to be posted.
    • Retry the POST request with the content length set to 0. This prevents the reset from occurring and permits the authentication process to complete.
    • Retry the original POST request.

提交回复
热议问题