Skip to content

Avoid possible endless loops when opening URLs

Opening certain URLs creates an endless loop, with WebEnginePart and KonqRun each giving the other the responsability of handling the URL. For example, this happened with URLs whose mimetype was application/octet-stream: the part couldn't display it, so it asked the application to do so; the application couldn't open it either and, seeing an http(s) URL asked the part to handle it and so on, forever.

To avoid this kind of situation, WebEnginePart adds an entry to the metadata of the KParts::OpenUrlArgument when emitting the openUrlRequest signal from WebEnginePart::download. KonqRun checks for this entry and, if present, avoids automatically passing the URL to the part.

If the application explicitly asked WebEnginePart to handle an URL but the part finds out that it can't display it, it now saves it. This could happen if the user has somehow associated WebEnginePart to a mimetype it can't display.

Merge request reports