()
| 55045 | const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); |
| 55046 | errorRequest(client, request3, err); |
| 55047 | if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { |
| 55048 | h2State.streams -= 1; |
| 55049 | util4.destroy(stream4, err); |
| 55050 | } |
| 55051 | }); |
| 55052 | return true; |
| 55053 | function writeBodyH2() { |
| 55054 | if (!body) { |
| 55055 | request3.onRequestSent(); |
| 55056 | } else if (util4.isBuffer(body)) { |
| 55057 | assert2(contentLength === body.byteLength, "buffer body must have content length"); |
| 55058 | stream4.cork(); |
| 55059 | stream4.write(body); |
| 55060 | stream4.uncork(); |
| 55061 | stream4.end(); |
| 55062 | request3.onBodySent(body); |
| 55063 | request3.onRequestSent(); |
| 55064 | } else if (util4.isBlobLike(body)) { |
| 55065 | if (typeof body.stream === "function") { |
| 55066 | writeIterable({ |
| 55067 | client, |
| 55068 | request: request3, |
| 55069 | contentLength, |
| 55070 | h2stream: stream4, |
| 55071 | expectsPayload, |
| 55072 | body: body.stream(), |
| 55073 | socket: client[kSocket], |
| 55074 | header: "" |
| 55075 | }); |
| 55076 | } else { |
| 55077 | writeBlob({ |
| 55078 | body, |
| 55079 | client, |
| 55080 | request: request3, |
| 55081 | contentLength, |
| 55082 | expectsPayload, |
| 55083 | h2stream: stream4, |
| 55084 | header: "", |
| 55085 | socket: client[kSocket] |
| 55086 | }); |
| 55087 | } |
| 55088 | } else if (util4.isStream(body)) { |
| 55089 | writeStream({ |
| 55090 | body, |
| 55091 | client, |
| 55092 | request: request3, |
| 55093 | contentLength, |
| 55094 | expectsPayload, |
| 55095 | socket: client[kSocket], |
| 55096 | h2stream: stream4, |
| 55097 | header: "" |
| 55098 | }); |
| 55099 | } else if (util4.isIterable(body)) { |
| 55100 | writeIterable({ |
| 55101 | body, |
| 55102 | client, |
| 55103 | request: request3, |
| 55104 | contentLength, |
no test coverage detected
searching dependent graphs…