Versioning in HTTP Server Version 2.0 API
The HTTP Server version 2.0 API makes obsolete the version 1.0 request queues and URL associations with the request queue. Object-scoped versioning allows applications to supply application-specific version information. An applications can automatically call the correct version of structures for the operating system on which it is running.
Starting with HTTP Server version 2.0 API, request queues are created with HttpCreateRequestQueue making obsolete the version 1.0 HttpCreateHttpHandle function. URL groups are introduced in version 2.0 with the HttpCreateUrlGroup function. URLs are added to the group using HttpAddUrlToUrlGroup which makes obsolete the version 1.0 HttpAddUrl function. Version 2.0 URL groups must not be used with version 1.0 request queues.
Starting with version 2.0, the following version 1.0 functions are obsolete and cannot be used with version 2.0 request queues:
In version 1.0, the application supplies the HTTP Server API version in the call to HttpInitialize. The version information is accepted only from the first application that called HttpInitialize and is applied to all the HTTP Server API applications in the same process. Starting with the version 2.0 API, the global version information supplied in the call to HttpInitialize is not used. For version 2.0 applications, the HTTP Server API version is passed in the Version parameter when the request queue or server session is created by HttpCreateRequestQueue or HttpCreateServerSession. When the request queue is created with the version 1.0 HttpCreateHttpHandle, it is automatically marked as version 1.0. Both version 1.0 and version 2.0 applications can run in the same process.
The HTTP_REQUEST and HTTP_RESPONSE structures are updated to include authentication information in the HTTP Server version 2.0 API. HTTP_REQUEST_V1 and HTTP_REQUEST_V2 are specific to the version of the API used by the application. However, applications should not use these structures directly in their code; instead they should use HTTP_REQUEST to get the correct version based on the version of the request queue on which the request was received. Also, be aware that size of the HTTP_REQUEST structure is based on the version of the operating system under which the code is compiled.