Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Unable to specify HTTP version by using HttpOpenRequest()


View products that this article applies to.

Symptoms

When you make a WinInet API HttpOpenRequest call, the lpszVersion parameter is used to specify the requested HTTP version. Although it is possible to specify a specific HTTP version (such as HTTP/1.0), WinInet may ignore this parameter depending on the default HTTP protocol version set in the registry.

↑ Back to the top


Cause

If HTTP/1.1 is specified in the registry, WinInet overrides the lpszVersion parameter specified. By default, Internet Explorer 5.01 is set to use HTTP/1.1 for typical connections and HTTP/1.0 through a proxy. The registry keys that control this include the following keys.

For typical connections:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
"EnableHttp1_1"=dword:00000001 (default for HTTP/1.1 enabled)
For proxy connections:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
"ProxyHttp1.1"=dword:00000000 (default for HTTP/1.1 disabled through proxy)

↑ Back to the top


Workaround

Disable HTTP/1.1 on all connections. You can do this by clicking to clear the Use HTTP 1.1 and Use HTTP 1.1 through proxy connections check boxes in the advanced properties of Internet Explorer. You can also do this programmatically by changing the registry keys listed earlier.

↑ Back to the top


Keywords: KB258425, kbprb

↑ Back to the top

Article Info
Article ID : 258425
Revision : 6
Created on : 2/28/2007
Published on : 2/28/2007
Exists online : False
Views : 173