[Spice-devel] About the website download error

Frediano Ziglio freddy77 at gmail.com
Mon May 29 16:47:17 UTC 2023


Il giorno lun 29 mag 2023 alle ore 17:05 Victor Toso
<victortoso at redhat.com> ha scritto:
>
> Hi,
>
> On Mon, May 29, 2023 at 04:40:38PM +0100, Frediano Ziglio wrote:
> > Il giorno lun 29 mag 2023 alle ore 14:13 Victor Toso
> > <victortoso at redhat.com> ha scritto:
> > >
> > > Hi,
> > >
> > > On Sun, May 28, 2023 at 08:15:43AM +0100, Frediano Ziglio wrote:
> > > > Il giorno dom 28 mag 2023 alle ore 07:38 Frediano Ziglio
> > > > <freddy77 at gmail.com> ha scritto:
> > > > >
> > > > > Hi,
> > > > >    as a workaround click on the link with the right mouse button and click on download.
> > > > >
> > > > > It's just a server configuration that sends back the file as something to display instead of something to save.
> > > > >
> > > > > But strangely it worked correctly for me. Which browser and version are you using?
> > > > >
> > > > > Regards,
> > > > >    Frediano
> > > > >
> > > > >
> > > >
> > > > This is the results trying to download the file
> > > >
> > > > HTTP/1.1 200 OK
> > > > Date: Sun, 28 May 2023 07:08:45 GMT
> > > > Server: Apache
> > > > X-Content-Type-Options: nosniff
> > > > X-Frame-Options: SAMEORIGIN
> > > > Referrer-Policy: same-origin
> > > > Permissions-Policy: camera=(), fullscreen=(), geolocation=(),
> > > > microphone=(), payment=(), usb=()
> > > > Strict-Transport-Security: max-age=2592000; includeSubDomains
> > > > Last-Modified: Wed, 03 Aug 2022 09:06:09 GMT
> > > > ETag: "c7c200-5e5528b37f99a"
> > > > Accept-Ranges: bytes
> > > > Content-Length: 13091328
> > > > Keep-Alive: timeout=5, max=100
> > > > Connection: Keep-Alive
> > > >
> > > > It seems the mime type is missing. Now if we want to fix that we need
> > > > to change mime type configuration on the server. I found this link
> > > > https://mediatemple.net/community/products/dv/204403964/mime-types
> > >
> > > It works here as well. It is not like the browser should try to
> > > open a content as text if it doesn't know what it is.  Another
> > > alternative is to use download attribute.
> > >
> > >     https://www.w3schools.com/tags/att_a_download.asp
> > >
> > > Cheers,
> > > Victor
> >
> > Hi,
> >   I got it reproduced. I should have tried a Windows browser (Edge,
> > Windows 10), I should have known that on Windows resource extensions
> > are taken much more into consideration.
> > I tried with https://releases.pagure.org/virt-viewer/virt-viewer-x86-11.0-1.0.msi
> > which is downloaded correctly and the reply is (wget -v -nv -d XXX)
> >
> > HTTP/1.1 200 OK
> > Date: Mon, 29 May 2023 15:33:19 GMT
> > Server: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k
> > mod_wsgi/4.6.4 Python/3.6
> > X-Xss-Protection: 1; mode=block
> > X-Content-Type-Options: nosniff
> > Referrer-Policy: same-origin
> > X-Frame-Options: ALLOW-FROM https://pagure.io/
> > Upgrade: h2,h2c
> > Connection: Upgrade, Keep-Alive
> > Last-Modified: Tue, 23 Nov 2021 16:05:18 GMT
> > ETag: "50e1a00-5d176e85cad62"
> > Accept-Ranges: bytes
> > Content-Length: 84810240
> > Keep-Alive: timeout=5, max=100
> > Content-Type: application/octet-stream
> >
> > I would personally add configuration to the server, MSI files are
> > probably used by Windows users.
>
> Could you try adding the download attribute (by changing the html
> first and then trying to download the file), just to see if that
> as a workaround works?
>

I could try to reproduce the issue using another server but our HTML
pages are generated so we would need to change the generator, so we
will also need to change the system. It would take me some time, I
don't use Apache every day. Do you think it's worth doing?

> This project is the one running the infrastructure:
>     https://gitlab.com/osci/community-cage-infra-ansible
>
> I only have sftp access to folder related to SPICE. I'll follow
> up with someone to see if we can update the mime-types.
>

I saw the other email, thanks

> Cheers,
> Victor

Frediano


More information about the Spice-devel mailing list