Commit 32f877d6 authored by Frederic Logier's avatar Frederic Logier
Browse files

added an echo api

parent 9ba5404e
...@@ -1463,8 +1463,15 @@ void Api_ftp::receive_http_payload() ...@@ -1463,8 +1463,15 @@ void Api_ftp::receive_http_payload()
data_from_zerogw = QString::fromAscii((char*)request.data(), request.size()); data_from_zerogw = QString::fromAscii((char*)request.data(), request.size());
QList <QString> uri_params = data_from_zerogw.split("/"); QList <QString> uri_params = data_from_zerogw.split("/");
qDebug() << "URI PARAMS " << uri_params[2]; if (uri_params.size() < 2)
zerogw["URI"] = uri_params[2]; {
bodyMessage = buildResponse("error", "header", "bad URI");
}
else
{
qDebug() << "URI PARAMS " << uri_params[2];
zerogw["URI"] = uri_params[2];
}
} }
break; break;
...@@ -1636,8 +1643,8 @@ void Api_echo::receive_http_payload() ...@@ -1636,8 +1643,8 @@ void Api_echo::receive_http_payload()
data_from_zerogw = QString::fromAscii((char*)request.data(), request.size()); data_from_zerogw = QString::fromAscii((char*)request.data(), request.size());
QList <QString> uri_params = data_from_zerogw.split("/"); QList <QString> uri_params = data_from_zerogw.split("/");
qDebug() << "URI PARAMS " << uri_params[2]; qDebug() << "URI PARAMS " << uri_params[1];
zerogw["URI"] = uri_params[2]; zerogw["URI"] = uri_params[1];
} }
break; break;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment