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

Function getAuthority

lib/internal/http2/util.js:958–967  ·  view source on GitHub ↗
(headers)

Source from the content-addressed store, hash-verified

956}
957
958function getAuthority(headers) {
959 // For non-CONNECT requests, HTTP/2 allows either :authority
960 // or Host to be used equivalently. The first is preferred
961 // when making HTTP/2 requests, and the latter is preferred
962 // when converting from an HTTP/1 message.
963 if (headers[HTTP2_HEADER_AUTHORITY] !== undefined)
964 return headers[HTTP2_HEADER_AUTHORITY];
965 if (headers[HTTP2_HEADER_HOST] !== undefined)
966 return headers[HTTP2_HEADER_HOST];
967}
968
969module.exports = {
970 assertIsObject,

Callers 5

authorityMethod · 0.85
constructorMethod · 0.85
pushStreamMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…