Microsoft KB Archive/300707

= Invalid Content-Length Header May Cause Requests to Fail Through ISA Server =

Article ID: 300707

Article Last Modified on 10/26/2007

-

APPLIES TO


 * Microsoft Internet Security and Acceleration Server 2000 Standard Edition

-



This article was previously published under Q300707



SYMPTOMS
When you send a HTTP POST request from a Web browser through Internet Security and Acceleration (ISA) Server 2000, you may receive the following error message in the Web browser:

HTTP/1.1 400 Bad Request (The data is invalid).

This error message may be the only response that is displayed in the Web Browser, or it may be displayed together with the correct response in the same HTML page.

This error message may be displayed in both a Web publishing scenario or for Web proxy clients behind ISA Server that are accessing Web servers on the Internet.



CAUSE
This problem occurs because certain Web browsers send two extra bytes (Carriage Return and Line Feed) at the end of the message body (data portion) of an HTTP POST request. However, the Web browser does not reflect these two extra bytes in the HTTP content-length header, which causes the message body to contain two more bytes than the HTTP content-length header indicates.

The Web Proxy service in ISA Server 2000 contains checks for this condition, which cause the &quot;400 Bad Request&quot; error message to be returned when the Web browser send an invalid content-length header.



RESOLUTION
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this fix should have the following file attributes or later:

  Date        Time       Version       Size      File name --  6/12/2001   13:14:32   3.0.1200.65   373,520   W3proxy.exe



WORKAROUND
To work around this problem in a publishing scenario, use server publishing instead of Web publishing. Because server publishing does not work at the application layer, server publishing cannot detect the mismatch between the content-length header and the actual length of the data that is sent.

For outgoing Web requests, use a SecureNAT or firewall client; this should work as long as the HTTP redirector application filter is disabled or is configured to access the Web server directly.

A Web browser that does not send invalid content-length headers works correctly, and is therefore the optimal solution.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
The HTTP 1.1 Request for Comments (RFC) document clearly states that sending an invalid content-length header is not acceptable for an HTTP 1.1 client or server. Although the fix that is described in this article is designed to be installed on ISA Server 2000, strictly speaking, it is the Web browser that should be corrected so that it does not send an invalid content-length header.

Additional query words: crlf cr lf \r\n \r 0D 0A

Keywords: kbproductlink kbqfe kbhotfixserver kberrmsg kbnetwork kbprb KB300707

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.