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

feat(client): allow !Send IO with HTTP/1 client #3371

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

seanmonstar
Copy link
Member

This removes the requirement of the IO type from being Send for the HTTP/1 client connection. To do so, the ability to perform hyper::upgrades had to be moved to a separate type which does require the Send bound. This mirrors how the server types do it.

The Connection type now has a with_upgrades() method to convert.

Closes #3363

BREAKING CHANGE: If you use client HTTP/1 upgrades, you must call
Connection::with_upgrades() to still work the same.

This removes the requirement of the IO type from being `Send` for the
HTTP/1 client connection. To do so, the ability to perform
`hyper::upgrade`s had to be moved to a separate type which does require
the `Send` bound. This mirrors how the server types do it.

The `Connection` type now has a `with_upgrades()` method to convert.

Closes #3363

BREAKING CHANGE: If you use client HTTP/1 upgrades, you must call
  `Connection::with_upgrades()` to still work the same.
@seanmonstar seanmonstar merged commit cf87eda into master Oct 26, 2023
19 checks passed
@seanmonstar seanmonstar deleted the client-io-not-send branch October 26, 2023 12:27
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this pull request Jan 12, 2024
This removes the requirement of the IO type from being `Send` for the
HTTP/1 client connection. To do so, the ability to perform
`hyper::upgrade`s had to be moved to a separate type which does require
the `Send` bound. This mirrors how the server types do it.

The `Connection` type now has a `with_upgrades()` method to convert.

Closes hyperium#3363

BREAKING CHANGE: If you use client HTTP/1 upgrades, you must call
  `Connection::with_upgrades()` to still work the same.
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this pull request Jan 16, 2024
This removes the requirement of the IO type from being `Send` for the
HTTP/1 client connection. To do so, the ability to perform
`hyper::upgrade`s had to be moved to a separate type which does require
the `Send` bound. This mirrors how the server types do it.

The `Connection` type now has a `with_upgrades()` method to convert.

Closes hyperium#3363

BREAKING CHANGE: If you use client HTTP/1 upgrades, you must call
  `Connection::with_upgrades()` to still work the same.

Signed-off-by: Sven Pfennig <[email protected]>
@mstyura
Copy link
Contributor

mstyura commented Sep 10, 2024

Further relaxation of Send on IO during upgrade is not possible due to IO type put into http request Extension, right? Is it theoretically possible to refactor code to avoid usage of request extension so the IO can be !Send and used with with request upgrades? Current bounds a bit confusing because at the same time h2 upgrades does not require IO to be Send.

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.

Allow client IO to be !Send
2 participants