Article ID: 258425 - Last Review: February 28, 2007 - Revision: 3.3

Unable to specify HTTP version by using HttpOpenRequest()

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
This article was previously published under Q258425
Expand all | Collapse all

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.

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)

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.

APPLIES TO
  • Microsoft Internet Explorer 5.01
  • Microsoft Internet Explorer 5.01
  • Microsoft Windows 2000 Standard Edition
  • Microsoft Windows Internet Services (WinInet)
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Internet Explorer 6.0
  • Windows Internet Explorer 7
Keywords: 
kbprb KB258425