Skip to content
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

update http crate #104

Closed
wants to merge 1 commit into from
Closed

update http crate #104

wants to merge 1 commit into from

Conversation

maxcountryman
Copy link
Owner

This also updates axum-core to ensure compatibility.

This also updates axum-core to ensure compatibility.
@cole-h
Copy link
Contributor

cole-h commented Nov 27, 2023

In case it's useful, I also attempted a http + axum bump here: https://github.com/cole-h/tower-sessions/tree/support-axum-0.7 (specifically, in this commit: cole-h@5bcd9cc)

Note that this is blocked on imbolc/tower-cookies#30 being released.

@maxcountryman
Copy link
Owner Author

Thanks for that @cole-h.

It looks like layers also behave differently in axum 0.7 as type Service = CookieManager<SessionManager<S, Store>> is not compiling, complaining with:

the trait `Service<http::Request<Body>>` is not implemented for `HandleError<tower_cookies::service::CookieManager<SessionManager<Route, MemoryStore>>, {closure@examples/counter.rs:19:38: 19:51}, _>

I'm a bit confused.

@cole-h
Copy link
Contributor

cole-h commented Nov 27, 2023

I believe that's because tower-cookies doesn't have a release with support for axum-core 0.4, and so the types are slightly different between axum-core 0.4 (in the as-yet-unreleased version of tower-cookies) and 0.3 (the current tower-cookies 0.9.0 release)...

On the latest tip of my branch, cargo test and cargo check (and cargo check --examples) all pass for me, so I think it's just a matter of waiting for a new release of tower-cookies! I've already gently poked the maintainer for that to happen, so hopefully it's only a matter of time.

(Note: in my branch I've used a patch directive to use my fork of tower-cookies)

@cole-h
Copy link
Contributor

cole-h commented Nov 27, 2023

OK, I've updated my branch with the tower-cookies v0.10.0 bump as well: cole-h@d21adec

Everything should work now!

@maxcountryman
Copy link
Owner Author

@cole-h fantastic! Happy to merge in your branch if you like.

@cole-h
Copy link
Contributor

cole-h commented Nov 27, 2023

Sure thing! I opened #107.

Note that it also includes a not-quite-necessary commit setting reqwest to use the rustls feature -- happy to drop that if you like, but it made it possible for me to run the tests and whatnot without setting up pkg-config (the default features of reqwest try to link against openssl).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants