mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Web API: resources and static file controller updates
This commit is contained in:
parent
cf2f099c37
commit
e7dc0f9b53
@ -143,6 +143,7 @@ void StaticFileController::service(QByteArray& path, HttpResponse& response)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
qWarning("StaticFileController: File %s not found",qPrintable(file.fileName()));
|
||||||
response.setStatus(404,"not found");
|
response.setStatus(404,"not found");
|
||||||
response.write("404 not found",true);
|
response.write("404 not found",true);
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//#include <QDirIterator>
|
||||||
|
|
||||||
#include "httpdocrootsettings.h"
|
#include "httpdocrootsettings.h"
|
||||||
#include "webapirequestmapper.h"
|
#include "webapirequestmapper.h"
|
||||||
#include "SWGInstanceSummaryResponse.h"
|
#include "SWGInstanceSummaryResponse.h"
|
||||||
@ -71,6 +73,11 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// QDirIterator it(":", QDirIterator::Subdirectories);
|
||||||
|
// while (it.hasNext()) {
|
||||||
|
// qDebug() << "WebAPIRequestMapper::service: " << it.next();
|
||||||
|
// }
|
||||||
|
|
||||||
QByteArray path = "/index.html";
|
QByteArray path = "/index.html";
|
||||||
m_staticFileController->service(path, response);
|
m_staticFileController->service(path, response);
|
||||||
//response.setStatus(404,"Not found");
|
//response.setStatus(404,"Not found");
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<file>microphone.png</file>
|
<file>microphone.png</file>
|
||||||
<file>checkmark.png</file>
|
<file>checkmark.png</file>
|
||||||
<file>questionmark.png</file>
|
<file>questionmark.png</file>
|
||||||
<file>res.qrc</file>
|
|
||||||
<file>export.png</file>
|
<file>export.png</file>
|
||||||
<file>import.png</file>
|
<file>import.png</file>
|
||||||
<file>compressed.png</file>
|
<file>compressed.png</file>
|
||||||
|
Loading…
Reference in New Issue
Block a user