Details
Description
When using at the same time an interceptor on both a page and its profile, the interceptor on the page isn't called if the one on the profilemade any change to the QWebEngineUrlRequestInfo.
Looking at the code, it seems it was an explicit decision
if (profileInterceptor) { profileInterceptor->interceptRequest(requestInfo); pageInterceptor = getPageInterceptor(web_contents); } if (pageInterceptor && !requestInfo.changed()) pageInterceptor->interceptRequest(requestInfo);
However, this behaviour is not documented. The documentation only mention that the profile interceptor is called before, not that the page interceptor might not be called.
This interceptor is called after any interceptors on the profile
I would argue that page interceptors should be called regardless of what the profile interceptor does.
This can be useful for instance, in situation when the profile interceptor is used to changed headers and the page interceptor is used to block/redirect requests.
With the current behaviour, changing the headers in the profile interceptor will implicitely "not block" the request.
Attachments
Issue Links
- resulted from
-
QTBUG-92932 [REG 5.12 -> 5.13] QWebEngineUrlRequestInterceptor doesn't get called for websocket connections
-
- Closed
-