function onDataAsBuffer()

in src/connection/HttpConnection.ts [169:176]


        function onDataAsBuffer (chunk: Buffer): void {
          currentLength += Buffer.byteLength(chunk)
          if (currentLength > maxCompressedResponseSize) {
            response.destroy(new RequestAbortedError(`The content length (${currentLength}) is bigger than the maximum allowed buffer (${maxCompressedResponseSize})`))
          } else {
            (payload as Buffer[]).push(chunk)
          }
        }