fix(http1): is_timeout works on HeaderTimeout#3781
Closed
T-aian wants to merge 3 commits intohyperium:masterfrom
Closed
fix(http1): is_timeout works on HeaderTimeout#3781T-aian wants to merge 3 commits intohyperium:masterfrom
T-aian wants to merge 3 commits intohyperium:masterfrom
Conversation
Member
|
Thanks for the PR! Looks like rustfmt is grumpy. |
seanmonstar
reviewed
Nov 19, 2024
| return matches!(self.inner.kind, Kind::HeaderTimeout) | ||
| || self.find_source::<TimedOut>().is_some(); | ||
|
|
||
| #[cfg(not(any(all(feature = "http1", feature = "server"), feature = "ffi")))] |
Member
There was a problem hiding this comment.
Looks like the feature flag combinations are tricky. Here's what I'd suggest:
#[cfg(all(feature = "http1", feature = "server"))]
if matches!(self.inner.kind, Kind::HeaderTimeout) {
return true;
}
self.find_source::<TimedOut>().is_some()
4 tasks
GlenDC
added a commit
to plabayo/rama
that referenced
this pull request
Feb 20, 2025
- ext: add ext::on_informational() callback extension (<hyperium/hyper#3818>) (<hyperium/hyper@8ce1fcf>, closes <hyperium/hyper#2565>) - server: add http1::Builder::ignore_invalid_headers(bool) option (<hyperium/hyper#3824>) (<hyperium/hyper@3817a79>) - server: - start http1 header read timeout when conn is idle (<hyperium/hyper#3828>) (<hyperium/hyper@10b09ff>, closes <hyperium/hyper#3780>, <hyperium/hyper#3781>) - change max_local_error_reset_streams function to &mut self (#3820) (e981a91e) - http2::Builder::max_local_error_reset_streams() now takes &mut self and returns &mut Self. In practice, this shouldn't break almost anyone. It was the wrong receiver and return types. (<hyperium/hyper@e981a91>) Co-authored-by: Sean McArthur <sean@seanmonstar.com> Co-authored-by: Finn Bear <finnbearlabs@gmail.com> Co-authored-by: tottoto <tottotodev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed
hyper::Error::is_timeout()to also check if the kind of the error is aHeaderTimeout. I also added a test at the end ofserver.rsto check for this kind of timeout error.Fixes #3780