Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle 0-length header values and trim whitespace #67

Merged
merged 2 commits into from
Jul 20, 2018

Conversation

patrickhulce
Copy link
Contributor

5556015 seems to have broken the tests & handling of whitespace

with the way the regex is now it will never match anything since \s is part of the character class in the next group, so from what I can tell we can either remove \s*? entirely to not trim whitespace, throw or .trim on the value, or do something like I've done here

also added a test case for #60

Copy link
Owner

@developit developit left a comment

Choose a reason for hiding this comment

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

beautiful

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.

2 participants