3.2.5.4 Receiving a Describe Request

The server MUST first follow the steps as specified in section 3.2.5.1.

The server MUST check with the higher layer that the URL that the client specified in the request is valid. If it is not valid, this is an error, and the server MUST respond with some suitable RTSP error status code (as specified in [RFC2326] 7.1.1), such as 404.

The server MUST check with the higher layer to determine if the client is to be redirected to a different server or to a proxy server, as specified in section 3.2.7.4. (The presence, or absence, of a Via header in the request can be used to determine if the request was delivered directly by the client or through a proxy server, as specified in section 3.2.7.4. Information on the Via header is specified in [RFC2326] section 12.43.

If the higher layer indicates that the client is to be redirected to another server, the server MUST respond with status code 302. If the client is to be redirected to a proxy server, as specified in section 3.2.7.4, the server SHOULD respond with status code 305. In both cases, the URL of the server, or proxy server, MUST be specified on the Location header in the response. Information on the Location header is specified in [RFC2326] section 12.25. The RTSP REDIRECT request method MUST NOT be used to redirect the client.

After sending a response with status codes 302 or 305, the server MUST delete the session state, if any, and close the TCP connection to the client.

If the value of proxy-role is equal to 1, as determined from the higher layer (section 3.2.7.3), the server MUST process the local event for Proxy Authentication, as specified in section 3.2.7.11. If the local event indicates that the client is not authorized to use the proxy server, the server MUST respond to the request with status code 403. If the local event indicates that the server shall include a Proxy-Authenticate header (as specified in [RFC2326] section 12.26) in the response, the server MUST include the Proxy-Authenticate header as provided by the higher layer and MUST specify status code 407 in the response.

If the server is not sending a response with status code 403 or 407, the server MUST process the local event for Origin Server Authentication, as specified in section 3.2.7.11. If the local event indicates that the client is not authorized to access the content, the server MUST respond to the request with status code 403. If the local event indicates that the server shall include a WWW-Authenticate header (as specified in [RFC2326] section 12.44) in the response, the server MUST include the WWW-Authenticate header as provided by the higher layer and MUST specify status code 401 in the response.

After sending a response with status code 401 or 407, the server MUST NOT close the TCP connection to the client because the client is expected to resubmit the Describe request with the appropriate credentials.

If the server is not sending a response with an error status code, and if the request does not specify a Session header, the server MUST create new state by performing the initialization procedure as specified in section 3.2.3.

The Describe response MUST follow the rules as specified in section 3.2.5.2 and MUST conform to the syntax specified in 2.2.7.2.

The server SHOULD use the local event defined in Broadcast ID (section 3.2.7.8) to obtain a numerical identifier. If the numerical identifier is provided, the server MUST include the X-Broadcast-Id header (section 2.2.6.16) in the Describe response, and the numerical value on that header MUST be equal to the numerical identifier provided by the higher layer. If the numerical identifier is unavailable, then the X-Broadcast-Id header MUST NOT be included in the Describe response.

The SDP in the message body of the Describe response MUST include the ASF file header of the current playlist entry, which is provided by the higher layer.

The SDP in the message body of the Describe response MUST specify a data URL with the MIME type "application/vnd.ms.wms-hdr.asfv1" in the SDP session level as specified in section 2.2.5.2.3.1. The SDP in the message body of the Describe response SHOULD specify a data URL with the MIME type "application/x-wms-contentdesc" in the SDP session level as specified in section 2.2.5.2.3.1. The SDP in the message body of the Describe response SHOULD include the content description list of the current playlist entry as specified in section 2.2.5.2.3.2.

The SDP in the message body of the Describe request SHOULD specify the Reliable attribute and the maxps attribute. For more information about how the reliable attribute is included in SDP, see section 2.2.5.2.4. For more information about how the maxps attribute is included in SDP, see section 2.2.5.2.2. The SDP MUST include the stream attribute for each media description. For more information about how the stream attribute is included in SDP, see section 2.2.5.2.5.

For each media description that corresponds to a stream in the ASF content, the server SHOULD request the "AS" bandwidth modifier from the higher layer (as specified in 3.2.7.9), and the server MUST include the "AS" bandwidth modifier in SDP as specified in section 2.2.5.1.1.

For each stream in the ASF content that has an average bit rate that is different from the peak bit rate the server MUST include the "X-AV" bandwidth modifier in SDP as specified in section 2.2.5.1.4.

After sending the response, if the status code indicates success (for example, 200), the server MUST wait for a TcpPacketPair request or a SelectStream request to be received. How to process a TcpPacketPair request is specified in section 3.2.5.5. How to process a SelectStream request is specified in section 3.2.5.6.

If the status code of the response was 401 or 407, the server MUST wait for another Describe request and process it as specified in this section.