Invalid Content-Length Header May Cause Requests to Fail Through ISA Server (300707)



The information in this article applies to:

  • Microsoft Internet Security and Acceleration Server 2000

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 "400 Bad Request" error message to be returned when the Web browser send an invalid content-length header.

RESOLUTION

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next ISA Server 2000 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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.

Modification Type:MajorLast Reviewed:4/7/2006
Keywords:kbQFE KBHotfixServer kberrmsg kbISAServ2000sp1fix kbnetwork kbprb KB300707