Both on BDOrtho and BDTopo from IGN, I experience limitation in download by wget, that is not robust depending where deliveries are hosted by IGN: deliveries available via ftp are OK, not those via https links. Generally, I am able to download from page with firefox on my PC. Unfortunately I cannot run firefox on the server where we process the data, due to latency on X11 protocol through a proxy. So I need to use a command line tool. The option of download and then upload to the platform works for BDTopo, but for BDOrtho that represent >10Gb for one department, this is a problem.
It is harder than it ought to be.
When trying same url with http (unsecure), it redirects to https, but the configuration of server certificate and secure options seems deprecated or not supported. I did define .wgetrc for header and referee, and try to ease the secure handshake with --no-check-certificate --no-hsts. I am missing something ?
Log Ubuntu (verbose)
$ wget -nc -d -v --config ~/.wgetrc https://wxs.ign.fr/859x8t863h6a09o9o6fy4v60/telechargement/prepackage/BDTOPOV3-TOUSTHEMES-DEPARTEMENT_GPKG_PACK_222$BDTOPO_3-0_TOUSTHEMES_GPKG_LAMB93_D038_2022-06-15/file/BDTOPO_3-0_TOUSTHEMES_GPKG_LAMB93_D038_2022-06-15.7z
Setting --verbose (verbose) to 1
Setting --verbose (verbose) to 1
Setting --config (chooseconfig) to /opt/home/yves.bardout/.wgetrc
Setting --config (chooseconfig) to /opt/home/yves.bardout/.wgetrc
DEBUG output created by Wget 1.20.3 on linux-gnu.
Reading HSTS entries from /opt/home/yves.bardout/.wget-hsts
URI encoding = ‘UTF-8’
Converted file name 'BDTOPO_3-0_TOUSTHEMES_GPKG_LAMB93_D038_2022-06-15.7z' (UTF-8) -> 'BDTOPO_3-0_TOUSTHEMES_GPKG_LAMB93_D038_2022-06-15.7z' (UTF-8)
--2022-08-10 10:27:51-- https://wxs.ign.fr/859x8t863h6a09o9o..._2022-06-15.7z
Resolving wxs.ign.fr (wxs.ign.fr)... 192.134.136.10, 192.134.136.9, 192.134.136.12, ...
Caching wxs.ign.fr => 192.134.136.10 192.134.136.9 192.134.136.12 192.134.136.11
Connecting to wxs.ign.fr (wxs.ign.fr)|192.134.136.10|:443... connected.
Created socket 3.
Releasing 0x0000563176acbf10 (new refcount 1).
Initiating SSL handshake.
Handshake successful; connected socket 3 to SSL handle 0x0000563176acc0c0
certificate:
subject: CN=wxs.ign.fr
issuer: CN=R3,O=Let's Encrypt,C=US
X509 certificate successfully verified and matches host wxs.ign.fr
---request begin---
GET /859x8t863h6a09o9o6fy4v60/telechargement/prepackage/BDTOPOV3-TOUSTHEMES-DEPARTEMENT_GPKG_PACK_222-0_TOUSTHEMES_GPKG_LAMB93_D038_2022-06-15/file/BDTOPO_3-0_TOUSTHEMES_GPKG_LAMB93_D038_2022-06-15.7z HTTP/1.1
Referer: https://geoservices.ign.fr/bdortho
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: identity
Host: wxs.ign.fr
Connection: keep-alive
Accept-Language: en-us,en;q=0.5
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 403 Forbidden
date: Wed, 10 Aug 2022 08:27:52 GMT
content-type: application/xml
content-length: 144
wl-original-content-type: application/xml
access-control-allow-methods: GET, POST
access-control-max-age: 43200
access-control-allow-origin: *
---response end---
403 Forbidden
Registered socket 3 for persistent reuse.
Skipping 144 bytes of body: [<ExceptionReport><Exception exceptionCode="MissingRights">No rights for this ressource or ressource does not exist</Exception></ExceptionReport>] done.
2022-08-10 10:27:52 ERROR 403: Forbidden.
Log Windows 10
(using mobaterm shell)
wget -hsts no options => ERROR: cannot verify wxs.ign.fr's certificate, issued by `/DC=local/DC=IRT-AESE/CN=IRT-AESE-Certificats':
Unable to locally verify the issuer's authority
wget --no-check-certificate https://wxs.ign.fr/859x8t863h6a09o9o6fy4v60/telechargement/prepackage/BDTOPOV3-TOUSTHEMES-DEPARTEMENT_GPKG_PACK_222$BDTOPO_3-0_TOUSTHEMES_GPKG_LAMB93_D038_2022-06-15/file/BDTOPO_3-0_TOUSTHEMES_GPKG_LAMB93_D038_2022-06-15.7z
--2022-08-11 12:52:27-- https://wxs.ign.fr/859x8t863h6a09o9o..._2022-06-15.7z
Resolving wxs.ign.fr... 192.134.136.9, 192.134.136.11, 192.134.136.10, ...
Connecting to wxs.ign.fr|192.134.136.9|:443... connected.
WARNING: cannot verify wxs.ign.fr's certificate, issued by `/DC=local/DC=IRT-AESE/CN=IRT-AESE-Certificats':
Unable to locally verify the issuer's authority.
WARNING: no certificate subject alternative name matches
requested host name `wxs.ign.fr'.
HTTP request sent, awaiting response... 403 Forbidden
2022-08-11 12:52:27 ERROR 403: Forbidden.
Partager