Improves handling of forwarded headers. Fix #2094

At very least the tuple in this structure should be extracted out into a case class, otherwise it's very hard to read.  The properties of the case class should be documented with comments, saying what the left/right values mean.