Page MenuHomeDevCentral

Allow to get server URL, port, name, scheme
ClosedPublic

Authored by dereckson on Apr 30 2018, 22:32.
Tags
None
Referenced Files
F3914111: D1636.diff
Thu, Dec 19, 13:07
Unknown Object (File)
Tue, Dec 17, 02:09
Unknown Object (File)
Fri, Dec 13, 12:35
Unknown Object (File)
Fri, Dec 13, 12:35
Unknown Object (File)
Thu, Dec 5, 00:47
Unknown Object (File)
Nov 19 2024, 02:08
Unknown Object (File)
Nov 18 2024, 06:06
Unknown Object (File)
Nov 18 2024, 05:50
Subscribers
None

Details

Summary

To determine the URL of a server, three components are needed:
the scheme (http? https?), the name and the port.

Generally, ports won't be the in URL, as they are the default
80 or 443 ports.

Advanced network configurations

Furthermore, in back-end/front-end topologies, To determine
if we're in HTTPS requires to examine several headers.

If there is now a standard, RFC 7239 section 4, a lot of load balancers,
caches or web servers use proprietary or former de facto headers.

Deprecation

The new Request::getServerURL method supersedes get_server_url
from Keruald/Xen sites like Azhàr or Zed.

Test Plan

Unit tests provided

Diff Detail

Repository
rKOT Keruald OmniTools
Lint
Lint Passed
Unit
Tests Passed
Branch
get_server_url (branched from master)
Build Status
Buildable 2566
Build 2814: arc lint + arc unit

Event Timeline

dereckson created this revision.
dereckson edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Apr 30 2018, 22:35
This revision was automatically updated to reflect the committed changes.