Re: Save link as... silent failure on gopher protocol

Diego <[email protected]> Thu, 9 Jul 2026 01:37:14 +0200
Newsgroups gmane.comp.web.dillo.devel
Message-ID <CAD0qOrTydvRw8+Hbzv_JYtgA6mrWJrH3Co_REfssB8nNfWHmzQ@mail.gmail.com>
--===============1003137411225151669==
Content-Type: multipart/alternative; boundary="0000000000007a8f3c065621fd49"

--0000000000007a8f3c065621fd49
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

=C2=BFCan i have some feedback? =C2=BFDo the patchs work for you? =C2=BFdo =
it seem a
practical idea? =C2=BFetc?

cheers!
Diego.


El vie, 3 jul 2026 a las 14:17, Diego (<[email protected]>) escribi=
=C3=B3:

> Hello, I'm sending two patches with an idea to solve this problem.
> It's a proof of concept that I'm offering to develop and complete,
> although I have very little free time.
>
> The first patch works with the latest dillo release (3.3.0) but also work=
s
> with the current repository.
> It implements changes in dillo, download.dpi, and the file and data DPIs
> as examples.
> The second patch works with the latest gopher.dpi repository.
>
> The main idea is that the DPIs that handle protocols save the URL and
> write the file themselves, coordinating with download.dpi and dillo.
>
> To do this, they implement a new DPI command: `save_url`
> d_cmd =3D a_Dpip_build_cmd("cmd=3D%s url=3D%s destination=3D%s", "save_ur=
l", url,
> dl_dest);
>
> Dillo initiates a download, sending it to download.dpi as before. If it's
> HTTP* or FTP*, it downloads directly as it does now. Otherwise, it will
> send a `save_url` command to Dillo to coordinate. This allows Dillo to
> notify the user, verify the security of the change, etc.Currently, Dillo
> only checks if there's a DPI that handles the requested protocol.
>
> (A new function (`a_Dpiapi_is_service_handled(server_str)`) queries `dpid=
`
> without executing the DPI. No code is modified in `dpid`. Modifying `dpid=
`
> or executing the DPI would allow querying the capabilities of the DPIs, b=
ut
> it doesn't seem necessary.)
>
> - If a DPI is present, it sends the `save_url` command to the DPI that
> coordinates with `download.dpi` via a secondary channel so that downloads
> can continue even if all Dillo windows are closed.
>
> - If the protocol isn't handled, it notifies download.dpi through the
> secondary channel (this reduces the amount of code).
>
> The next step would be to implement `save_url` in other protocol DPIs.
>
> A possible change to download.dpi once all is done is to leave
> download.dpi it as just a GUI for DPIs and extract the code to download
> HTTP to a DPI. (There's already ftp.dpi)
>
> One last thing: can you recommend a simple Git manual?
>
>
> Saludos
> Diego.
>
> El lun, 25 may 2026 a las 21:23, Rodrigo Arias (<[email protected]>)
> escribi=C3=B3:
>
>> Hi,
>>
>> On Mon, May 25, 2026 at 09:25:58AM -0700, Ben Collver wrote:
>> >Good day,
>> >
>> >I am using dillo 3.3.0 on Slackware64 15.0.
>> >
>> >If I open a gopher directory, right-click on an item, and click
>> >Save link as..., this opens a file save dialog.  If i click OK, it
>> >dismisses the dialog.  I expected it to save something, but it
>> >creates no new files.
>> >
>> >Gopher URI:  gopher://gopher.pglaf.org/1/4/0/2/8/40282/
>> >Top item:    40282-0
>> >
>> >I found the following workaround:
>> >
>> >* Left click 40282-0
>> >* Click Save button in browser toolbar
>> >
>> >This creates a new file as expected.
>>
>> Yes, this is a known limitation of the downloads in Dillo. Using the
>> "Save link as" to fetch a new resource will use wget under the hood,
>> which only allows http(s). You can see the message in the console:
>>
>> > UIcmd_save: /tmp/40282-0.txt
>> > ** WARNING **: Ignoring download request for
>> > 'gopher://gopher.pglaf.org/0/4/0/2/8/40282/40282-0.txt': not in cache
>> > and not downloadable.
>>
>> Browsing to the target file makes the gopher plugin fetch the file and
>> place it in the Dillo cache (you can see it in about:cache). Then saving
>> the current page (or going back and clicking the "Save link as" entry)
>> works because it fetches it from the cache.
>>
>> It is planned to solve this some time in the future, but involves
>> complex changes. In the meanwhile, you can use this workaround.
>>
>> Best,
>> Rodrigo.
>> _______________________________________________
>> Dillo-dev mailing list -- dillo-dev-lx9mn2B4QYRWk0Htik3J/[email protected]
>> To unsubscribe send an email to dillo-dev-leave-lx9mn2B4QYRWk0Htik3J/[email protected]
>>
>

--0000000000007a8f3c065621fd49
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div>=C2=BFCan i have some feedback? =C2=
=BFDo the patchs work for you? =C2=BFdo it seem a practical idea? =C2=BFetc=
?<br></div></div><div><br></div><div>cheers!</div><div>Diego.<br></div><div=
><br></div></div><br><div class=3D"gmail_quote gmail_quote_container"><div =
dir=3D"ltr" class=3D"gmail_attr">El vie, 3 jul 2026 a las 14:17, Diego (&lt=
;<a href=3D"mailto:[email protected]">[email protected]</a>&g=
t;) escribi=C3=B3:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e=
x"><div dir=3D"ltr">Hello, I&#39;m sending two patches with an idea to solv=
e this problem.<br>It&#39;s a proof of concept that I&#39;m offering to dev=
elop and complete, although I have very little free time.<br><br>The first =
patch works with the latest dillo release (3.3.0) but also works with the c=
urrent repository.<br>It implements changes in dillo, download.dpi, and the=
 file and data DPIs as examples.<br>The second patch works with the latest =
gopher.dpi repository.<br><br>The main idea is that the DPIs that handle pr=
otocols save the URL and write the file themselves, coordinating with downl=
oad.dpi and dillo.<br><br>To do this, they implement a new DPI command: `sa=
ve_url`<br>d_cmd =3D a_Dpip_build_cmd(&quot;cmd=3D%s url=3D%s destination=
=3D%s&quot;, &quot;save_url&quot;, url, dl_dest);<br><br><div>Dillo initiat=
es a download, sending it to download.dpi as before. If it&#39;s HTTP* or F=
TP*, it downloads directly as it does now. Otherwise, it will send a `save_=
url` command to Dillo to coordinate. This allows Dillo to notify the user, =
verify the security of the change, etc.Currently, Dillo only checks if ther=
e&#39;s a DPI that handles the requested protocol.</div><div><br></div>(A n=
ew function (`a_Dpiapi_is_service_handled(server_str)`) queries `dpid` with=
out executing the DPI. No code is modified in `dpid`. Modifying `dpid` or e=
xecuting the DPI would allow querying the capabilities of the DPIs, but it =
doesn&#39;t seem necessary.)<br><br>- If a DPI is present, it sends the `sa=
ve_url` command to the DPI that coordinates with `download.dpi` via a secon=
dary channel so that downloads can continue even if all Dillo windows are c=
losed.<br><br>- If the protocol isn&#39;t handled, it notifies download.dpi=
 through the secondary channel (this reduces the amount of code).<br><br>Th=
e next step would be to implement `save_url` in other protocol DPIs.<br><br=
>A possible change to download.dpi once all is done is to leave download.dp=
i it as just a GUI for DPIs and extract the code to download HTTP to a DPI.=
 (There&#39;s already ftp.dpi)<br><br><div>One last thing: can you recommen=
d a simple Git manual?</div><div><br></div><div><br></div><div>Saludos</div=
><div>Diego.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" cla=
ss=3D"gmail_attr">El lun, 25 may 2026 a las 21:23, Rodrigo Arias (&lt;<a hr=
ef=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g=
t;) escribi=C3=B3:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e=
x">Hi,<br>
<br>
On Mon, May 25, 2026 at 09:25:58AM -0700, Ben Collver wrote:<br>
&gt;Good day,<br>
&gt;<br>
&gt;I am using dillo 3.3.0 on Slackware64 15.0.<br>
&gt;<br>
&gt;If I open a gopher directory, right-click on an item, and click<br>
&gt;Save link as..., this opens a file save dialog.=C2=A0 If i click OK, it=
<br>
&gt;dismisses the dialog.=C2=A0 I expected it to save something, but it<br>
&gt;creates no new files.<br>
&gt;<br>
&gt;Gopher URI:=C2=A0 gopher://<a href=3D"http://gopher.pglaf.org/1/4/0/2/8=
/40282/" rel=3D"noreferrer" target=3D"_blank">gopher.pglaf.org/1/4/0/2/8/40=
282/</a><br>
&gt;Top item:=C2=A0 =C2=A0 40282-0<br>
&gt;<br>
&gt;I found the following workaround:<br>
&gt;<br>
&gt;* Left click 40282-0<br>
&gt;* Click Save button in browser toolbar<br>
&gt;<br>
&gt;This creates a new file as expected.<br>
<br>
Yes, this is a known limitation of the downloads in Dillo. Using the <br>
&quot;Save link as&quot; to fetch a new resource will use wget under the ho=
od, <br>
which only allows http(s). You can see the message in the console:<br>
<br>
&gt; UIcmd_save: /tmp/40282-0.txt<br>
&gt; ** WARNING **: Ignoring download request for <br>
&gt; &#39;gopher://<a href=3D"http://gopher.pglaf.org/0/4/0/2/8/40282/40282=
-0.txt" rel=3D"noreferrer" target=3D"_blank">gopher.pglaf.org/0/4/0/2/8/402=
82/40282-0.txt</a>&#39;: not in cache <br>
&gt; and not downloadable.<br>
<br>
Browsing to the target file makes the gopher plugin fetch the file and <br>
place it in the Dillo cache (you can see it in about:cache). Then saving <b=
r>
the current page (or going back and clicking the &quot;Save link as&quot; e=
ntry) <br>
works because it fetches it from the cache.<br>
<br>
It is planned to solve this some time in the future, but involves <br>
complex changes. In the meanwhile, you can use this workaround.<br>
<br>
Best,<br>
Rodrigo.<br>
_______________________________________________<br>
Dillo-dev mailing list -- <a href=3D"mailto:dillo-dev-lx9mn2B4QYRWk0Htik3J/[email protected]" target=
=3D"_blank">dillo-dev-lx9mn2B4QYRWk0Htik3J/[email protected]</a><br>
To unsubscribe send an email to <a href=3D"mailto:dillo-dev-leave@mailman3.=
com" target=3D"_blank">dillo-dev-leave-lx9mn2B4QYRWk0Htik3J/[email protected]</a><br>
</blockquote></div>
</blockquote></div>

--0000000000007a8f3c065621fd49--

--===============1003137411225151669==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Dillo-dev mailing list -- dillo-dev-lx9mn2B4QYRWk0Htik3J/[email protected]
To unsubscribe send an email to dillo-dev-leave-lx9mn2B4QYRWk0Htik3J/[email protected]

--===============1003137411225151669==--