Remove trailing whitespace (#3668)

This commit is contained in:
John Vandenberg
2022-07-07 17:18:20 +08:00
committed by GitHub
parent 0af9524e16
commit 0e6e16645c
1330 changed files with 23570 additions and 23571 deletions

View File

@@ -72,7 +72,7 @@ void handleDataSSLrequest(DialogSocket& ds, bool ssl, Session::Ptr& sslSession)
ds = sss;
}
}
catch (Exception& exc)
catch (Exception& exc)
{
std::cout << exc.displayText() << std::endl;
}

View File

@@ -37,10 +37,10 @@ public:
Poco::UInt16 port() const;
/// Returns the port the echo server is
/// listening on.
void run();
/// Does the work.
const std::string& lastCommand() const;
/// Returns the last command received by the server.
@@ -53,22 +53,22 @@ public:
const std::vector<std::string>& lastCommands() const;
/// Returns the last command received by the server.
void addResponse(const std::string& response);
/// Sets the next response returned by the server.
void clearCommands();
/// Clears all commands.
void clearResponses();
/// Clears all responses.
void log(bool flag);
/// Enables or disables logging to stdout.
Poco::Net::Session::Ptr getSslSession();
void setSslSession(Poco::Net::Session::Ptr cSession);
private:
Poco::Net::ServerSocket _socket;
Poco::Thread _thread;

View File

@@ -40,7 +40,7 @@ public:
CppUnitPocoExceptionText (exc);
return runner.run(_targs, exc) ? 0 : 1;
}
void setup(int argc, char** argv)
{
init(1, argv);
@@ -54,7 +54,7 @@ protected:
loadConfiguration(); // load default configuration files, if present
Poco::Util::Application::initialize(self);
}
private:
std::vector<std::string> _targs;
};

View File

@@ -112,7 +112,7 @@ void HTTPSTestServer::run()
bool HTTPSTestServer::requestComplete() const
{
return ((_lastRequest.substr(0, 3) == "GET" || _lastRequest.substr(0, 4) == "HEAD") &&
return ((_lastRequest.substr(0, 3) == "GET" || _lastRequest.substr(0, 4) == "HEAD") &&
(_lastRequest.find("\r\n\r\n") != std::string::npos)) ||
(_lastRequest.find("\r\n0\r\n") != std::string::npos);
}
@@ -128,7 +128,7 @@ std::string HTTPSTestServer::handleRequest() const
std::string body(SMALL_BODY);
response.append("HTTP/1.0 200 OK\r\n");
response.append("Content-Type: text/plain\r\n");
response.append("Content-Length: ");
response.append("Content-Length: ");
response.append(NumberFormatter::format((int) body.size()));
response.append("\r\n");
response.append("Connection: Close\r\n");
@@ -143,7 +143,7 @@ std::string HTTPSTestServer::handleRequest() const
std::string body(LARGE_BODY);
response.append("HTTP/1.0 200 OK\r\n");
response.append("Content-Type: text/plain\r\n");
response.append("Content-Length: ");
response.append("Content-Length: ");
response.append(NumberFormatter::format((int) body.size()));
response.append("\r\n");
response.append("Connection: Close\r\n");
@@ -171,7 +171,7 @@ std::string HTTPSTestServer::handleRequest() const
response.append("Content-Type: text/plain\r\n");
if (_lastRequest.find("Content-Length") != std::string::npos)
{
response.append("Content-Length: ");
response.append("Content-Length: ");
response.append(NumberFormatter::format((int) body.size()));
response.append("\r\n");
}
@@ -192,13 +192,13 @@ std::string HTTPSTestServer::handleRequest() const
response.append("HTTP/1.1 200 OK\r\n");
response.append("Connection: keep-alive\r\n");
response.append("Content-Type: text/plain\r\n");
response.append("Content-Length: ");
response.append("Content-Length: ");
response.append(NumberFormatter::format((int) body.size()));
response.append("\r\n\r\n");
response.append("HTTP/1.1 200 OK\r\n");
response.append("Connection: Keep-Alive\r\n");
response.append("Content-Type: text/plain\r\n");
response.append("Content-Length: ");
response.append("Content-Length: ");
response.append(NumberFormatter::format((int) body.size()));
response.append("\r\n\r\n");
response.append(body);
@@ -214,7 +214,7 @@ std::string HTTPSTestServer::handleRequest() const
response.append("HTTP/1.1 200 OK\r\n");
response.append("Connection: close\r\n");
response.append("Content-Type: text/plain\r\n");
response.append("Content-Length: ");
response.append("Content-Length: ");
response.append(NumberFormatter::format((int) body.size()));
response.append("\r\n\r\n");
}
@@ -235,7 +235,7 @@ std::string HTTPSTestServer::handleRequest() const
std::string body(SMALL_BODY);
response.append("HTTP/1.0 200 OK\r\n");
response.append("Content-Type: text/plain\r\n");
response.append("Content-Length: ");
response.append("Content-Length: ");
response.append(NumberFormatter::format((int) body.size()));
response.append("\r\n");
response.append("Connection: Close\r\n");

View File

@@ -36,15 +36,15 @@ public:
Poco::UInt16 port() const;
/// Returns the port the echo server is
/// listening on.
void run();
/// Does the work.
const std::string& lastRequest() const;
/// Returns the last request.
static const std::string SMALL_BODY;
static const std::string LARGE_BODY;
static const std::string LARGE_BODY;
protected:
bool requestComplete() const;

View File

@@ -39,14 +39,14 @@ public:
runner.addTest("NetSSLTestSuite", NetSSLTestSuite::suite());
return runner.run(_targs) ? 0 : 1;
}
void setup(const std::vector<std::string>& args)
{
char* argv[] =
{
const_cast<char*>(args[0].c_str())
};
init(1, argv);
for (std::size_t i = 0; i < args.size(); ++i)
_targs.push_back(args[i]);
@@ -58,7 +58,7 @@ protected:
loadConfiguration(); // load default configuration files, if present
Poco::Util::Application::initialize(self);
}
private:
std::vector<std::string> _targs;
};

View File

@@ -39,14 +39,14 @@ public:
runner.run();
return 0;
}
protected:
void initialize(Poco::Util::Application& self)
{
loadConfiguration(); // load default configuration files, if present
Poco::Util::Application::initialize(self);
}
private:
std::vector<std::string> _targs;
};