]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/interceptors/UrlRequestInterceptor.cpp
Flesh out request detail dialog.
[PrivacyBrowserPC.git] / src / interceptors / UrlRequestInterceptor.cpp
index 3b47e7e052d41066d4d23157982940bb9e89b5d4..199abcfac9aa6c0a228ea2368a51981f25f2ad73 100644 (file)
@@ -43,12 +43,13 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &urlReques
     requestStructPointer->requestMethodString = urlRequestInfo.requestMethod();
     requestStructPointer->resourceTypeInt = urlRequestInfo.resourceType();
     requestStructPointer->urlString = urlRequestInfo.requestUrl().toString();
+    requestStructPointer->webPageUrlString = urlRequestInfo.firstPartyUrl().toString();
 
     // Check the filter lists.
-    bool requestNotHandled = globalFilterListHelperPointer->checkFilterLists(urlRequestInfo, requestStructPointer);
+    bool continueProcessing = globalFilterListHelperPointer->checkFilterLists(urlRequestInfo, requestStructPointer);
 
     // Further process the request if it hasn't already been handled.
-    if (requestNotHandled) {
+    if (continueProcessing) {
         // Handle the request according to the resource type.
         switch (urlRequestInfo.resourceType())
         {
@@ -61,6 +62,9 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &urlReques
                 // Mark the request struct as blocked.
                 requestStructPointer->dispositionInt = FilterListHelper::BLOCKED;
 
+                // Mark the ping as blocked by the default behavior.
+                requestStructPointer->filterListTitle = i18nc("Default HTTP ping blocking", "Default blocking of all HTTP ping requests.");
+
                 // Display the HTTP Ping blocked dialog.
                 emit displayHttpPingDialog(urlRequestInfo.requestUrl().toString());