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 header parser (#1808) #1810

Merged
merged 3 commits into from
Jul 28, 2024
Merged

Conversation

ksw2000
Copy link
Contributor

@ksw2000 ksw2000 commented Jul 22, 2024

See issue #1808. When FastHTTP receives a header value suffixed or prefixed with tabs, they should be stripped.

When FastHTTP receives a header value suffixed or prefixed with tabs, they should be stripped.
Copy link
Collaborator

@erikdubbelboer erikdubbelboer left a comment

Choose a reason for hiding this comment

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

Can you also add a test that shows that gets the value and shows the tabs are stripped?

@ksw2000 ksw2000 changed the title Fix RequestHeader parser (#1808) Fix header parser (#1808) Jul 24, 2024
@ksw2000
Copy link
Contributor Author

ksw2000 commented Jul 24, 2024

I have added tests for the parser of ResponseHeader and RequestHeader. Before making code changes, TestIssue1808 could not pass. Additionally, my ground truth is compared against the parsing results of Go's built-in net/http package, which means our parser handles tabs in the same way as Go's built-in parser.

When I made the pull request, there was one test that did not pass, but in my opinion, it is unrelated to the changes I made.

@erikdubbelboer erikdubbelboer merged commit ed6a27a into valyala:master Jul 28, 2024
18 of 19 checks passed
@erikdubbelboer
Copy link
Collaborator

Thanks!

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