Skip to content

Commit

Permalink
feat(http): add multipart for server (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarisW authored Oct 25, 2024
1 parent 70e89bd commit 28f3aee
Show file tree
Hide file tree
Showing 11 changed files with 1,029 additions and 343 deletions.
172 changes: 167 additions & 5 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ mime = "0.3"
mime_guess = { version = "2", default-features = false }
mockall = "0.13"
mockall_double = "0.3"
multer = "3.1"
mur3 = "0.1"
nix = "0.29"
nom = "7"
Expand All @@ -96,6 +97,7 @@ proc-macro2 = "1"
quote = "1"
rand = "0.8"
regex = "1"
reqwest = "0.12"
run_script = "0.10"
rustc-hash = { version = "2", features = ["rand"] }
same-file = "1"
Expand All @@ -121,6 +123,7 @@ tower = "0.5"
tracing = "0.1"
tracing-subscriber = "0.3"
update-informer = "1"
url = "2.5"
url_path = "0.1"
walkdir = "2"

Expand Down
8 changes: 6 additions & 2 deletions volo-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ tokio-util = { workspace = true, features = ["io"] }
tracing.workspace = true

# =====optional=====
multer = { workspace = true, optional = true }

# server optional
matchit = { workspace = true, optional = true }
Expand All @@ -84,19 +85,22 @@ sonic-rs = { workspace = true, optional = true }
async-stream.workspace = true
libc.workspace = true
serde = { workspace = true, features = ["derive"] }
reqwest = { workspace = true, features = ["multipart"] }
tokio-test.workspace = true
url.workspace = true

[features]
default = []

default_client = ["client", "json"]
default_server = ["server", "query", "form", "json"]
default_server = ["server", "query", "form", "json", "multipart"]

full = ["client", "server", "rustls", "cookie", "query", "form", "json", "tls", "ws"]
full = ["client", "server", "rustls", "cookie", "query", "form", "json", "multipart", "tls", "ws"]

client = ["hyper/client", "hyper/http1"] # client core
server = ["hyper/server", "hyper/http1", "dep:matchit"] # server core

multipart = ["dep:multer"]
ws = ["dep:tungstenite", "dep:tokio-tungstenite"]

tls = ["rustls"]
Expand Down
Loading

0 comments on commit 28f3aee

Please sign in to comment.