Nock: Regression in matchStringOrRegexp in 9.0.5

Created on 13 Feb 2017  路  2Comments  路  Source: nock/nock

It looks like the recent change from the commit https://github.com/node-nock/nock/commit/933cbada58d495a54a429bc09176d56d5f58f936?diff=split introduces a breaking change.

Specifically, in the line https://github.com/node-nock/nock/blob/933cbada58d495a54a429bc09176d56d5f58f936/lib/interceptor.js#L344.

Based on my understanding of the code, options.getHeader(header.name) can return undefined, which will lead to an error: TypeError: Cannot read property 'toString' of undefined when this is true.

cc: @KingHenne

bug

Most helpful comment

Thanks @andrewaustin, I'll add some defensive coding and get a fix out ASAP

All 2 comments

Thanks @andrewaustin, I'll add some defensive coding and get a fix out ASAP

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it鈥檚 related. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gr2m picture gr2m  路  28Comments

paulmelnikow picture paulmelnikow  路  32Comments

RichardLitt picture RichardLitt  路  21Comments

em-cliqz picture em-cliqz  路  23Comments

paulmelnikow picture paulmelnikow  路  48Comments