hyperium / hyperium/hyper

Add HTTP/1 max header size limit

Open
#3,832 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-http1 A-server C-feature E-medium E-pr-welcome
Dominant language
Rust
Stars
16.3k
Forks
1.8k
Avg merge
1d 22h
Merged PRs (30d)
14

Description

Is your feature request related to a problem? Please describe.
I need "the ability to limit the size of Request Header".
Although it is possible to implement this in an application, I think it is most efficient if it can be handled at the protocol implementation level.

Describe the solution you'd like
Currently, it is supported to specify the number of headers through the "h1_max_headers" option when creating a builder. I think it would be okay to control it by adding a few properties like this.

Describe alternatives you've considered
If we implement the header max setting, there may be several ways to do this.

  1. number of header: already implemented
  2. max size of each heade name: Fixed at 64kb
  3. max size of each heade value: none (maybe)
  4. max size of total header: none

What if all of this could be set as a builder option? What do you think about this?

Question
If the problem was simple, I would implement it myself and post a PR, but a question arose while looking at the code.
Image
There is evidence of an attempt to add an option called "h1_max_header_size". What exactly is the max that this is trying to implement?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the builder option h1_max_headers and inspect the attempted h1_max_header_size change shown in the issue image. Clarify whether the requested limit applies to individual names, values, or the total request header, then document the agreed builder behavior and add coverage for the selected limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.