WinHTTP version 5.1 is an OS-level component of Windows 2000 SP3 and later (except Datacenter Server), Windows XP SP1 and later and Windows Server 2003 SP1 and later.
Some of the features of WinHTTP version 5.1 include:
As with WinINet, WinHTTP leverages the underlying Sockets Interface and Emulator to access the network, as shown below. WinHTTP is similar to WinINet - except that WinHTTP only provides the API's to support the HTTP protocol. Protocols such as Gopher and FTP are handled by WinINet.
The WinHTTP API is implemented in WinHTTP.DLL and exposes both COM methods and a Win32 API. In addition, there is an AutoProxy API exposed that enables applications to discover the proxy configuration. An application uses WinHTTP in similar fashion to how a client application would use WinINet. The first step in the process is for the application to get a session handle to WinHTTP. Once WinHTTP has been opened, the application uses this handle to configure information about the server with which it wishes to communicate. This does not actually cause WinHTTP.DLL to make a connection using Sockets - the HTTP request must first be created. Only then is the connection to the server through sockets instigated and the HTTP request sent.
The AutoProxy API's are provided to make it easier for applications to configure and discover proxy settings. The Web Proxy Auto-Discovery (WPAD) protocol is implemented by WinHTTP version 5.1 for this purpose. WPAD uses DHCP and / or DNS to locate a Proxy Auto-Configuration (PAC) file on the client's local network. The PAC file is downloaded and may be cached on the client computer. A PAC file is a script that generates a list of one or more proxy servers given a target host name and URL. The script is executed on each HTTP request to compute list of one or more proxy servers that can be used to transmit the request. It is important to remember that WinHTTP supports only ECMAScript-based PAC files .
And that brings us to the end of our look at WinHTTP. We will be looking at troubleshooting scenarios in a future post. I'd like to express my thanks once again to Brent Goodpaster, one of our Escalation Engineers, for his contributions to this post. Until next time ...
Additional Resources:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.