Files
core/desktop/source
Mike Kaganski b729b0bb67 tdf#159775: restore filename from URL on redirection
Some github release URLs, like

https://github.com/hanya/MRI/releases/download/v1.3.5/MRI-1.3.5.oxt

get redirected to something like

https://release-assets.githubusercontent.com/github-production-release-asset/3265966/eff2c80e-138d-4b06-8139-e433f4672379?...

of which, 'eff2c80e-138d-4b06-8139-e433f4672379' is used as
ucbhelper::Content's title. That is used to construct local
filename in UpdateInstallDialog::Thread::download. Later in
PackageRegistryImpl::bindPackage, the extension of the file
will be used to detect the mediatype; if failed, operation
will abort.

Detect this situation, and restore the filename from URL.

Change-Id: Ib95189ff35e07fd01c95f87827c6f620ebfe2fe1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188114
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-07-21 18:12:33 +02:00
..