mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 13:43:45 +03:00
WebServer: Exit when the given port is invalid
Similar to an invalid listen address, we should not fallback to the default port (8000) but instead exit with an error.
This commit is contained in:
parent
7fa3033ca8
commit
75ea1bd346
Notes:
sideshowbarker
2024-07-18 17:10:22 +09:00
@ -35,8 +35,8 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((u16)port != port) {
|
if ((u16)port != port) {
|
||||||
outln("Warning: Invalid port number: {}", port);
|
warnln("Invalid port number: {}", port);
|
||||||
port = default_port;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto real_root_path = Core::File::real_path_for(root_path);
|
auto real_root_path = Core::File::real_path_for(root_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user