MCPcopy Index your code
hub / github.com/nodejs/llhttp / setHeaderFlags

Method setHeaderFlags

src/llhttp/http.ts:1249–1263  ·  view source on GitHub ↗
(next: string | Node)

Source from the content-addressed store, hash-verified

1247 }
1248
1249 private setHeaderFlags(next: string | Node): Node {
1250 const HS = HEADER_STATE;
1251 const F = FLAGS;
1252
1253 const toConnection =
1254 this.update('header_state', HEADER_STATE.CONNECTION, next);
1255
1256 return this.load('header_state', {
1257 [HS.CONNECTION_KEEP_ALIVE]:
1258 this.setFlag(F.CONNECTION_KEEP_ALIVE, toConnection),
1259 [HS.CONNECTION_CLOSE]: this.setFlag(F.CONNECTION_CLOSE, toConnection),
1260 [HS.CONNECTION_UPGRADE]: this.setFlag(F.CONNECTION_UPGRADE, toConnection),
1261 [HS.TRANSFER_ENCODING_CHUNKED]: this.setFlag(F.CHUNKED, next),
1262 }, this.node(next));
1263 }
1264
1265 private mulAdd(field: string, targets: IMulTargets,
1266 options: IMulOptions = { base: 10, signed: false }): Node {

Callers 1

buildHeaderValueMethod · 0.95

Calls 4

updateMethod · 0.95
loadMethod · 0.95
setFlagMethod · 0.95
nodeMethod · 0.95

Tested by

no test coverage detected