When the metalink document is created it is checking the "file" size of a metafile item. When the metafile is representing an external URL it is using the URLHandler.
Issue: when we were calculating the size of an "URL" it was first downloading the URL and the calculating the file size. We did not recognize ... files were small before ;) This is probably the root cause for issue #571.
Now, the URLHandler and the FileHandler have their own methods to calculate "size". Avoiding unwanted downloads.
[ ] 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 4d24fb92d999391232ef25aa5568d252f33462a7 on cehbrecht:fix-metalink-size-for-url into bbca1e42b63cf9c31c40fa3e2a731a1528adb2b9 on geopython:pywps-4.4.
Overview
This PR adds a "size" checker in
URLHandler
.When the metalink document is created it is checking the "file" size of a metafile item. When the metafile is representing an external URL it is using the
URLHandler
.Issue: when we were calculating the size of an "URL" it was first downloading the URL and the calculating the file size. We did not recognize ... files were small before ;) This is probably the root cause for issue #571.
Now, the
URLHandler
and theFileHandler
have their own methods to calculate "size". Avoiding unwanted downloads.Related Issue / Discussion
571 #580
Additional Information
Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)