getFeed risolve gli URL relativi (fix 'Protocol "" is unknown' sui link di categoria)
This commit is contained in:
+4
-2
@@ -71,8 +71,10 @@ QNetworkReply *ApiClient::startGet(const QUrl &url)
|
||||
|
||||
void ApiClient::getFeed(const QString &url)
|
||||
{
|
||||
qDebug() << "getFeed request:" << url;
|
||||
QNetworkReply *reply = startGet(QUrl(url));
|
||||
// i link dei feed OPDS sono spesso relativi (/opds/new): risolvi contro il server
|
||||
const QString resolved = resolveUrl(url);
|
||||
qDebug() << "getFeed request:" << resolved;
|
||||
QNetworkReply *reply = startGet(QUrl(resolved));
|
||||
connect(reply, &QNetworkReply::finished, this, [this, reply]() {
|
||||
reply->deleteLater();
|
||||
const int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||
|
||||
Reference in New Issue
Block a user