diff --git a/src/llhttp/constants.ts b/src/llhttp/constants.ts index 48cfb9b8..3be64e97 100644 --- a/src/llhttp/constants.ts +++ b/src/llhttp/constants.ts @@ -98,6 +98,19 @@ export enum METHODS { SOURCE = 33, /* RFC-7540, section 11.6 */ PRI = 34, + /* RFC-2326 RTSP */ + DESCRIBE = 35, + ANNOUNCE = 36, + SETUP = 37, + PLAY = 38, + PAUSE = 39, + TEARDOWN = 40, + GET_PARAMETER = 41, + SET_PARAMETER = 42, + REDIRECT = 43, + RECORD = 44, + /* RAOP */ + FLUSH = 45, } export const METHOD_MAP = enumToMap(METHODS); diff --git a/src/llhttp/http.ts b/src/llhttp/http.ts index f86d4fbf..0a01689b 100644 --- a/src/llhttp/http.ts +++ b/src/llhttp/http.ts @@ -317,6 +317,7 @@ export class HTTP { n('req_http_start') .match('HTTP/', n('req_http_major')) + .match('RTSP/', n('req_http_major')) .match('ICE/', isSource) .match(' ', n('req_http_start')) .otherwise(p.error(ERROR.INVALID_CONSTANT, 'Expected HTTP/'));