-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
add extra checking of header buffer, to support multi line header value #688
Conversation
Thank you for the pull request. |
@erikdubbelboer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. I'm afraid some more changes are needed before I can accept this.
@erikdubbelboer |
I think if every time you get a newline within a header value you just skip that byte and copy everything after it back by one byte it should work. |
@erikdubbelboer |
@tedli sorry for the slow reply. This is a big change with lots of edge cases and I haven't found the time to really review this yet. I'll try to do it this weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. Almost there, just some minor changes.
@tedli not sure if you noticed but the Travis CI build failed because your code panics on certain inputs: https://play.golang.org/p/e7m-bwnCMzf |
@erikdubbelboer |
This is just some random input generated by https://fuzzit.dev/ but it still shouldn't cause a panic of course. It needs to be robust against invalid data yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the panic. Now there is only one thing left to fix with the test.
Thanks! |
#123