fix: ignore not throw on invalid response headers#950
Merged
JakeChampion merged 1 commit intoJakeChampion:masterfrom Apr 1, 2023
Merged
Conversation
Owner
|
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 |
Contributor
Author
|
I’m working on mocking xhr to Test this. |
Repository owner
deleted a comment
Jun 22, 2021
Contributor
Author
|
What is going on here? |
S69y
approved these changes
Jun 26, 2021
Repository owner
deleted a comment from
S69y
Jun 26, 2021
776699y
approved these changes
Jun 27, 2021
mike22664
approved these changes
Jul 12, 2021
Ngcaciso
approved these changes
Aug 4, 2021
taquila123
approved these changes
Aug 5, 2021
Alwaafi0
approved these changes
Aug 27, 2021
Madow92
approved these changes
Sep 13, 2021
inakiAndres
approved these changes
Jan 12, 2022
Repository owner
deleted a comment
Mar 22, 2022
Repository owner
deleted a comment
Mar 22, 2022
dangbetj
approved these changes
Jun 11, 2022
JakeChampion
approved these changes
Apr 1, 2023
9d60b33 to
e74fa5b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@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_moduleshas a_http_outgoing.jsthat 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