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

The request header does not support uppercase letters #610

Open
arsiac opened this issue May 27, 2023 · 1 comment
Open

The request header does not support uppercase letters #610

arsiac opened this issue May 27, 2023 · 1 comment

Comments

@arsiac
Copy link

arsiac commented May 27, 2023

  • 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
}
@arsiac arsiac changed the title name.rs 1269 miss 'else' The request header does not support uppercase letters May 28, 2023
@robjtede
Copy link

robjtede commented May 29, 2023

Lowercase header names are used as a normalized representation, since header names are case-insensitive in HTTP/1.x and required to be lowercase in HTTP/2.

Also see #228 (comment)

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

No branches or pull requests

2 participants