Skip to content

regression on gdalinfo on remote COG (issue with nginx "autoindex_exact_size off") #14707

@landryb

Description

@landryb

What is the bug?

There seems to be a regression with reading COGs directory count, experienced on:

  • 3.13.0 / tiff 4.7.1 / OpenBSD 7.9 or FreeBSD 15
  • 3.13.1rc1 / OpenBSD 7.9-current
  • 3.12.4 / tiff / 4.7.1 / fedora 44 (tested by @lbartoletti)

works fine:

  • 3.5.2 / FreeBSD
  • 3.11.4 / tiff 4.7.1 / OpenBSD 7.8
  • 3.10.3 / debian 13

gdalinfo /vsicurl/https://cogeo.craig.fr/ortho/ign/orthohr20_38_2024.cog.tif exhibits it, and shows:

ERROR 1: TIFFFetchDirectory:/vsicurl/https://cogeo.craig.fr/ortho/ign/orthohr20_38_2024.cog.tif: Can not read TIFF directory count
ERROR 1: TIFFReadDirectory:Failed to read directory at offset 988
ERROR 1: TIFFFetchDirectory:/vsicurl/https://cogeo.craig.fr/ortho/ign/orthohr20_38_2024.cog.tif: Can not read TIFF directory count
ERROR 1: TIFFReadDirectory:Failed to read directory at offset 234

that prevents loading the COG in QGIS.

i have plenty of other COGs at the same place, generated with 3.5.2. and they do pass validation with 3.10.3 on debian 13, e.g.:

$python3 /usr/share/doc/python3-gdal/examples/validate_cloud_optimized_geotiff.py /data/cache/cog/orthohr20_38_2024.cog.tif
/data/cache/cog/orthohr20_38_2024.cog.tif is a valid cloud optimized GeoTIFF
The size of all IFD headers is 55708330 bytes

Steps to reproduce the issue

gdalinfo /vsicurl/url/to/cog

Versions and provenance

3.13/openbsd, 3.12/fedora...

Additional context

No response

Metadata

Metadata

Assignees

Labels

not for AI loversSee https://gdal.org/en/stable/community/ai_tool_policy.html

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions