Microsoft KB Archive/920913

From BetaArchive Wiki
Knowledge Base


Error message in response to some HTTP requests on client computers that are running ISA Server 2004 as a proxy server: "400 Bad Request"

Article ID: 920913

Article Last Modified on 12/4/2007



APPLIES TO

  • Microsoft Internet Security and Acceleration Server 2004 Enterprise Edition
  • Microsoft Internet Security and Acceleration Server 2004 Standard Edition



SYMPTOMS

On client computers that are configured to run Microsoft Internet Security and Acceleration (ISA) Server 2004 as a proxy server, you receive the following response to some HTTP requests:

400 Bad Request

You experience this problem if the following conditions are true:

  • ISA Server 2004 is chained to an upstream proxy server.
  • The upstream proxy server is not running ISA Server.
  • The HTTP request does not contain a host header.


CAUSE

This problem occurs because ISA Server 2004 does not submit a host header to an upstream proxy server if the host header is missing from the client request. Therefore, the upstream proxy server may return the error message that is mentioned in the "Symptoms" section if the client request does not contain a host header.

By default, ISA 2004 sends HTTP requests as an HTTP 1.1 client. These kinds of client requests must include a host header. This requirement is specified in RFC 2616. Because ISA Server 2004 does not add a host header when it proxies the client request, the upstream proxy server may refuse the request.

Note This problem does not occur if the upstream proxy server is running ISA Server. ISA Server does not comply with RFC 2616 requirement to deny a HTTP 1.1 request that does not specify a host header.

RESOLUTION

To resolve this problem, install the hotfix that is mentioned in the following Microsoft Knowledge Base article:

921937 Description of the ISA Server 2004 hotfix package: July 6, 2006


After you install this hotfix package, ISA Server 2004 adds the host header if the host header is missing from the client request.

Important You must be running ISA Server 2004 Service Pack 2 (SP2) to install this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

891024 How to obtain the latest ISA Server 2004 service pack


STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide extra functionality or construct procedures to meet your specific requirements.

After you install the hotfix that is mentioned in article 921937, you can restore the behavior of the original release version of ISA Server 2004. The original behavior is that ISA Server 2004 does not add a host header when it proxies an HTTP client request. To restore the original behavior in ISA Server 2004, set the following vendor parameter:

REVERT_920913


To set the Revert_920913 vendor parameter, follow these steps:

  1. Start a text editor. For example, start Notepad.
  2. Paste the following script in the text editor, and then save the file by using a .vbs file name extension. For example, save the file as Revert_920913.vbs.

    Const SE_VPS_GUID = "{143F5698-103B-12D4-FF34-1F34767DEabc}"
    Const SE_VPS_VALUE = "Revert_920913"
    
    Sub SetValue()
    
        ' Create the root obect.
        Dim root  ' The FPCLib.FPC root object
        Set root = CreateObject("FPC.Root")
    
        'Declare the other objects needed.
        Dim array       ' An FPCArray object
        Dim VendorSets  ' An FPCVendorParametersSets collection
        Dim VendorSet   ' An FPCVendorParametersSet object
    
        ' Get references to the array object
        ' and the network rules collection.
        Set array = root.GetContainingArray
        Set VendorSets = array.VendorParametersSets
    
        On Error Resume Next
        Set VendorSet = VendorSets.Item( SE_VPS_GUID )
    
        If Err.Number <> 0 Then
            Err.Clear
    
            ' Add the item
            Set VendorSet = VendorSets.Add( SE_VPS_GUID )
            CheckError
            WScript.Echo "New VendorSet added... " & VendorSet.Name
    
        Else
            WScript.Echo "Existing VendorSet found... value- " &  VendorSet.Value(SE_VPS_VALUE)
        End If
    
        if VendorSet.Value(SE_VPS_VALUE) <> true Then
    
            Err.Clear
            VendorSet.Value(SE_VPS_VALUE) = true
    
            If Err.Number <> 0 Then
                CheckError
            Else
                VendorSets.Save false, true
                CheckError
    
                If Err.Number = 0 Then
                    WScript.Echo "Done with " & SE_VPS_VALUE & ", saved!"
                End If
            End If
        Else
            WScript.Echo "Done with " & SE_VPS_VALUE & ", no change!"
        End If
    
    End Sub
    
    Sub CheckError()
    
        If Err.Number <> 0 Then
            WScript.Echo "An error occurred: 0x" & Hex(Err.Number) & " " & Err.Description
            Err.Clear
        End If
    
    End Sub
    
    SetValue
  3. Click Start, click Run, type cmd, and then click OK.
  4. At the command prompt, use the cd command to change to the directory to which you saved the script.
  5. Type cscript scriptname, and then press ENTER. For example, type csript Revert_920913.vbs, and then press ENTER.


REFERENCES

For more information about how to install ISA Server 2004 hotfixes and updates, click the following article number to view the article in the Microsoft Knowledge Base:

885957 How to install ISA Server 2004 hotfixes and updates


Keywords: kberrmsg kbtshoot kbbug kbfix kbfirewall kbprb KB920913