The HTTP stack that MSXML3
ServerXMLHTTP uses, WinHTTP, is an HTTP/1.0-compliant stack with support for persistent connections.
ServerXMLHTTP uses a COM Automation component called
WinHttpRequest that is based on the core WinHTTP Win32 application programming interface (API).
Section 19.6.2 ("Compatibility with HTTP/1.0 Persistent Connections") of the HTTP/1.1 specification (RFC 2616) contains the following text:
Persistent connections in HTTP/1.0 are explicitly negotiated as they are not the default behavior.
When an HTTP/1.1 server interoperates with a 1.0 client, the server response to a request should specify whether the connection is closed or persisted after the response is delivered.
WinHTTP supports persistent connections, but assumes that the server will close the connection if the server response does not include a Connection header. This is the opposite behavior of an HTTP/1.1 client, which assumes that the connection is persisted unless explicitly informed otherwise with a Connection: Close response header.
Furthermore, the
WinHttpRequest component ignores any Content-Length header in the response. It does this because occasionally the value that is given in the Content-Length header is incorrect, so
WinHttpRequest continues to read response data from the TCP socket connection until it encounters the end of the response stream. However, if the connection is persisted, the Content-Length value must be honored so that no attempt is made to read past the end of the response data. Because the connection is persisted,
ServerXMLHTTP stops responding if WinHTTP attempts to read more data than will actually be delivered in the socket connection.