Skip to content

Conversation

@jbr
Copy link
Member

@jbr jbr commented Jul 30, 2021

Previously,

  • parsing forwarded headers required the for section to be first (Error in parser for the "Forwarded" header #374)
  • checking short strings against a prefix that is longer than it with starts_with_ignore_case would panic (only used in forwarded currently)
  • parse_utils::parse_token (pub(crate)) token did not successfully parse 1-character tokens due to an off-by-one error

This can be fairly easily backported to the 2.x line if there's interest

closes #374

@jbr jbr requested a review from Fishrock123 July 30, 2021 19:32
@jbr jbr force-pushed the forwarded-header-bugs branch from b792450 to 4d65eaf Compare July 30, 2021 22:11
Copy link
Member

@Fishrock123 Fishrock123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to backport

@jbr
Copy link
Member Author

jbr commented Jul 30, 2021

do we have a branch or tag for 2.x?

@Fishrock123
Copy link
Member

@Fishrock123 Fishrock123 merged commit cb62676 into http-rs:main Aug 5, 2021
Fishrock123 added a commit that referenced this pull request Aug 10, 2021
Additions:
- `AsRef<anyhow::Error> for http_types::Error`
- `From<Vec<HeaderValue>> for HeaderValues`
- More `TryFrom<>` conversions for the `"hyperium_http"` feature.
Fixes:
- Addressed three bugs in forwarded header parsing. #375
Dependencies:
- Update serde_qs to 0.8.3
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.

Error in parser for the "Forwarded" header

2 participants