[gdal-dev] Help user when /vsicurl/ reads GetFileSize=0

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Tue Jun 25 00:02:06 PDT 2019


Hi,

Have a look at https://gis.stackexchange.com/questions/326773/importing-shapefile-from-website-if-download-link-is-compressed-file/326778

I tried what happens with command

ogrinfo /vsizip/vsicurl/https://www2.census.gov/geo/tiger/GENZ2010/gz_2010_36_620_l2_500k.zip --debug on

HTTP: libcurl/7.37.1 OpenSSL/1.0.1h zlib/1.2.3
VSICURL: GetFileSize(https://www2.census.gov/geo/tiger/GENZ2010/gz_2010_36_620_l2_500k.zip)=0  response_code=200
VSICURL: Request at offset 0, after end of file
VSICURL: Request at offset 0, after end of file
VSICURL: Request at offset 0, after end of file
... repeats about 130 times
FAILURE:
Unable to open datasource `/vsizip/vsicurl/https://www2.census.gov/geo/tiger/GENZ2010/gz_2010_36_620_l2_500k.zip' with the following drivers.

Does this mean that www2.census.gov supports HEAD request but it does not send the file size header, or the value of file size is 0? Perhaps vsicurl could catch this and show a meaningful message?

-Jukka Rahkonen-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190625/a4fd3845/attachment.html>


More information about the gdal-dev mailing list