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

Method requestBodyCompleted

lib/_http_server.js:1056–1072  ·  view source on GitHub ↗
(upgradeHead)

Source from the content-addressed store, hash-verified

1054 }
1055
1056 requestBodyCompleted(upgradeHead) {
1057 this[kIncomingMessage] = null;
1058
1059 // When the request body is completed, we begin streaming all the
1060 // post-body data for the upgraded protocol:
1061 if (upgradeHead?.length > 0) {
1062 if (!this.push(upgradeHead)) {
1063 this[kSocket].pause();
1064 }
1065 }
1066
1067 this[kSocket].on('data', (data) => {
1068 if (!this.push(data)) {
1069 this[kSocket].pause();
1070 }
1071 });
1072 }
1073
1074 _read(size) {
1075 // Reading the upgrade stream starts the request stream flowing. It's

Callers 1

onParserExecuteCommonFunction · 0.80

Calls 3

pauseMethod · 0.65
pushMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected