| 6760 | writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); |
| 6761 | } |
| 6762 | } else if (util.isStream(body)) { |
| 6763 | writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); |
| 6764 | } else if (util.isIterable(body)) { |
| 6765 | writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); |
| 6766 | } else { |
| 6767 | assert(false); |
| 6768 | } |
| 6769 | return true; |
| 6770 | } |
| 6771 | function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { |
| 6772 | var _a, _b, _c; |
| 6773 | assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); |
| 6774 | let finished = false; |
| 6775 | const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }); |
| 6776 | const onData = function(chunk) { |