[gdal-dev] vsicurl and HTTP error 403
Even Rouault
even.rouault at spatialys.com
Wed Apr 8 15:41:18 PDT 2020
Ivan,
Experimentally, I find that this particular server doesn't like HTTP requests without a
User-Agent and, more annoying, that it doesn't like Range requests used by /vsicurl/.
But as this a gzip file, seeking into it would be a inefficient process.
So the following, defining a user agent, and using /vsicurl_streaming/ that doesn't
issue range request (but require downloading everything from the beginning when
a backward seek is needed) works
gdal_translate /vsigzip//vsicurl_streaming/https://gimms.gsfc.nasa.gov/MODIS/std/GMOD09Q1/tif/NDVI/2019/249/GMOD09Q1.A2019249.08d.latlon.x33y07.6v1.NDVI.tif.gz --config GDAL_DISABLE_READDIR_ON_OPEN EMPTY_DIR --config GDAL_HTTP_USERAGENT foo
But local downloading of the file is probably a better strategy here.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200409/0532f9a6/attachment.html>
More information about the gdal-dev
mailing list