Identifying a Cache Proxy Server

banner art

Previous Next

Identifying a Cache Proxy Server

A Windows Media cache proxy server uses via headers, user agents, and player IDs to identify itself to other servers so that they can correctly determine how to handle cache proxy requests.

Via Headers

An RTSP or HTTP via header identifies the servers that have processed the original client request. A Windows Media cache proxy server modifies the via header to reflect any request that it receives from a downstream proxy server. The header has the following format.

    [,] protocol/protocol_version psuedonym (comment)

The following table identifies the header elements.

Element Description
, (comma) If the header already exists, commas are used to separate multiple via strings.
received protocol The name of the protocol (HTTP, RTSP, MMS) that the downstream client uses to connect to the proxy server. (The MMS protocol is not supported in Windows Server 2008 operating systems.)
protocol_version The version of the received protocol. The format is n.n where each n represents an integer.
pseudonym A name that identifies the cache proxy server. If this is a server running Windows Media Services 9 Series, the user agent is used.
comment Comment identifying the cache proxy server. The format is

    product/version number

The product is always the WMCacheProxy user agent. The version information can include the build number. For example, build 2999 of Windows Media Services 9 Series is indicated by

    WMCacheProxy/9.00.00.2999

This field is required for a Windows Media server.

The comment is enclosed by parentheses.

Every Windows Media proxy server that forwards a request upstream appends the preceding information to the via header. For example, assume that there are two proxy servers between a client and an origin server. If a client connects to the first proxy by using HTTP version 1.1, the first proxy sends the following via header to the second proxy server.

    Via: http/1.1 WMCacheProxy (WMCacheProxy/9.00.00.2999)

The second proxy appends a comma followed by its via information. Assume that the first proxy connects to the second by using RTSP.

    Via: http/1.1 WMCacheProxy (WMCacheProxy/9.00.00.2999), RTSP/1.0 
    WMCacheProxy (WMCacheProxy/9.00.00.2999)

You can retrieve a via header from the WMS_USER_VIA_DOWNSTREAM_PROXIES and the WMS_USER_VIA_UPSTREAM_PROXIES fields in the user context.

User Agents

When a Windows Media Services 9 Series cache proxy server connects upstream to another version 9 or later server, it specifies WMCacheProxy as a user agent. It also passes the user agent of the original requesting client. The upstream server can discover the cache proxy user agent by examining the WMS_USER_AGENT attribute in the user context, and it can discover the user agent of the original requesting client by examining the WMS_USER_PROXY_CLIENT_AGENT attribute. The origin server can use the user agent to identify whether the client is a player or a distribution server and impose limits accordingly. A server can specify limits by using the IWMSServerLimits interface or the IWMSPublishingPointLimits interface.

  • Note   When a Windows Media Services 9 Series cache proxy server connects upstream to a version 4.1 server, it sends either NSPlayer or NSServer as a user agent depending on whether it is requesting, respectively, a client connection or a distribution connection.

Player ID (GUID)

When a Windows Media Services 9 Series cache proxy server connects upstream to another version 9.0 or later server, it sends its unique GUID as a player ID. This enables the upstream server to identify the downstream client when it connects back. The upstream server can discover the player ID by examining the WMS_USER_GUID attribute in the user context. However, the upstream server must rely on the original user agent to determine whether the downstream client is a distribution server or player.

When a cache proxy server propagates a remote event upstream, it places its own player ID in the WMS_USER_GUID field of the user context created when it connected to the upstream server, and it places the player ID of the original client in the WMS_USER_GUID field of the user context associated with the remote event.

See Also (General)

See Also (Visual Basic .NET)

See Also (C#)

See Also (C++)

Previous Next