Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
understanding-SIP.pdf
Скачиваний:
115
Добавлен:
01.03.2016
Размер:
3.99 Mб
Скачать

SIP Header Fields

169

 

Table 6.20

 

Example of WWW-Authenticate Header Field

Header Field

Meaning

WWW-Authenticate: Digest

realm=”example.com”,

nonce=”9c8e88df84f1cec4341ae6e5a359”, opaque=””, stale=FALSE, algorithm=MD5

HTTP digest challenge.

response, the UAC should acknowledge receipt of the response with a PRACK method, as described in Section 4.1.13. The RSeq header field contains a reliable sequence number that is an integer randomly initialized by the UAS. Each subsequent provisional response sent reliably for this dialog will have a monotonically increasing RSeq number. The UAS will retransmit a reliably sent response until a PRACK is received with a RAck containing the reliable sequence number and

CSeq.

An example is:

RSeq: 23452

6.4 Message Body Header Fields

These header fields contain information about the message body.

6.4.1Content-Encoding

The Content-Encoding header field is used to indicate that the listed encoding scheme has been applied to the message body. This allows the UAS to determine the decoding scheme necessary to interpret the message body. Multiple listings in this header field indicate that multiple encodings have been used in the sequence in which they are listed. Only encoding schemes listed in an Allow-Encoding header field may be used. The compact form is e. Examples include:

Content-Encoding: text/plain

e:gzip

6.4.2Content-Disposition

The Content-Disposition header field is used to describe the function of a message body. Defined values include session, icon, alert, and render. The value session indicates that the message body contains information to describe a media session. The value render indicates that the message body should be displayed or otherwise rendered for the user. If a message body is present in a request or a 2xx

170

SIP: Understanding the Session Initiation Protocol

response without a Content-Disposition, the function is assumed to be session. For all other response classes with message bodies, the default function is render. An example is:

Content-Function: session

6.4.3Content-Language

The Content-Language header field [2] is used to indicate the language of a message body. It contains a language tag, which identifies the language.

Content-Language: en

6.4.4Content-Length

The Content-Length is used to indicate the number of octets in the message body. A Content-Length: 0 indicates no message body. As described in Section 2.4.2, this header field is used to separate multiple messages sent within a TCP stream. If not present in a UDP message, the message body is assumed to continue to the end of the datagram. If not present in a TCP message, the message body is assumed to continue until the connection is closed. The Content-Length octet count does not include the CRLF that separates the message header fields from the message body. It does, however, include the CRLF at the end of each line of the message body. An example octet calculation is in Chapter 2. The Content-Length header field is not a required header field to allow dynamically generated message bodies where the Content-Length may not be known a priori. The compact form is l. Examples include:

Content-Length: 0

l:287

6.4.5Content-Type

The Content-Type header field is used to specify the Internet media type [3] in the message body. Media types have the familiar form of type/sub-type. If this header field is not present, application/sdp is assumed. If an Accept header field was present in the request, the response Content-Type must contain a listed type, or a 415 Unsupported Media Type response must be returned. The compact form is c. Specific MIME types that are commonly used are listed in Table 6.21, and Tables 8.4 and 8.9 list common MIME types for presence and instant messaging.

Content indirection [50] can be used to provide a URI in place of an actual MIME message body. An example is:

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]