Open linhub15 opened 3 years ago
Possible infinite loop.
When User-Agent header is specified and process.env.NODE_ENV is undefined we hit line 273 and continue the while loop without ever incrementing the index i++
User-Agent
process.env.NODE_ENV
undefined
i++
https://github.com/tanhakabir/rest-book/blob/6df707bf0ef7f4b81f6ce73b7308952e39a2a065/src/common/request.ts#L266-L278
Tested on VS Code
Version: 1.61.2 Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643 Date: 2021-10-19T14:58:13.605Z Electron: 13.5.1 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Linux x64 5.4.0-89-generic
Possible infinite loop.
When
User-Agent
header is specified andprocess.env.NODE_ENV
isundefined
we hit line 273 and continue the while loop without ever incrementing the indexi++
https://github.com/tanhakabir/rest-book/blob/6df707bf0ef7f4b81f6ce73b7308952e39a2a065/src/common/request.ts#L266-L278
Tested on VS Code