Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


On Fri, 22 Mar 2019 at 18:12:33 +0100, William Gathoye wrote:
On 3/22/19 3:55 PM, Guilhem Moulin wrote:
Assuming a point in the future where 6.1.5, 6.2.1, and testing/6.2.2 are
no longer served by the mirror network, but stable/6.2.2 still is:

 curl -sw"%{http_code} %{redirect_url}\\n" \
     -o/dev/null 
https://download.documentfoundation.org/libreoffice/stable/6.2.2/win/x86/LibreOffice_6.2.2_Win_x86.msi
 \
[...]
 302 
https://downloadarchive.documentfoundation.org/libreoffice/old/6.2.2.2/win/x86/LibreOffice_6.2.2.2_Win_x86.msi

Ok so the redirection seems to be transparent then? The
download.documentfoundation.org links won't change and everything (the
302) will be handled server-side.

As the command output suggests, yes.  Or at least that's what I propose,
assuming releng accept to maintain that map.

This was brought up during the Dec 2018 infra call, and rejected.  See
the minutes for the discussion.

From my understanding, the reason hasn't be provided [1] but Cloph
only said this is already available if we do a request against the
check server (update.libreoffice.org) using a fake user agent.

Depends what “this” refers to.  There is no dictionary mapping
‘fresh’/‘still’ to download urls, let alone a 3XY redirect.  But if you
provide your build and a more recent version is available for that
flavor, you get some information about that update, incl. its build ID
and version number

I haven't been able to verify this assumption with the following command:

curl -A "some random user agent" -L http://update.libreoffice.org

Fake doesn't mean you can chose whatever you want :-P  But fair enough
the minutes don't mention the right User-Agent header value.  You need
to perform the queries made by your LibreOffice program, for instance

    GET /check.php HTTP/2
    Host: update.libreoffice.org
    User-Agent: LibreOffice 6.0.7.3 (dc89aa7a9eabfd848af146d5086077aeed2ae4a5; Windows; x86; )

Then select with XPATH ‘/inst:description/inst:version’ to retrieve the
version number to update to.  Or with a one-liner:

    curl -sSA "LibreOffice 6.0.7.3 (dc89aa7a9eabfd848af146d5086077aeed2ae4a5; Windows; x86; )" \
        https://update.libreoffice.org/check.php | xmlstarlet sel -T -t -v 
'/inst:description/inst:version'

(though you'll want to ensure that the output has a valid XML
description).  There is also an update URL (XPATH ‘/inst:description/inst:update/@src’)
but I suppose that's not what you want, because that (intentionally) links to
https://www.libreoffice.org/download not https://download.documentfoundation.org .

-- 
Guilhem.

-- 
To unsubscribe e-mail to: website+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/website/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.