MCPcopy
hub / github.com/socketio/socket.io / writeHeader

Method writeHeader

packages/engine.io/lib/userver.ts:336–348  ·  packages/engine.io/lib/userver.ts::ResponseWrapper.writeHeader
(key: string, value: string)

Source from the content-addressed store, hash-verified

334 }
335
336 public writeHeader(key: string, value: string) {
337 if (this.isAborted) return;
338
339 if (key === class="st">"Content-Length") {
340 class="cm">// the content length is automatically added by uWebSockets.js
341 return;
342 }
343 if (this.statusWritten) {
344 this.res.writeHeader(key, value);
345 } else {
346 this.headers.push([key, value]);
347 }
348 }
349
350 private writeBufferedHeaders() {
351 this.headers.forEach(([key, value]) => {

Callers 7

setHeaderMethod · 0.95
callbackMethod · 0.80
abortRequestMethod · 0.80
writeBufferedHeadersMethod · 0.80
onDataRequestMethod · 0.80
respondMethod · 0.80
attachAppMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected