Add support for ignore_invalid_headers_in_responses in client::Builder
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
Is your feature request related to a problem? Please describe.
I am trying to fetch resource that located behind Imperva/Incapsula WAF. As part it's client-classification process sometimes the WAF added cookies in the following format Set-Cookie: ___utmvaPRuXKscZ=dmo\x01OZPF; path=/; Max-Age=900; Secure; SameSite=None\r\n this cookie include the invalid \x01 in the middle. Currently I am not able to parse such responses with hyper-client,
Describe the solution you'd like
httparse has support in ignore_invalid_headers_in_response flags , I want to add the support to this flag in the same way that hyper support allow_obsolete_multiline_headers_in_responses .
Describe alternatives you've considered
N/A
Additional context
If it's sounds good I will start to work on PR
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 at client::Builder and trace the existing support for allow_obsolete_multiline_headers_in_responses. Compare that path with httparse's ignore_invalid_headers_in_response flag and its related tests. Done means the builder exposes equivalent response-header handling and tests cover responses containing the reported invalid cookie byte.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100