6 Request (Richiesta)
6 Request (Richiesta)
Un messaggio di richiesta dal client al server o viceversa include, nella prima riga di tale messaggio, il metodo da applicare alla risorsa, l'identificatore della risorsa e la versione del protocollo in uso.
Request = Request-Line ; Section 6.1
*( general-header ; Section 5
| request-header ; Section 6.2
| entity-header ) ; Section 8.1
CRLF
[ message-body ] ; Section 4.3
6.1 Request Line (Riga di richiesta)
Request-Line = Method SP Request-URI SP RTSP-Version CRLF
Method = "DESCRIBE" ; Section 10.2
| "ANNOUNCE" ; Section 10.3
| "GET_PARAMETER" ; Section 10.8
| "OPTIONS" ; Section 10.1
| "PAUSE" ; Section 10.6
| "PLAY" ; Section 10.5
| "RECORD" ; Section 10.11
| "REDIRECT" ; Section 10.10
| "SETUP" ; Section 10.4
| "SET_PARAMETER" ; Section 10.9
| "TEARDOWN" ; Section 10.7
| extension-method
extension-method = token
Request-URI = "*" | absolute_URI
RTSP-Version = "RTSP" "/" 1*DIGIT "." 1*DIGIT
6.2 Request Header Fields (Campi di intestazione della richiesta)
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
Si noti che, a differenza di HTTP/1.1 [2], le richieste RTSP contengono sempre l'URL assoluto (cioè inclusi scheme, host e porta) anziché solo il percorso assoluto.
HTTP/1.1 richiede che i server comprendano l'URL assoluto, ma i client dovrebbero usare l'intestazione Host della richiesta. Ciò serve unicamente alla retrocompatibilità con i server HTTP/1.0, considerazione che non vale per RTSP.
L'asterisco «*» nel Request-URI indica che la richiesta non si applica a una risorsa particolare ma al server stesso ed è consentito solo quando il metodo usato non si applica necessariamente a una risorsa. Un esempio:
OPTIONS * RTSP/1.0