prep 0.4.5 for Longse fix (see #77)
This commit is contained in:
parent
831a9d6a18
commit
320f208fc7
@ -1,6 +1,9 @@
|
||||
## unreleased
|
||||
## `v0.4.5` (2023-02-02)
|
||||
|
||||
* minimum Rust version is now 1.64.
|
||||
* upgrade to `rtsp-types` 0.0.5, which ignores trailing whitespace in RTSP
|
||||
headers. This fixes errors when communicating with some Longse cameras
|
||||
([#77](https://github.com/scottlamb/retina/pull/77)).
|
||||
* remove obsolete workaround for GW security GW security GW4089IP's bad out-of-band parameters.
|
||||
Instead, we treat them as unparseable and ignore them as described in the
|
||||
`v0.4.2` notes below.
|
||||
|
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -1869,7 +1869,7 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
|
||||
|
||||
[[package]]
|
||||
name = "retina"
|
||||
version = "0.4.4"
|
||||
version = "0.4.5"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bitstream-io",
|
||||
@ -1958,9 +1958,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rtsp-types"
|
||||
version = "0.0.3"
|
||||
version = "0.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b668122d4d00c479c08fb2a0a253669832606ccca80832a6b99bb5288ab4f75"
|
||||
checksum = "2a1aec90dc5d8dec85c14032885770801439acb1651b2f166745ce482a2ddeaf"
|
||||
dependencies = [
|
||||
"cookie-factory",
|
||||
"nom 7.1.1",
|
||||
|
@ -4,7 +4,7 @@ default-members = ["."]
|
||||
|
||||
[package]
|
||||
name = "retina"
|
||||
version = "0.4.4"
|
||||
version = "0.4.5"
|
||||
authors = ["Scott Lamb <slamb@slamb.org>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
edition = "2021"
|
||||
@ -28,7 +28,7 @@ once_cell = "1.7.2"
|
||||
pin-project = "1.0.7"
|
||||
pretty-hex = "0.3.0"
|
||||
rand = "0.8.3"
|
||||
rtsp-types = "0.0.3"
|
||||
rtsp-types = "0.0.5"
|
||||
sdp-types = "0.1.4"
|
||||
smallvec = { version = "1.6.1", features = ["union"] }
|
||||
thiserror = "1.0.25"
|
||||
|
6
fuzz/Cargo.lock
generated
6
fuzz/Cargo.lock
generated
@ -515,7 +515,7 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
||||
|
||||
[[package]]
|
||||
name = "retina"
|
||||
version = "0.4.4"
|
||||
version = "0.4.5"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bitstream-io",
|
||||
@ -561,9 +561,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rtsp-types"
|
||||
version = "0.0.3"
|
||||
version = "0.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b668122d4d00c479c08fb2a0a253669832606ccca80832a6b99bb5288ab4f75"
|
||||
checksum = "2a1aec90dc5d8dec85c14032885770801439acb1651b2f166745ce482a2ddeaf"
|
||||
dependencies = [
|
||||
"cookie-factory",
|
||||
"nom",
|
||||
|
@ -742,6 +742,26 @@ mod tests {
|
||||
})
|
||||
}
|
||||
|
||||
/// Longse cameras, for whatever reason, have trailing whitespace in their `CSeq` header lines.
|
||||
///
|
||||
/// This test ensures this is correctly stripped. RTSP follows HTTP's lead for request/response
|
||||
/// parsing (see [RFC 2326 section
|
||||
/// 4.1](https://www.rfc-editor.org/rfc/rfc2326.html#page-19)), and HTTP [RFC
|
||||
/// 9110 section 5.5](https://www.rfc-editor.org/rfc/rfc9110#name-field-values) says the following:
|
||||
///
|
||||
/// > A field value does not include leading or trailing whitespace. When a
|
||||
/// > specific version of HTTP allows such whitespace to appear in a message,
|
||||
/// > a field parsing implementation MUST exclude such whitespace prior to
|
||||
/// > evaluating the field value.
|
||||
///
|
||||
/// Currently we rely on `rtsp-types` doing the stripping.
|
||||
#[test]
|
||||
fn longse_cseq() {
|
||||
init_logging();
|
||||
let response = response(include_bytes!("testdata/longse_unauthorized.txt"));
|
||||
assert_eq!(super::get_cseq(&response), Some(1));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn anvpiz_sdp() {
|
||||
init_logging();
|
||||
|
5
src/client/testdata/longse_unauthorized.txt
vendored
Normal file
5
src/client/testdata/longse_unauthorized.txt
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
RTSP/1.0 401 Unauthorized
|
||||
CSeq: 1
|
||||
Server: Rtsp Server 1920*1080*20*2048
|
||||
WWW-Authenticate: Digest realm="Surveillance Server", nonce="98481030"
|
||||
|
Loading…
Reference in New Issue
Block a user