nock: Avoid failing on headers conflict
The folowing error happen when a header has been set by the client library twice (one time in uppercase and another time in lower case. Failed to convert header keys to lower case due to field name conflict: {headerName}
.
It is certainly a bad practice to do so but the fact is that nock is used mostly to mock external libraries calls so it would be useful to be able to disable error throwing for such cases with some options.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 6
- Comments: 19 (8 by maintainers)
Why hasn’t this been merged yet? It would appear to be a mostly harmless PR. Last given option should override earlier ones, like every other node library around.
@CFreeAtEbsco I just updated the test, everything looks good to me.
@dcstone09 Sounds good pulling it in 40m to see if everything passes.
@ianwsperber @moaxaca The PR has been updated 👍
@moaxaca Just left a comment on the PR! You can help get the PR merged faster if you could confirm whether it fixes the bug on your machine 😄