From 31897eaa7de865d41b46f7158c70f94debe1ec66 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Tue, 20 Apr 2021 16:26:07 +0200 Subject: Codechange: split ParseConnectionString into two functions One also looks for a company, the other doesn't. There were more uses of the latter than the first, leaving very weird code all over the place. --- src/network/core/tcp_http.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/network/core') diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp index be5a2c39a..d88ea711d 100644 --- a/src/network/core/tcp_http.cpp +++ b/src/network/core/tcp_http.cpp @@ -203,10 +203,8 @@ int NetworkHTTPSocketHandler::HandleHeader() *url = '\0'; /* Fetch the hostname, and possible port number. */ - const char *company = nullptr; const char *port = nullptr; - ParseConnectionString(&company, &port, hname); - if (company != nullptr) return_error("[tcp/http] invalid hostname"); + ParseConnectionString(&port, hname); NetworkAddress address(hname, port == nullptr ? 80 : atoi(port)); -- cgit v1.2.3-54-g00ecf