libwww-perl / libwww-perl/HTTP-Message
please add a function that does Header Field Normalisation
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 32
- Forks
- 63
- Avg merge
- 5h 14m
- Merged PRs (30d)
- 1
Description
In order to make comparison of two Header Field values more convenient (and correct) it would be great to have a normalisation function in HTTP::Headers, like:
my $normalized_value = $h->normalized_header( 'accept_language');
Normalisation is mentioned in RFC 7234 §4.1 Calculating Secondary Keys with Vary. And could involve:
- adding/removing whitespace
- combining fields, for multi value fields
- reordering fields
- capitalisation
However, re-ordering and capitalisation can be Header Field dependent and should not break semantics This requires a lot of care, knowing how certain HTTP-Header Fields south to be treated.
NOTE: bare in mind that normalisation is only for display or comparison, I would strongly disagree to change the headers, even though it might semantically totally right.
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 with the HTTP::Headers API and RFC 7234 §4.1, then determine which header fields can be normalized without changing their semantics. The scope should define whitespace, multi-value combination, ordering, and capitalization behavior, while keeping normalization separate from stored headers. Done requires an agreed field-dependent design and coverage for comparisons and display.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100