Skip to content

Commit 7a84ac7

Browse files
committed
chore: merge upstream master into vectored write fix
Upstream #4173 restyled the `chunks_vectored` overrides this branch removes, so all four conflicts were the same shape. Kept the `VectoredBuf` trait and its `chunks_vectored_prefix`, and adopted #4173's convention by renaming the `'t` lifetime to `'data` in the code this branch adds.
2 parents d812731 + 4f36f33 commit 7a84ac7

26 files changed

Lines changed: 330 additions & 64 deletions

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
### v1.11.1 (2026-08-27)
2+
3+
4+
#### Bug Fixes
5+
6+
* **http1:**
7+
* detect TE: trailers caselessly and with other values (#4152) ([72fcf545](https://github.com/hyperium/hyper/commit/72fcf545c9b4a261f31d89bafd3019a2d4e9e1d7))
8+
* recognize `\n\r\n` as a head terminator in the partial-read fast path (#4147) ([3534d75c](https://github.com/hyperium/hyper/commit/3534d75c898da17b023e6bff9b4cf71afed123ad), closes [#4145](https://github.com/hyperium/hyper/issues/4145))
9+
* flush bytes buffered by the write re-check before yielding (#4143) ([f660f5bf](https://github.com/hyperium/hyper/commit/f660f5bf6eed3fe793f899507ff5bb9e266d4b0d))
10+
* evict pooled conn on request-side Connection: close (#4110) ([da19be08](https://github.com/hyperium/hyper/commit/da19be08f34d3da01c4c0f9cfe2837e7d377f73d))
11+
12+
113
## v1.11.0 (2026-07-20)
214

315

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hyper"
3-
version = "1.11.0"
3+
version = "1.11.1"
44
description = "A protective and efficient HTTP library for all."
55
readme = "README.md"
66
homepage = "https://hyper.rs"
@@ -118,7 +118,6 @@ as_conversions = "allow" # TODO: tricky
118118
cast_possible_truncation = "allow" # TODO: consider
119119
cast_precision_loss = "allow" # TODO: consider
120120
checked_conversions = "allow"
121-
collapsible_match = "allow"
122121
else_if_without_else = "allow"
123122
enum_glob_use = "allow"
124123
float_arithmetic = "allow"
@@ -139,7 +138,6 @@ panic = "allow"
139138
pattern_type_mismatch = "allow"
140139
redundant_closure_for_method_calls = "allow"
141140
redundant_else = "allow"
142-
single_char_lifetime_names = "allow"
143141
struct_excessive_bools = "allow" # TODO: bogus lint?
144142
trivially_copy_pass_by_ref = "allow"
145143
unnecessary_trailing_comma = "allow"

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Security Policy
22

3-
hyper (and related projects in hyperium) take security seriously, and greatly appreciate responsibile disclosure.
3+
hyper (and related projects in hyperium) take security seriously, and greatly appreciate responsible disclosure.
44

55
## Report a security issue
66

docs/COLLABORATORS.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# hyper Collaborator Guide
2+
3+
This document describes how collaborators manage hyper.
4+
5+
- First off, a collaborator doesn't need to do all of the following perfectly.
6+
- It takes time to learn.
7+
- Instead, focus on growth.
8+
- Get in the habit of checking this guide with some frequency, and improve rather than stagnate.
9+
10+
## Exemplify the Code of Conduct
11+
12+
- Our [code of conduct](./CODE_OF_CONDUCT.md) is not elaborate. It doesn't require much study, nor explication.
13+
- To be a good collaborator, it does require internalizing it.
14+
- The code of conduct is proactive, positive.
15+
- A collaborator must be a good example of being kind.
16+
- It should not be possible to find significant fault in a collaborator against the simple principles in the code of conduct.
17+
18+
## Internalize the Vision
19+
20+
- Understand and use the project's [vision](./VISION.md) when helping guide decisions.
21+
22+
## Review Pull Requests
23+
24+
- Review pull requests promptly and kindly. Approve CI for new contributors.
25+
- Consider telling a maintainer to add you to the automated review queue.
26+
- Collaborators should feel comfortable approving and merging straightforward changes. Such as documentation, chores, styling, simple refactors, and basic bug fixes.
27+
- When reviewing larger changes, keep in mind the points on [being API caretakers](#api-caretakers).
28+
- When approving a PR, allow time for other collaborators to look before merging.
29+
- Especially if the PR is newer, or has a more significant change.
30+
- When merging, prefer squashing (it adds in the PR number). Touch up the commit message to match our [COMMITS](./COMMITS.md) style.
31+
32+
## Provide Feedback on Features and Designs
33+
34+
Collaborators try to participate early and often when new features are proposed. They also actively consider and recommend new features that users may need.
35+
36+
### API Caretakers
37+
38+
Collaborators are caretakers of hyper's API. When proposing, discussing, or reviewing changes to hyper, keep the following in mind:
39+
40+
- Conservative additions
41+
- Conservative APIs reduce breaking changes
42+
- Don't expose internal implementation details
43+
- [Accessors can reveal internal repr](https://seanmonstar.com/micro/20260721-accessors-reveal-internal-repr/)
44+
- hyper-util is a place to explore first
45+
- [Vision: Not quite stable, but utile](./VISION.md#not-quite-stable-but-utile-useful)
46+
- [Roadmap: hyper-util](./ROADMAP.md#hyper-util)
47+
- Unstable features
48+
- Unstable features are not bound by our stability promise.
49+
- We don't just name a crate feature with unstable.
50+
- This has the problem of an intermediary crate enabling it, and someone depending on _that_ crate and not realizing they are accessing unstable hyper features.
51+
- All unstable features require a conditional config flag passed to the Rust compiler.
52+
- For example, `hyper_unstable_ffi`.
53+
- Breaking changes
54+
- These would usually be reserved for a new SemVer major release, such as v2.0, and thus would usually be very rare.
55+
- An exception is fixing a mistake quickly after release of a new feature.
56+
- All breaking changes require approval by a maintainer.
57+
58+
## Welcome New Contributors
59+
60+
- Help new contributors find their way around the project and its processes. Follow the guidance on [acknowledging people when triaging](./ISSUES.md#acknowledge).
61+
62+
## Answer Questions
63+
64+
- Answer questions in issues or chat when you can, or help find someone who can. See the project's [help channels](../CONTRIBUTING.md#help).
65+
66+
## Mentor Contributors
67+
68+
- Help contributors grow toward becoming project members. Issue triaging often provides opportunities for [mentoring](./ISSUES.md#mentoring), but the ideas can be applied to reviews, or when answering questions.

docs/GOVERNANCE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ How to become:
7171
### Collaborator
7272

7373
Collaborators are contributors who have been helping out in a consistent basis.
74+
See the [collaborator guide](./COLLABORATORS.md) for practical guidance on the role.
7475

7576
Responsibilities:
7677

docs/hips/0000-template.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# HIP-0000: Template
2+
3+
- Authors:
4+
- Created: (date)
5+
- PR: (link to pull request)
6+
7+
## Summary
8+
9+
(The tl;dr. Concise statement of the reason for the document and recommendation.)
10+
11+
## Tenets
12+
13+
(List of tenets, values, guiding principles that are used to evaluate the proposal.)
14+
15+
## Motivation
16+
17+
(Clearly explain the problem.)
18+
19+
## Recommendation
20+
21+
### User Experience
22+
23+
### Implementation
24+
25+
### Testing Plan
26+
27+
(Optional: are there any special considerations for testing required?)
28+
29+
### Security Considerations
30+
31+
(What security risks might exist for the recommendation? Can we reduce them? What should users consider when using it?)
32+
33+
## Alternatives
34+
35+
(List alternatives considered, and especially why they were not recommended. This portion of "documenting the why" helps Future Us to see if anything has changed since last considered.)
36+
37+
## Unresolved Questions
38+
39+
40+
## References
41+
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# HIP-0001: hyper Improvement Proposals
2+
3+
- Authors: seanmonstar
4+
- Created: 2026-09-01
5+
- PR: https://github.com/hyperium/hyper/pull/4131
6+
7+
## Summary
8+
9+
HIPs establish a predictable, written‑first process for proposing and evaluating significant changes to hyper. They provide an authoritative place to articulate the problem, the design rationale, and the tradeoffs so contributors can make informed, durable decisions.
10+
11+
## Tenets
12+
13+
- Open: the decision-making process should be out in the open, for all to see and any to participate.
14+
- Understandable: Code and changelogs are not the complete theory. Others should be able to understand what we meant.
15+
- Writing is thinking: while the written artifact is extremely valuable, the process of creating is thinking itself. It refines our thought, sharpens it, makes it better.
16+
- Document the why: just as important is understanding why we thought that way. This allows evaluating when the decision should be reconsidered.
17+
18+
## Motivation
19+
20+
hyper's existing contribution process does not adequately support proposals for large features and design changes.
21+
22+
Much of the shape of hyper can be seen in the [VISION](../VISION.md) and [1.0 ROADMAP](../ROADMAP-1.0.md). Adding new small features is very easy. However, designing large new systems in hyper must be handled with care. hyper is deployed at massive scale. The stability promise requires we be deliberate with what API to expose.
23+
24+
The current process is to ask people to write up larger designs in an issue. GitHub issues are terrible places to discuss multiple points at once. Or people submit massive pull requests, and the discussion is sprinkled through the code reviews.
25+
26+
It's extremely difficult for reviewers to be sure they understand the design, and to ensure that all critical aspects have been considered. If an implementation is denied for a desirable feature, new pull requests tend to be submitted which don't address the previous concerns. The barrier for someone to contribute goes up due to the lack of structure. And the review process slows down as reviewers struggle to continuously rebuild mental context.
27+
28+
## Recommendation
29+
30+
Introduce a structured, written process for proposing, discussing, and deciding large design changes. We call these **hyper Improvement Proposals** (HIPs). They are similar in spirit to [RFCs](https://en.wikipedia.org/wiki/Request_for_Comments).
31+
32+
### Scope
33+
34+
When should HIPs be used?
35+
36+
HIPs are intended for changes that significantly affect hyper's architecture, public API, performance characteristics, or long‑term maintenance burden. They are useful when a decision is difficult to reverse, when there appear to be several strong options, or as a foundation for future proposals.
37+
38+
When are they not needed?
39+
40+
Small, localized changes that do not alter core design or guarantees generally do not require a HIP.
41+
42+
### Content
43+
44+
What should be included in a HIP?
45+
46+
This defines at a high level the purpose of what content is included. The exact sections might change over time, and so are defined in a separate `0000-template.md` file.
47+
48+
But in general, HIPs should provide the following information:
49+
50+
- Objective - the problem, the motivation, the what are we even doing here.
51+
- Tenets - how to measure solutions
52+
- A meta point here: spend more time on the objective, tenets, and alternatives. The recommendation will fall into place.
53+
- A single recommendation
54+
- The job of a proposal is to propose a solution, not to propose a problem.
55+
- There will often be several ways to solve anything.
56+
- The proposal should research and measure the options using the facts and tenets, and decide which is the best.
57+
- The discussion during the proposal period may change what is the recommended solution.
58+
- The essence of those discussions should be recaptured into the proposal itself. Both in the recommendation section, and also potentially in an FAQ appendix.
59+
- Future readers should not need to reconstruct the design from the review comments.
60+
- The whys (and why nots) of the solution
61+
- A proposal should always include why the recommendation is the best option, and why the other options were not chosen
62+
- References
63+
- Links to all the relevant research that was done
64+
- Links to previous discussions
65+
- Appendices
66+
- FAQ
67+
68+
#### What not to include
69+
70+
- Minor details that do not need to be discussed to accept the proposal.
71+
72+
### Lifecycle
73+
74+
- Start with an issue.
75+
- (A HIP should almost never be started without a previous discussion)
76+
- If the feature request seems large enough, a collaborator may ask for a HIP.
77+
- In a new branch, copy the template file to `0000-your-feature-name.md`.
78+
- Fill out the sections based on the instructions in the template.
79+
- You don't need to have fully polished prose in every section to submit for discussion.
80+
- It can even be beneficial to submit initially with bullet points.
81+
- Balance giving proper thought to the sections, with moving quickly to get appropriate feedback.
82+
- Consider sharing an early draft with someone else first.
83+
- Submit a pull request, and include a big reminder to prefer line comments over top-level PR comments.
84+
- As discussion occurs, revise the sections.
85+
- Consider adding to an FAQ appendix.
86+
- Eventually, a [maintainer](../GOVERNANCE.md#maintainer) will decide whether the proposal is accepted or rejected.
87+
88+
Once a proposal is accepted, a number will be assigned. The file in the PR can be renamed with the assigned number, and then merged into trunk.
89+
90+
#### Rejection
91+
92+
If a proposal is rejected or withdrawn, its pull request is closed without assigning a HIP number or merging the document. The pull request remains the record of that discussion. If the discussion reveals a generally applicable constraint or principle, that information should instead be incorporated into the appropriate project documentation.
93+
94+
#### Mutability and History
95+
96+
HIPs are mutable, even after being accepted.
97+
98+
Significant changes can be added to a `## History` section of the document, inserted before any `## References` or appendices. Besides explaining what changed, the reasoning for _why_ should be included.
99+
100+
## Alternatives
101+
102+
- Ad-hoc design docs
103+
- While design documents are an ideal artifact, without defining a process behind them, it's hard for contributors to know when to use one or how.
104+
- Module documentation
105+
- A reader of module documentation is not the right audience.
106+
- The purpose of module documentation is to explain how to use the library.
107+
- It is not a great place to document the why.
108+
- Issues and Pull Requests
109+
- This is the status quo.
110+
- Discussion in issues is a horrible experience.
111+
- Spreads out the full design across disconnected areas.
112+
- Silos the knowledge directly in GitHub.
113+
- A chat application, such as Zulip
114+
- Chat-style messages are extremely poor for having thoughtful discussion and decisions.
115+
- They become littered with messages that have no longer-term value, and it makes it hard to piece back together what a decision is.
116+
- No contributor should ever _have_ to participate in chat-style messaging.
117+
118+
## Unresolved Questions
119+
120+
- Is there a point when significant changes to an accepted HIP should itself be a new HIP?
121+
- Possibly, but I'm not sure it's worth deciding yet.
122+
123+
## References
124+
125+
- https://rust-lang.github.io/rfcs/0002-rfc-process.html
126+
- https://rfd.shared.oxide.computer/rfd/0001
127+
- https://peps.python.org/pep-0001/
128+
- https://docs.jj-vcs.dev/latest/design_docs/
129+
- https://blog.ceejbot.com/posts/design-docs/
130+
- https://adr.github.io/

src/body/incoming.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ impl Sender {
390390

391391
/// Send trailers on trailers channel.
392392
#[allow(unused)]
393+
#[allow(clippy::unused_async_trait_impl)]
393394
pub(crate) async fn send_trailers(&mut self, trailers: HeaderMap) -> crate::Result<()> {
394395
let tx = match self.trailers_tx.take() {
395396
Some(tx) => tx,

src/client/conn/http1.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ where
255255
///
256256
/// If there was an error before trying to serialize the request to the
257257
/// connection, the message will be returned as part of this error.
258+
#[allow(clippy::result_large_err)]
258259
pub fn try_send_request(
259260
&mut self,
260261
req: Request<B>,

src/client/conn/http2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ where
189189
///
190190
/// If there was an error before trying to serialize the request to the
191191
/// connection, the message will be returned as part of this error.
192+
#[allow(clippy::result_large_err)]
192193
pub fn try_send_request(
193194
&mut self,
194195
req: Request<B>,

0 commit comments

Comments
 (0)