diff options
Diffstat (limited to 'lib/_debug_agent.js')
-rw-r--r-- | lib/_debug_agent.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/_debug_agent.js b/lib/_debug_agent.js index 152a7c65a6..cb4684f0ed 100644 --- a/lib/_debug_agent.js +++ b/lib/_debug_agent.js @@ -119,10 +119,10 @@ Client.prototype._transform = function _transform(data, enc, cb) { while (true) { if (this.state === 'headers') { // Not enough data - if (!/\r\n/.test(this.buffer)) + if (!this.buffer.includes('\r\n')) break; - if (/^\r\n/.test(this.buffer)) { + if (this.buffer.startsWith('\r\n')) { this.buffer = this.buffer.slice(2); this.state = 'body'; continue; |