mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Make CivetAuthHandler::authorize function pure virtual
This commit is contained in:
@@ -119,7 +119,7 @@ class CIVETWEB_API CivetAuthHandler
|
|||||||
* @param conn - the connection information
|
* @param conn - the connection information
|
||||||
* @returns true if authorization succeeded, false otherwise
|
* @returns true if authorization succeeded, false otherwise
|
||||||
*/
|
*/
|
||||||
virtual bool authorize(CivetServer *server, struct mg_connection *conn);
|
virtual bool authorize(CivetServer *server, struct mg_connection *conn) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -105,14 +105,6 @@ CivetWebSocketHandler::handleClose(CivetServer *server,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
CivetAuthHandler::authorize(CivetServer *server, struct mg_connection *conn)
|
|
||||||
{
|
|
||||||
UNUSED_PARAMETER(server);
|
|
||||||
UNUSED_PARAMETER(conn);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
CivetServer::requestHandler(struct mg_connection *conn, void *cbdata)
|
CivetServer::requestHandler(struct mg_connection *conn, void *cbdata)
|
||||||
{
|
{
|
||||||
@@ -296,7 +288,7 @@ CivetServer::CivetServer(std::vector<std::string> options,
|
|||||||
callbacks.connection_close = closeHandler;
|
callbacks.connection_close = closeHandler;
|
||||||
|
|
||||||
std::vector<const char *> pointers(options.size());
|
std::vector<const char *> pointers(options.size());
|
||||||
for (int i = 0; i < options.size(); i++) {
|
for (size_t i = 0; i < options.size(); i++) {
|
||||||
pointers.push_back(options[i].c_str());
|
pointers.push_back(options[i].c_str());
|
||||||
}
|
}
|
||||||
pointers.push_back(0);
|
pointers.push_back(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user