Enabling the Request object to generate the correct scheme for SSL URI requests to
a webserver through an HTTP proxy or load balance

HTTP_X_FORWARDED_PROTO request header is sent by loadbalancers insted of HTTPS to
indicate the URI was requested via a secure connection.

An example of this useage is Amazon Elastic Beanstalk applications which can sit
behind a load balancer (when autoscaling)
Fixing php coding style errors
Merge pull request #5749 in master
Merge pull request #5846
Merge pull request #5846 in develop