Re: view src
Jorge Arellano Cid <[email protected]>
| Newsgroups | gmane.comp.web.dillo.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Oct 20, 2011 at 06:41:17PM +0000, corvid wrote:
> Jorge wrote:
> > A quick trick to avoid viewing source of the "view source" page.
> > A proper solution would be appreciatted.
>
> Does that break things, or do you just dislike it?
I don't remember exactly what the problem was (man I'm getting old).
There were two issues (AFAIR):
1) avoiding "always reload" (through dpi even on Back/Fwd).
2) avoid recursive URL expansion on reload.
The current URL scheme helps with 2) and allows handling of
1) in the canonical way.
Please test the attached patch. So far I see no problem with it.
In other words: maybe I forgot to re-enable it after solving the
problem, or forgot what the problem was afterwards!
--
Cheers
Jorge.-
_______________________________________________
Dillo-dev mailing list
[email protected]
http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
vsource.diff
(text/x-diff, 1.3 KB)
diff -r 2087370c0f1b src/capi.c
--- a/src/capi.c Sun Oct 23 01:29:40 2011 +0000
+++ b/src/capi.c Tue Oct 25 08:44:40 2011 -0300
@@ -456,7 +456,7 @@ int a_Capi_open_url(DilloWeb *web, CA_Ca
if ((safe = a_Capi_dpi_verify_request(web->bw, web->url))) {
if (dStrcasecmp(scheme, "dpi") == 0) {
if (strcmp(server, "vsource") == 0) {
- /* don't reload the "view source" page */
+ /* allow "view source" reload upon user request */
} else {
/* make the other "dpi:/" prefixed urls always reload. */
a_Url_set_flags(web->url, URL_FLAGS(web->url) | URL_E2EQuery);
diff -r 2087370c0f1b src/nav.c
--- a/src/nav.c Sun Oct 23 01:29:40 2011 +0000
+++ b/src/nav.c Tue Oct 25 08:44:40 2011 -0300
@@ -482,8 +482,8 @@ static void Nav_reload_callback(void *da
if (a_Nav_stack_size(bw)) {
h_url = a_History_get_url(NAV_TOP_UIDX(bw));
if (strncmp(URL_STR(h_url), "dpi:/vsource/", 13) == 0) {
- /* disable reload for view source dpi */
- confirmed = 0;
+ /* allow reload for view source dpi */
+ confirmed = 1;
} else if (URL_FLAGS(h_url) & URL_Post) {
/* Attempt to repost data, let's confirm... */
choice = a_Dialog_choice5("Repost form data?",