Skip to content

fix: sort HTTP headers case insensitively - #2002

Open
Gorkem-Taha wants to merge 1 commit into
httpie:masterfrom
Gorkem-Taha:fix/case-insensitive-header-sorting
Open

Gorkem-Taha wants to merge 1 commit into
httpie:masterfrom
Gorkem-Taha:fix/case-insensitive-header-sorting

Conversation

@Gorkem-Taha

Copy link
Copy Markdown

Summary

  • Sort formatted HTTP header names case-insensitively, keeping repeated fields with mixed casing in their original relative order.
  • Add a regression test and changelog entry.

Closes #1960.

Validation

  • python -m pytest -q tests/test_output.py::TestFormatOptions::test_header_sort_is_case_insensitive_and_stable — passed.
  • flake8 httpie/ tests/ extras/profiling/ docs/packaging/brew/ *.py — passed.
  • git diff --check — passed.
  • Full pytest -q: 1016 passed, 4 skipped, 4 xfailed; four unrelated tests failed. I reran those same four tests on pristine master, where they failed identically (Click's choice formatting, Big5 detection, and quiet-mode output).

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

Successfully merging this pull request may close these issues.

Header formatting reorders repeated fields with mixed capitalization

1 participant