Skip to content

HTTP header names should be case insensitive #1491

@AndrewSav

Description

@AndrewSav

Describe the bug

where we configure headers like this:

endpoints:
  - headers:
      user-agent: Mozilla/5.0

due to how gatus is coded and maps in golang work, it's a toss up will we get mozilla or gatus header effectively applied to request, so results are random. Can we fix this so that the header names are truly case insensitive as they should be?

What do you see?

endpoints fail intermittently due to wrong header sent

What do you expect to see?

the header is sent as specified in configuration without another header of the same name being sent by gatus itself

List the steps that must be taken to reproduce this issue

  1. use the headers config similar to above
  2. observe on the server polled that headers received are mixed

Version

5.34.0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions