"Connection: Close" Headers Stripped from HttpAddRequestHeaders or HttpSendRequest

Article translations Article translations
Article ID: 259984 - View products that this article applies to.
This article was previously published under Q259984
Expand all | Collapse all


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.


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: February 28, 2007 - Revision: 3.2
  • Microsoft Internet Explorer 5.01
  • Microsoft Internet Explorer 5.01
  • Microsoft Windows 2000 Standard Edition
  • Microsoft Windows Internet Services (WinInet)
kbprb KB259984

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com