Bug: CompareHeaders function fails to handle missing headers properly labels: bug, test-failure
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 9
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
The CompareHeaders function currently fails to properly handle and display differences when expected headers are missing from the actual headers map.
Current Behavior
When an expected header is missing from the actual headers:
The test fails with error: "CompareHeaders() didn't properly show missing Authorization header"
The diff output doesn't properly highlight or indicate the missing header
The function may panic or produce incorrect output when trying to process missing values
Expected Behavior
When comparing headers and encountering missing values, the function should:
Clearly indicate which headers are missing in the actual headers
Mark missing headers appropriately in the diff visualization
The fails for
expected := map[string]string{
"Authorization": "Bearer token123",
"User-Agent": "test-client",
}
actual := map[string]string{
"User-Agent": "test-client",
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the CompareHeaders function and reproduce the issue with the expected and actual maps shown in the report. Done means a missing Authorization header is clearly identified in the diff without a panic or incorrect output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100