Improves handling of forwarded headers. Fix #2094

I'm not so good at documentation. If something is not clear please tell me.