Page MenuHomePhabricator

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

Authored by tomek on Thu, Feb 23, 8:38 AM.
Referenced Files
Unknown Object (File)
Thu, Mar 9, 12:22 PM
Unknown Object (File)
Thu, Mar 9, 5:36 AM
Unknown Object (File)
Wed, Mar 8, 10:58 AM
Unknown Object (File)
Wed, Mar 8, 6:56 AM
Unknown Object (File)
Wed, Mar 8, 12:26 AM
Unknown Object (File)
Fri, Mar 3, 12:10 PM
Unknown Object (File)
Fri, Feb 24, 5:46 PM
Unknown Object (File)
Fri, Feb 24, 5:46 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.Thu, Feb 23, 8:54 AM
bartek added inline comments.
19 ↗(On Diff #23014)
This revision is now accepted and ready to land.Fri, Feb 24, 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.