(buf)
| 54282 | const len = this.headers.length; |
| 54283 | if ((len & 1) === 0) { |
| 54284 | this.headers.push(buf); |
| 54285 | } else { |
| 54286 | this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); |
| 54287 | } |
| 54288 | this.trackHeader(buf.length); |
| 54289 | } |
| 54290 | onHeaderValue(buf) { |
| 54291 | let len = this.headers.length; |
| 54292 | if ((len & 1) === 1) { |
| 54293 | this.headers.push(buf); |
| 54294 | len += 1; |
| 54295 | } else { |
| 54296 | this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); |
| 54297 | } |
| 54298 | const key = this.headers[len - 2]; |
| 54299 | if (key.length === 10 && key.toString().toLowerCase() === "keep-alive") { |
| 54300 | this.keepAlive += buf.toString(); |
| 54301 | } else if (key.length === 10 && key.toString().toLowerCase() === "connection") { |
| 54302 | this.connection += buf.toString(); |
| 54303 | } else if (key.length === 14 && key.toString().toLowerCase() === "content-length") { |
| 54304 | this.contentLength += buf.toString(); |
no test coverage detected