RFC2326(中文版)(15)
时间:2026-01-16
时间:2026-01-16
RFC2326(中文版)
= "*" | absolute_URI
RTSP-Version = "RTSP" "/" 1*DIGIT "." 1*DIGIT
6.2 请求标题域
request-header = Accept ; Section 12.1
| Accept-Encoding ; Section 12.2
| Accept-Language ; Section 12.3
| Authorization ; Section 12.5
| From ; Section 12.20
| If-Modified-Since ; Section 12.23
| Range ; Section 12.29
| Referer ; Section 12.30
| User-Agent ; Section 12.41
注意:相对于HTTP/1.1而言,RTSP请求要求绝对路径(并包括rtsp或rtspu方案,主机,端口号)。
HTTP/1.1 要求服务器理解绝对URL, 但是客户端需要假设为主机请求标题域。这样做完全是为了HTTP/1.0服务器端向后兼容性,因此RTSP并不需要这样做。
在请求URI中星号“*”表示此请求不用于其他资源,只用于服务器本身,并且它只能在使用的方法不要求应用于资源时才能使用。
比如:OPTIONS * RTSP/1.0。
7 回应
7.1 状态行
完整回应消息的第一行就是状态行,它依次由协议版本、数字形式的状态代码、及相应
的词语文本组成,各元素间以空格(SP)分隔,除了结尾的CRLF外,不允许出现单独的
CR或LF符。
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
7.1.1 状态代码和原因分析
状态代码(Status-Code)由3位数字组成,表示请求是否被理解或被满足。原因分析是
用简短的文字来描述状态代码产生的原因。状态代码用来支持自动操作,原因分析是为人类
用户准备的。客户端不需要检查或显示原因分析。
状态代码的第一位数字定义了回应的类别,后面两位数字没有具体分类。首位数字有5
种取值可能:
o 1xx::保留,将来使用。
o 2xx:成功 - 操作被接收、理解、接受(received, understood, accepted)。
o 3xx:重定向(Redirection)- 要完成请求必须进行进一步操作。
o 4xx:客户端出错 - 请求有语法错误或无法实现。
o 5xx:服务器端出错 - 服务器无法实现合法的请求。
HTTP/1.0的状态代码、原因解释在下面给出。下面的原因解释只是建议采用,可任意
更改,而不会对协议造成影响。完整的代码定义在第9节。
Status-Code = "100" ; Continue
| "200" ; OK
| "201" ; Created
| "250" ; Low on Storage Space
| "300" ; Multiple Choices
| "301" ; Moved Permanently
| "302" ; Moved Temporarily
| "303" ; See Other
| "304" ; Not Modified
| "305" ; Use Proxy
| "400" ; Bad Request
| "401" ; Unauthorized
| "402" ; Payment Required
| "403" ; Forbidden
| "404" ; Not Found
| "405" ; Method Not Allowed
| "406" ; Not Acceptable
| "407" ; Proxy Authentication Required
| "408" ; Request Time-out
| "410" ; Gone
| "411" ; Length Required
| "412" ; Precondition Failed
| "413" ; Request Entity Too Large
| "414" ; Request-
URI Too Large
| "415" ; Unsupported Media Type
| "451" ; Parameter Not Understood
| "452" ; Conference Not Foun
下一篇:满忠芝四年级安全教育教案