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

Function matchHeaders

github-actions/browserstack/set-browserstack-env.js:10930–10950  ·  view source on GitHub ↗
(mockDispatch2, headers)

Source from the content-addressed store, hash-verified

10928 throw new SocketError("bad connect", null);
10929 }
10930 onUpgrade(statusCode, rawHeaders, socket) {
10931 const { callback, opaque, context } = this;
10932 removeSignal(this);
10933 this.callback = null;
10934 let headers = rawHeaders;
10935 if (headers != null) {
10936 headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
10937 }
10938 this.runInAsyncScope(callback, null, null, {
10939 statusCode,
10940 headers,
10941 socket,
10942 opaque,
10943 context
10944 });
10945 }
10946 onError(err) {
10947 const { callback, opaque } = this;
10948 removeSignal(this);
10949 if (callback) {
10950 this.callback = null;
10951 queueMicrotask(() => {
10952 this.runInAsyncScope(callback, null, err, { opaque });
10953 });

Callers 2

matchKeyFunction · 0.70
getMockDispatchFunction · 0.70

Calls 6

buildHeadersFromArrayFunction · 0.70
lowerCaseEntriesFunction · 0.70
getHeaderByNameFunction · 0.70
matchValueFunction · 0.70
headersMethod · 0.45
entriesMethod · 0.45

Tested by

no test coverage detected