(headers)
| 956 | } |
| 957 | |
| 958 | function 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 | |
| 969 | module.exports = { |
| 970 | assertIsObject, |
no outgoing calls
no test coverage detected
searching dependent graphs…