Skip to content

Commit d222b38

Browse files
committed
more api content ser/deser options
1 parent 09df76b commit d222b38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+385
-127
lines changed

Cargo.lock

Lines changed: 107 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

application/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "wings-rs"
33
rust-version = { workspace = true }
4-
version = "0.24.4"
4+
version = "0.24.5"
55
edition = "2024"
66

77
[dependencies]
@@ -69,7 +69,7 @@ base64 = "0.22.1"
6969
chunked_vec = "=0.3.4"
7070
async-channel = "2.5.0"
7171
lzzzz = "2.0.0"
72-
xmltree = { version = "0.12.0", features = ["indexmap"] }
72+
xmltree = { version = "0.12.0", features = ["attribute-order"] }
7373
java-properties = "2.0.0"
7474
rust-ini = "0.21.3"
7575
regex = "1.12.2"
@@ -81,6 +81,9 @@ moka = { version = "0.12.12", features = ["future"] }
8181
ouroboros = "0.18.5"
8282
percent-encoding = "2.3.2"
8383
positioned-io = "0.3.5"
84+
rmp-serde = "1.3.1"
85+
accept-header = "0.2.3"
86+
mime = "0.3.17"
8487

8588
[target.'cfg(unix)'.dependencies]
8689
users = "0.11.0"

application/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub mod config;
66
pub mod deserialize;
77
pub mod io;
88
pub mod models;
9+
pub mod payload;
910
pub mod remote;
1011
pub mod response;
1112
pub mod routes;
@@ -14,6 +15,8 @@ pub mod ssh;
1415
pub mod stats;
1516
pub mod utils;
1617

18+
pub use payload::Payload;
19+
1720
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
1821
pub const GIT_COMMIT: &str = env!("CARGO_GIT_COMMIT");
1922
pub const GIT_BRANCH: &str = env!("CARGO_GIT_BRANCH");

application/src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,12 @@ async fn handle_request(req: Request<Body>, next: Next) -> Result<Response<Body>
161161
.bright_cyan()
162162
);
163163

164-
Ok(next.run(req).await)
164+
Ok(wings_rs::response::ACCEPT_HEADER
165+
.scope(
166+
wings_rs::response::accept_from_headers(req.headers()),
167+
async { next.run(req).await },
168+
)
169+
.await)
165170
}
166171

167172
async fn handle_cors(

0 commit comments

Comments
 (0)