mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-26 15:43:49 +03:00
fix(browser): handle blob URL scheme for Qt older than 5.12
Add a special check for blob: resources in URL request interceptor. Fixes #1376.
This commit is contained in:
parent
dcf6016bb8
commit
9d376c25f7
@ -41,6 +41,13 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
|
||||
const QUrl requestUrl = info.requestUrl();
|
||||
const QUrl firstPartyUrl = info.firstPartyUrl();
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
||||
// Workaround for https://github.com/zealdocs/zeal/issues/1376. Fixed in Qt 5.12.0.
|
||||
if (!firstPartyUrl.isValid() && requestUrl.scheme() == QLatin1String("blob")) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Block invalid requests.
|
||||
if (!requestUrl.isValid() || !firstPartyUrl.isValid()) {
|
||||
blockRequest(info);
|
||||
|
Loading…
Reference in New Issue
Block a user