Using _openurl with requests stream to get content-length. Faster than head request.
The size of a metafile can be set from outside to avoid calculation. Size might already be know and/or it takes long too calculate it when the metalink document has many files (>100).
[ ] I'd like to contribute [feature X|bugfix Y|docs|something else] to PyWPS. I confirm that my contributions to PyWPS will be compatible with the PyWPS license guidelines at the time of contribution.
[x ] I have already previously agreed to the PyWPS Contributions and Licensing Guidelines
Coverage remained the same at 0.0% when pulling b96668b268ee811f959a9f0c31448a88d88378d8 on cehbrecht:metalink-optimize-size-calc into 10be4ae351adac5433813deeee8dd42553806352 on geopython:pywps-4.4.
Overview
This PR is an update of PR #581.
Changes:
_openurl
with requests stream to get content-length. Faster thanhead
request.size
of a metafile can be set from outside to avoid calculation. Size might already be know and/or it takes long too calculate it when the metalink document has many files (>100).Related Issue / Discussion
581
Additional Information
Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)