Unable to Specify HTTP Version by Using HttpOpenRequest() (258425)



The information in this article applies to:

  • Microsoft Internet Explorer 5.01 for Windows NT 4.0
  • Microsoft Internet Explorer 5.01 for Windows 98
  • the operating system: Microsoft Windows 2000
  • Microsoft Windows Internet Services (WinInet)

This article was previously published under Q258425

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.

Modification Type:MajorLast Reviewed:12/3/2003
Keywords:kbprb KB258425