wsd: make these a const reference instead of copying for each invocation
This commit is contained in:
parent
33f0e7e893
commit
6f3fd44c03
2 changed files with 4 additions and 4 deletions
|
@ -431,8 +431,8 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, Poco::M
|
|||
|
||||
void FileServerRequestHandler::sendError(int errorCode, const Poco::Net::HTTPRequest& request,
|
||||
const std::shared_ptr<StreamSocket>& socket,
|
||||
std::string shortMessage, std::string longMessage,
|
||||
std::string extraHeader)
|
||||
const std::string& shortMessage, const std::string& longMessage,
|
||||
const std::string& extraHeader)
|
||||
{
|
||||
Poco::URI requestUri(request.getURI());
|
||||
std::string path(requestUri.getPath());
|
||||
|
|
|
@ -43,8 +43,8 @@ public:
|
|||
private:
|
||||
static std::map<std::string, std::pair<std::string, std::string>> FileHash;
|
||||
static void sendError(int errorCode, const Poco::Net::HTTPRequest& request,
|
||||
const std::shared_ptr<StreamSocket>& socket, std::string shortMessage,
|
||||
std::string longMessage, std::string extraHeader = "");
|
||||
const std::shared_ptr<StreamSocket>& socket, const std::string& shortMessage,
|
||||
const std::string& longMessage, const std::string& extraHeader = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue