Get the first scheme received in HTTP_X_FORWARDED_PROTO header.

....
And I'll fix these tests, are still not correct.