function forEachHeader(rawHeaders, callback) {
  for (let i = 0; i < rawHeaders.length; i += 2) {
    callback(rawHeaders[i + 1], rawHeaders[i], i)
  }
}
Utility for iterating over a raw headers array.

The callback is called with:
 - The header value. string, array of strings, or a function
 - The header field name. string
 - Index of the header field in the raw header array.