MXS-1220: Add to_string to HttpRequest

Allowing requests to be converted to raw HTTP requests allows them to be
propagated to other instances of MaxScale. This should allow multiple
MaxScales to perform the same action in a coherent manner.

A simple clustering mechanism needs to be added to make MaxScale aware of
other instances.
This commit is contained in:
Markus Mäkelä
2017-06-01 11:58:55 +03:00
parent ba546fcd21
commit 19c4016e65
3 changed files with 93 additions and 0 deletions

View File

@ -105,6 +105,8 @@ int Client::process(string url, string method, const char* upload_data, size_t *
HttpRequest request(m_connection, url, method, json);
HttpResponse reply(MHD_HTTP_NOT_FOUND);
MXS_DEBUG("Request:\n%s", request.to_string().c_str());
if (url == "/")
{
// Respond to pings with 200 OK