"Connection: Close" Headers Stripped from HttpAddRequestHeaders or HttpSendRequest

This article has been archived. It is offered "as is" and will no longer be updated.
When you use the WinInet Application Programming Interface (API) HttpAddRequestHeader or HttpSendRequest call to add a "Connection: Close" header to force a non-persistent HTTP connection, the "Connection: Close" header may be stripped from the request before it is sent to the remote server.
For example, the following sample code may send the request without the "Connection: Close" header:
sHeader = "Connection: close"iRetVal = HttpSendRequest(hHttpOpenRequest, sHeader, Len(sHeader), 0, 0)				
This behavior occurs if the request is sent as an HTTP/1.1 request.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
More information
For more information about HTTP persistent connections, see the "Hypertext Transfer Protocol -- HTTP/1.1" RFC at the following Web site:Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

Article ID: 259984 - Last Review: 01/11/2015 03:34:23 - Revision: 4.0

  • kbnosurvey kbarchive kbprb KB259984