OSDN Git Service

kdirshare: use the new KHTTP::setServerID() method
authorIvailo Monev <xakepa10@gmail.com>
Sun, 25 Dec 2022 16:35:07 +0000 (18:35 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 25 Dec 2022 16:35:07 +0000 (18:35 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kdirshare/kded/kdirshareimpl.cpp

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