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: ignore not throw on invalid response headers #950
fix: ignore not throw on invalid response headers #950
Conversation
The only way I can think to test this, would be to use another language to create a http server which can set a response header name in an invalid format. From the issue, we know that golang is able to do that. I'm also happy to accept this pull-request without a test |
I’m working on mocking xhr to Test this. |
What is going on here? |
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.
Reviwed changes, merge commits
9d60b33
to
e74fa5b
Compare
@JakeChampion I think the fix is fine, however I struggle with the test. It runs into the same problem that the response headers are validated. But I can't figure out which package supplies this code. None of the
node_modules
has a_http_outgoing.js
that I could monkey-patch for this one response to not validate the response headers.I also can't just test
parseHeaders()
since its private and not globally exported (rightfully so).So do you have any idea how to test my fix properly?
Fixes #930