Page MenuHomePhabricator

[services][feature-flags] Add hello world http server

Authored by tomek on Feb 23 2023, 8:38 AM.
Referenced Files
F2321956: D6860.id23170.diff
Tue, Jul 23, 7:07 AM
Tue, Jul 23, 6:40 AM
Unknown Object (File)
Tue, Jul 16, 5:18 PM
Unknown Object (File)
Sat, Jul 13, 3:18 PM
Unknown Object (File)
Tue, Jul 9, 10:12 PM
Unknown Object (File)
Tue, Jul 9, 8:35 PM
Unknown Object (File)
Tue, Jul 9, 4:53 PM
Unknown Object (File)
Fri, Jul 5, 7:10 PM



Just a hello world http server. There are a couple of interesting servers available in Rust, but I've chosen this because it is relatively high level, performant, and easily integrates with https.

Depends on D6859

Test Plan

Send GET to / and check if response is returned. Checked if both and [::1] work.

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

tomek requested review of this revision.Feb 23 2023, 8:54 AM
bartek added inline comments.
19 ↗(On Diff #23014)
This revision is now accepted and ready to land.Feb 24 2023, 4:22 AM
19 ↗(On Diff #23014)

Good question! According to the docs you mentioned

When addr includes a hostname, it is possible for this method to bind to both the IPv4 and IPv6 addresses that result from a DNS lookup.

So using localhost will bind to both addresses.
On the other hand

Note that, if a DNS lookup is required, resolving hostnames is a blocking operation.

Which should be quick for localhost, but maybe it is better to use v4 and v6 addresses explicitly.