Skip to content

fix: handle HTTP header names case-insensitively#1506

Merged
TwiN merged 2 commits intoTwiN:masterfrom
AnuragEkkati:fix/case-insensitive-headers
Jan 25, 2026
Merged

fix: handle HTTP header names case-insensitively#1506
TwiN merged 2 commits intoTwiN:masterfrom
AnuragEkkati:fix/case-insensitive-headers

Conversation

@AnuragEkkati
Copy link
Contributor

@AnuragEkkati AnuragEkkati commented Jan 23, 2026

Details: HTTP header names should be case-insensitive per RFC 7230. When the users configure the headers like 'user-agent' (lowercase), gatus was adding its own 'User-Agent' header because the case-sensitive map lookup failed to find the existing header.

Fixed headers:

  • User-Agent
  • Content-Type
  • Host

Fixes #1491

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

@github-actions github-actions bot added the bug Something isn't working label Jan 23, 2026
Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

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

Excellent work, just one small request!

Details: HTTP header names should be case-insensitive per RFC 7230. When the users
configure the headers like 'user-agent' (lowercase), gatus was adding its own 'User-Agent'
header because the case-sensitive map lookup failed to find the existing header.

Fixed headers:
- User-Agent
- Content-Type
- Host

Fixes TwiN#1491"
@AnuragEkkati AnuragEkkati force-pushed the fix/case-insensitive-headers branch from ed0104c to a4ed410 Compare January 23, 2026 22:56
@TwiN TwiN merged commit 4853191 into TwiN:master Jan 25, 2026
2 checks passed
@TwiN
Copy link
Owner

TwiN commented Jan 25, 2026

Thank you for the contribution!

alexlebens pushed a commit to alexlebens/infrastructure that referenced this pull request Feb 20, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [TwiN/gatus](https://github.com/TwiN/gatus) | minor | `v5.34.0` → `v5.35.0` |
| [ghcr.io/twin/gatus](https://github.com/TwiN/gatus) | minor | `v5.34.0` → `v5.35.0` |

---

### Release Notes

<details>
<summary>TwiN/gatus (TwiN/gatus)</summary>

### [`v5.35.0`](https://github.com/TwiN/gatus/releases/tag/v5.35.0)

[Compare Source](TwiN/gatus@v5.34.0...v5.35.0)

#### What's Changed

- feat(conditions,ui): Add `endpoints[].ui.resolve-successful-conditions` by [@&#8203;lorenzoppx](https://github.com/lorenzoppx) in [#&#8203;1486](TwiN/gatus#1486)
- feat(ui): Add support for custom favicon by [@&#8203;mloskot](https://github.com/mloskot) in [#&#8203;1097](TwiN/gatus#1097)
- fix(ui): Persist show average response time setting by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1438](TwiN/gatus#1438)
- fix(ci): Adjust static asset generation workflow by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1480](TwiN/gatus#1480)
- fix: handle HTTP header names case-insensitively by [@&#8203;AnuragEkkati](https://github.com/AnuragEkkati) in [#&#8203;1506](TwiN/gatus#1506)
- refactor: Simplify and modernize loops by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1522](TwiN/gatus#1522)
- docs: Fix typo in README concurrency section by [@&#8203;emrebasarannn](https://github.com/emrebasarannn) in [#&#8203;1520](TwiN/gatus#1520)
- chore: Update to Go 1.25 by [@&#8203;TwiN](https://github.com/TwiN) in [#&#8203;1519](TwiN/gatus#1519)
- chore(deps): bump github.com/aws/aws-sdk-go-v2 from 1.40.0 to 1.41.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1466](TwiN/gatus#1466)
- chore(deps): bump golang.org/x/crypto from 0.45.0 to 0.46.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1488](TwiN/gatus#1488)
- chore(deps): bump github.com/miekg/dns from 1.1.68 to 1.1.70 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1490](TwiN/gatus#1490)
- chore(deps): bump github.com/aws/aws-sdk-go-v2/credentials from 1.19.2 to 1.19.7 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1498](TwiN/gatus#1498)
- chore(deps): bump code.gitea.io/sdk/gitea from 0.22.1 to 0.23.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1525](TwiN/gatus#1525)
- chore(deps): bump github.com/TwiN/whois from 1.2.0 to 1.3.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1538](TwiN/gatus#1538)
- chore(deps): bump google.golang.org/api from 0.264.0 to 0.265.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1533](TwiN/gatus#1533)
- chore(deps): bump github.com/prometheus-community/pro-bing from 0.7.0 to 0.8.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1544](TwiN/gatus#1544)
- chore(deps): bump golang.org/x/oauth2 from 0.34.0 to 0.35.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;1543](TwiN/gatus#1543)

#### New Contributors

- [@&#8203;lorenzoppx](https://github.com/lorenzoppx) made their first contribution in [#&#8203;1486](TwiN/gatus#1486)
- [@&#8203;AnuragEkkati](https://github.com/AnuragEkkati) made their first contribution in [#&#8203;1506](TwiN/gatus#1506)
- [@&#8203;emrebasarannn](https://github.com/emrebasarannn) made their first contribution in [#&#8203;1520](TwiN/gatus#1520)

**Full Changelog**: <TwiN/gatus@v5.34.0...v5.35.0>

***

Have a great weekend!

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNS43IiwidXBkYXRlZEluVmVyIjoiNDMuMjUuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW1hZ2UiXX0=-->

Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/4130
Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net>
Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
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.

HTTP header names should be case insensitive

2 participants