Commit ffccc824 authored by fred's avatar fred
Browse files

updated libqxt from master upstream to fixe some bugs

parent 5c57b1b5
Subproject commit b7041506e34b3d723f677c82dc8147587f17e6d6
Subproject commit db1ab65fd4daa58d22ce83c1de6cc387ed9b7429
......@@ -2047,7 +2047,6 @@ void Http_admin::staticfile(QxtWebRequestEvent* event, QString directory, QStrin
if (!static_file->open(QIODevice::ReadOnly))
{
response = "FILE NOT FOUND";
page = new QxtWebPageEvent(event->sessionID,
event->requestID,
response.toUtf8());
......@@ -2060,10 +2059,10 @@ void Http_admin::staticfile(QxtWebRequestEvent* event, QString directory, QStrin
qDebug() << "EXTENSION : " << ext;
page = new QxtWebPageEvent(event->sessionID,
event->requestID,
static_file);
event->requestID);
page->chunked = true;
page->streaming = false;
page->dataSource = static_file;
if (ext == "js")
page->contentType="text/javascript";
......@@ -2071,6 +2070,9 @@ void Http_admin::staticfile(QxtWebRequestEvent* event, QString directory, QStrin
page->contentType="text/css";
else if (ext == "png")
page->contentType="image/png";
else
page->contentType="text/html";
}
postEvent(page);
......
......@@ -77,15 +77,15 @@ void Service::Http_admin_init()
{
int port;
m_ncs_params.admin_port == 0 ? port = 2501 : port = m_ncs_params.admin_port;
m_wadmin_session.setPort(port);
m_wadmin_session.setConnector(&m_wadmin_connector);
m_wadmin_session.setAutoCreateSession(false);
m_admin_session.setPort(port);
m_admin_session.setConnector(&m_admin_connector);
m_admin_session.setAutoCreateSession(false);
//Http_api s1(&session);
m_http_admin = new Http_admin(m_ncs_params.base_directory, &m_wadmin_session);
m_wadmin_session.setStaticContentService(m_http_admin);
m_wadmin_session.setSessionCookieName("nodecast");
m_wadmin_session.start();
m_http_admin = new Http_admin(m_ncs_params.base_directory, &m_admin_session);
m_admin_session.setStaticContentService(m_http_admin);
m_admin_session.setSessionCookieName("nodecast");
m_admin_session.start();
}
......
......@@ -62,12 +62,12 @@ private:
QxtHttpServerConnector m_tracker_connector;
QxtHttpServerConnector m_nodetrack_connector;
QxtHttpServerConnector m_wadmin_connector;
QxtHttpServerConnector m_admin_connector;
QxtHttpServerConnector m_api_connector;
QxtHttpSessionManager m_tracker_session;
QxtHttpSessionManager m_nodetrack_session;
QxtHttpSessionManager m_wadmin_session;
QxtHttpSessionManager m_admin_session;
QxtHttpSessionManager m_api_session;
Tracker *m_tracker;
......
Supports Markdown
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