kdirshare: use the new KHTTP::setServerID() method

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-12-25 18:35:07 +02:00
parent 0e81d497dd
commit c61891926c

View file

@ -150,6 +150,7 @@ KDirShareImpl::KDirShareImpl(QObject *parent)
m_portmin(s_kdirshareportmin), m_portmin(s_kdirshareportmin),
m_portmax(s_kdirshareportmax) m_portmax(s_kdirshareportmax)
{ {
setServerID(QString::fromLatin1("KDirShare"));
} }
KDirShareImpl::~KDirShareImpl() KDirShareImpl::~KDirShareImpl()
@ -223,9 +224,6 @@ void KDirShareImpl::respond(const QByteArray &url, QByteArray *outdata,
QString *outfilepath) QString *outfilepath)
{ {
// qDebug() << Q_FUNC_INFO << url; // qDebug() << Q_FUNC_INFO << url;
outheaders->insert("Server", "KDirShare");
const QString normalizedpath = QUrl::fromPercentEncoding(url); const QString normalizedpath = QUrl::fromPercentEncoding(url);
QFileInfo pathinfo(m_directory + QLatin1Char('/') + normalizedpath); QFileInfo pathinfo(m_directory + QLatin1Char('/') + normalizedpath);
// qDebug() << Q_FUNC_INFO << normalizedpath << pathinfo.filePath(); // qDebug() << Q_FUNC_INFO << normalizedpath << pathinfo.filePath();