MCPcopy Index your code
hub / github.com/nodejs/node / onRequestStreamClose

Function onRequestStreamClose

deps/undici/undici.js:8786–8799  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8784 }
8785 __name(onUpgradeStreamClose, "onUpgradeStreamClose");
8786 function onRequestStreamClose() {
8787 const state = this[kRequestStreamState];
8788 if (state) {
8789 releaseRequestStream(this);
8790 if (state.pendingEnd && !state.request.aborted && !state.request.completed) {
8791 state.request.onResponseEnd(state.trailers || {});
8792 state.finalizeRequest();
8793 }
8794 }
8795 this.off("data", onData);
8796 this.off("error", noop);
8797 closeStreamSession(this);
8798 this[kRequestStreamState] = null;
8799 }
8800 __name(onRequestStreamClose, "onRequestStreamClose");
8801 function shouldSendContentLength(method) {
8802 return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";

Callers

nothing calls this directly

Calls 4

releaseRequestStreamFunction · 0.70
closeStreamSessionFunction · 0.70
onResponseEndMethod · 0.65
offMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…