-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to http-body 1.0 #348
Changes from 56 commits
6c76166
35c9aed
375bfa1
9fad529
8734fc4
c129997
a34e5a2
bfe751f
f951e1a
46e3465
3419c36
92d3eb2
fbee8cc
54b1670
fdaa24f
4b412bb
f14f012
6efd5df
b06f942
9c98dc0
2e481e4
615ef81
8f14848
ec8fca4
c3fab2a
bec9c5d
197e5b5
27eda19
0fe1db5
a556ad5
618df5a
19b7656
345c515
83d4681
fcdabf8
b7b33bb
5807013
602f06f
a93aab0
bb91534
d69d18c
29e3d45
30a8cad
3b41aab
43ba8d8
76de6cc
2534cc7
ccb3e99
77ba9a8
6adc41c
aa9ad9c
298ba9a
cc08044
2813604
4a68a6d
2f936e3
677012b
ec64471
bd40051
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"tower-http", | ||
"examples/*", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
fn main() { | ||
eprint!("this example has not yet been updated to hyper 1.0"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not? I did it with little effort for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did you port it? Tonic doesn't support http 1.0. Did you do a bunch of mapping of the types? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I was wrong. Tonic and Warp examples I deleted during my original port as I do not use these libraries. I only kept in the hyper and axum ones and those are the only once I fixed this time as well. |
||
} | ||
|
||
/* | ||
use bytes::Bytes; | ||
use clap::Parser; | ||
use futures::StreamExt; | ||
|
@@ -370,3 +375,4 @@ mod tests { | |
addr | ||
} | ||
} | ||
*/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "tower-http" | ||
description = "Tower middleware and utilities for HTTP clients and servers" | ||
version = "0.4.2" | ||
version = "0.4.4" | ||
authors = ["Tower Maintainers <[email protected]>"] | ||
edition = "2018" | ||
license = "MIT" | ||
|
@@ -15,8 +15,9 @@ rust-version = "1.66" | |
[dependencies] | ||
bitflags = "2.0.2" | ||
bytes = "1" | ||
http = "0.2.7" | ||
http-body = "0.4.5" | ||
http = "1.0" | ||
http-body = "1.0.0" | ||
http-body-util = "0.1.0" | ||
pin-project-lite = "0.2.7" | ||
tower-layer = "0.3" | ||
tower-service = "0.3" | ||
|
@@ -38,16 +39,19 @@ httpdate = { version = "1.0", optional = true } | |
uuid = { version = "1.0", features = ["v4"], optional = true } | ||
|
||
[dev-dependencies] | ||
async-trait = "0.1" | ||
brotli = "3" | ||
bytes = "1" | ||
flate2 = "1.0" | ||
brotli = "3" | ||
hyper = { version = "0.14", features = ["full"] } | ||
futures-util = "0.3.14" | ||
hyper-util = { version = "0.1", features = ["client-legacy", "http1", "tokio"] } | ||
once_cell = "1" | ||
serde_json = "1.0" | ||
sync_wrapper = "0.1.1" | ||
tokio = { version = "1", features = ["full"] } | ||
tower = { version = "0.4.10", features = ["buffer", "util", "retry", "make", "timeout"] } | ||
tracing-subscriber = "0.3" | ||
uuid = { version = "1.0", features = ["v4"] } | ||
serde_json = "1.0" | ||
zstd = "0.12" | ||
|
||
[features] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not? I did it with little effort for the
tower-async
version. Want me to contribute this as a PR to your PR?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same reason as #348 (comment), axum doesn't yet support http 1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. For now I was using your branch. I get you might not want to do that, but now you do not have an example at all... so dunno.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but now it does, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A PR to restore this example using axum 0.7: #448