function onDataAsString()

in src/connection/HttpConnection.ts [178:185]


        function onDataAsString (chunk: string): void {
          currentLength += Buffer.byteLength(chunk)
          if (currentLength > maxResponseSize) {
            response.destroy(new RequestAbortedError(`The content length (${currentLength}) is bigger than the maximum allowed string (${maxResponseSize})`))
          } else {
            payload = `${payload as string}${chunk}`
          }
        }