Skip to content

fix: update key comparison in http_request to be case-insensitive#23

Merged
ruslanti merged 1 commit into
mainfrom
fix/ngxstr_eq_ignore_case
May 14, 2026
Merged

fix: update key comparison in http_request to be case-insensitive#23
ruslanti merged 1 commit into
mainfrom
fix/ngxstr_eq_ignore_case

Conversation

@ruslanti
Copy link
Copy Markdown
Collaborator

No description provided.

@ruslanti ruslanti requested a review from qrdl May 14, 2026 12:25
@ruslanti ruslanti self-assigned this May 14, 2026
Copilot AI review requested due to automatic review settings May 14, 2026 12:25
@ruslanti ruslanti added the bug Something isn't working label May 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates HTTP header key matching to be case-insensitive (per HTTP semantics) by adding a case-insensitive comparison helper on NgxStr and using it in HeaderList::set.

Changes:

  • Add NgxStr::eq_ignore_ascii_case for ASCII case-insensitive byte comparisons.
  • Update HeaderList::set to match header names case-insensitively when updating values.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
nginx_module/src/ngx_str.rs Adds a helper to compare NgxStr values ignoring ASCII case.
nginx_module/src/http_request.rs Uses the new helper so header updates/removals match keys case-insensitively.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ruslanti ruslanti merged commit ba57181 into main May 14, 2026
11 checks passed
@ruslanti ruslanti deleted the fix/ngxstr_eq_ignore_case branch May 14, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants