Fix resolving X-Forwarded-For header

This fixes X-Forwarded-For resolving (HTTP_ prefix). This is fixed
on develop branch difrently. However current behaviour renders
invalid results and IMHO this patch should merged and released
as 2.3.NEXT
Merge remote-tracking branch 'mqu/fix-http-x-forwarded-for'