Summary: | rekonq does not show the actual page source but a changed version | ||
---|---|---|---|
Product: | [Unmaintained] rekonq | Reporter: | Tobias Leupold <tl> |
Component: | general | Assignee: | Andrea Diamantini <adjam7> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nsm.nikhil, pano_90, tl |
Priority: | NOR | ||
Version: | latest git snapshot | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 237890 |
Description
Tobias Leupold
2010-04-25 12:20:52 UTC
I can confirm this behaviour. In Konqueror with the kdewebkit KPart it shows the same source as the KHTML one, so this most likely is a rekonq specific issue. Thanks for the report The solution is always to use KRun::runUrl() to re-fetch the file from the server and display it, since WebKit apparently generates its source rather than keeping what it originally received. But this introduces issues of double loading, with regard to bandwidth. The alternative would be to set the link delegation policy for webkit to do nothing, manually load the URL using KIO and use setHtml(). Perhaps then the file could be cached. But which choice to make? I'm not a rekonq coder, but I would cache the original source file if Webkit changes the original source, as the source could have already changed when the user requests it. Just think of the DC.date header of my homepage. commit face04758de427df55b58ce47d0a39628b6b96fa Author: Andrea Diamantini <adjam7@gmail.com> Date: Tue May 25 01:38:37 2010 +0200 Show actual page source BUG:235338 diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d14f225..1b36e6d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -951,26 +951,8 @@ void MainWindow::viewPageSource() if (!currentTab()) return; - KUrl url(currentTab()->url()); - bool isTempFile = false; - if (!url.isLocalFile()) - { - KTemporaryFile sourceFile; - - /// TODO: autochoose tempfile suffix - sourceFile.setSuffix(QString(".html")); - sourceFile.setAutoRemove(false); - - if (sourceFile.open()) - { - sourceFile.write(currentTab()->page()->mainFrame()->toHtml().toUtf8()); - - url = KUrl(); - url.setPath(sourceFile.fileName()); - isTempFile = true; - } - } - KRun::runUrl(url, QL1S("text/plain"), this, isTempFile); + KUrl url = currentTab()->url(); + KRun::runUrl(url, QL1S("text/plain"), this, false); } diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index c2f1d0e..07b40ba 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -271,4 +271,3 @@ UrlSearchItem UrlResolver::privilegedItem(UrlSearchList* list) } return UrlSearchItem(); } - |