Fix getPort() returning 80 instead of 443 when X-FORWARDED-PROTO is set to https

[HttpFoundation] fixed something

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7870
| License       | MIT
| Doc PR        | 

Ensure that the getPort() method returns port 443 as default when
X-FORWARDED-PROTO is set to https. Currently it would return port 80
if X-FORWARDED-PROTO was set to https and X-FORWARDED-PORT was not
set by the trusted proxy.