hyperium / hyperium/http

The request header does not support uppercase letters

Open
#610 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.4k
Forks
378
Avg merge
1d 21h
Merged PRs (30d)
5

Description

  • file: src/header/name.rs
  • line: 1259
if name_bytes.len() == 0 || name_bytes.len() > super::MAX_HEADER_NAME_LEN || {
    let mut i = 0;
    loop {
        if i >= name_bytes.len() {
            break false;
        } else if HEADER_CHARS_H2[name_bytes[i] as usize] == 0 {
            break true;
        }
        i += 1;
    }
} { 
    ([] as [u8; 0])[0]; // Invalid header name
}

Contributor guide

No contributing guide indexed for this repository

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 with the header-name validation in src/header/name.rs around line 1259, including the HEADER_CHARS_H2 lookup shown in the issue. Trace how uppercase bytes are classified and verify that valid uppercase header names are accepted without changing rejection of invalid names.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.