Skip to content

Commit

Permalink
Allow double slashes (//) in client URL paths.
Browse files Browse the repository at this point in the history
Apparently the Adobe FRL apps, when they are talking directly to COPS, have a double slash in the front of their endpoint URLs.  To handle this, we need to use a patched version of the `warp` web framework that's tolerant of these double slashes.

This is worth a version bump to alpha.2.
  • Loading branch information
clickonetwo committed Sep 2, 2022
1 parent 10ce155 commit 2ae7328
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 58 deletions.
80 changes: 30 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion adlu-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "adlu-base"
authors = ["Daniel Brotsky <dan@clickonetwo.io>"]
license = "AGPLv3"
version = "1.0.0-alpha.1"
version = "1.0.0-alpha.2"
edition = "2021"

[features]
Expand Down
2 changes: 1 addition & 1 deletion adlu-decoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "adlu-decoder"
authors = ["Daniel Brotsky <dan@clickonetwo.io>"]
license = "AGPLv3"
version = "1.0.0-alpha.1"
version = "1.0.0-alpha.2"
edition = "2021"

[[bin]]
Expand Down
5 changes: 3 additions & 2 deletions adlu-parse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "adlu-parse"
authors = ["Daniel Brotsky <dan@clickonetwo.io>"]
license = "AGPLv3"
version = "1.0.0-alpha.1"
version = "1.0.0-alpha.2"
edition = "2021"

[features]
Expand All @@ -24,5 +24,6 @@ serde = { version = "1", features = ["derive"] }
serde_urlencoded = "0.7"
serde_json = "1"
visdom = "0.5"
warp = "0.3"
#warp = "0.3"
warp = { git = "https://github.com/brotskydotcom/warp", branch = "ignore-empty-path-segments", features = ["tls", "ignore-empty-path-segments"] }
zip = "0.6"
5 changes: 3 additions & 2 deletions adlu-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "adlu-proxy"
authors = ["Daniel Brotsky <dan@clickonetwo.io>"]
description = "A protocol-aware, caching, store/forward reverse proxy for Adobe desktop licensing servers"
license = "AGPLv3"
version = "1.0.0-alpha.1"
version = "1.0.0-alpha.2"
edition = "2021"

[features]
Expand Down Expand Up @@ -34,7 +34,8 @@ tokio = { version = "1", features = ["full"] }
tokio-native-tls = "0.3"
toml = "0.5.9"
url = "2.1.1"
warp = { version = "0.3.2", features = ["tls"] }
#warp = { version = "0.3.2", features = ["tls"] }
warp = { git = "https://github.com/brotskydotcom/warp", branch = "ignore-empty-path-segments", features = ["tls", "ignore-empty-path-segments"] }

[dev-dependencies]
uuid = { version = "1.1", features = ["v4"]}
Expand Down
4 changes: 2 additions & 2 deletions adlu-proxy/src/testing/frl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn mock_activation_request(
) -> warp::test::RequestBuilder {
let mi = MockInfo::with_type_and_outcome(&MockRequestType::Activation, ask);
let body = FrlActivationRequestBody::mock_from_device_id(device_id);
let mut builder = builder.method("POST").path("/asnp/frl_connected/values/v2");
let mut builder = builder.method("POST").path("//asnp/frl_connected/values/v2");
builder = builder
.header("X-Request-Id", &mi.request_id())
.header("X-Session-Id", &mi.session_id())
Expand Down Expand Up @@ -61,7 +61,7 @@ pub fn mock_deactivation_request(
) -> warp::test::RequestBuilder {
let mi = MockInfo::with_type_and_outcome(&MockRequestType::Deactivation, ask);
let params = FrlDeactivationQueryParams::mock_from_device_id(device_id);
let path = format!("/asnp/frl_connected/v1?{}", params.to_query_params());
let path = format!("//asnp/frl_connected/v1?{}", params.to_query_params());
let mut builder = builder.method("DELETE").path(&path);
builder = builder
.header("X-Request-Id", &mi.request_id())
Expand Down

0 comments on commit 2ae7328

Please sign in to comment.