MCPcopy Create free account
hub / github.com/angular/dev-infra / onHeaderValue

Method onHeaderValue

github-actions/browserstack/set-browserstack-env.js:6218–6238  ·  view source on GitHub ↗
(buf)

Source from the content-addressed store, hash-verified

6216 }
6217 onHeaderField(buf) {
6218 const len = this.headers.length;
6219 if ((len & 1) === 0) {
6220 this.headers.push(buf);
6221 } else {
6222 this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]);
6223 }
6224 this.trackHeader(buf.length);
6225 }
6226 onHeaderValue(buf) {
6227 let len = this.headers.length;
6228 if ((len & 1) === 1) {
6229 this.headers.push(buf);
6230 len += 1;
6231 } else {
6232 this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]);
6233 }
6234 const key = this.headers[len - 2];
6235 if (key.length === 10) {
6236 const headerName = util.bufferToLowerCasedHeaderName(key);
6237 if (headerName === "keep-alive") {
6238 this.keepAlive += buf.toString();
6239 } else if (headerName === "connection") {
6240 this.connection += buf.toString();
6241 }

Callers 1

lazyllhttpFunction · 0.45

Calls 3

pushMethod · 0.45
toStringMethod · 0.45
trackHeaderMethod · 0.45

Tested by

no test coverage detected