2021-08-28 02:35:23 +00:00
|
|
|
#include "gico_schemahandler.h"
|
|
|
|
|
|
|
|
GicoSchemeHandler::GicoSchemeHandler(ArticleNetworkAccessManager& articleNetMgr):mManager(articleNetMgr){
|
|
|
|
|
|
|
|
}
|
|
|
|
void GicoSchemeHandler::requestStarted(QWebEngineUrlRequestJob *requestJob)
|
|
|
|
{
|
|
|
|
QUrl url = requestJob->requestUrl();
|
|
|
|
|
|
|
|
QNetworkRequest request;
|
|
|
|
request.setUrl( url );
|
|
|
|
|
|
|
|
QNetworkReply* reply=this->mManager.createRequest(QNetworkAccessManager::GetOperation,request,NULL);
|
|
|
|
|
2021-12-15 15:43:03 +00:00
|
|
|
QMimeType mineType=db.mimeTypeForUrl (url);
|
|
|
|
QString contentType=mineType.name ();
|
2021-08-28 02:35:23 +00:00
|
|
|
// Reply segment
|
2021-09-21 10:22:08 +00:00
|
|
|
requestJob->reply(contentType.toLatin1(), reply);
|
2021-08-28 02:35:23 +00:00
|
|
|
}
|