MCPcopy Create free account
hub / github.com/apache/mesos / defaultPort

Function defaultPort

3rdparty/libprocess/src/http.cpp:219–229  ·  view source on GitHub ↗

Returns the default port for a given URL scheme.

Source from the content-addressed store, hash-verified

217
218// Returns the default port for a given URL scheme.
219static Option<uint16_t> defaultPort(const string& scheme)
220{
221 // TODO(tnachen): Make default port a lookup table.
222 if (scheme == "http") {
223 return 80;
224 } else if (scheme == "https") {
225 return 443;
226 }
227
228 return None();
229}
230
231
232Try<URL> URL::parse(const string& urlString)

Callers 1

parseMethod · 0.85

Calls 1

NoneClass · 0.85

Tested by

no test coverage detected