<div dir="auto"><div>Hi Even,<div dir="auto"><br></div><div dir="auto">Taking the example for my own typical use case, S3, it'd be great if GDAL understood the standard s3:// prefix, rather than having to add "is this URL going to GDAL? If so convert it into the special GDAL form" lines throughout my codebase. I therefore fully support the idea of doing it for any widely used protocols.</div><div dir="auto"><br></div><div dir="auto">Kudos to rasterio for usually doing that effort for me, but I recently did have to drop down to GDAL and got tripped up again.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Daniel</div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, 27 Mar 2026, 17:08 Even Rouault via gdal-dev, <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I suspect that almost every GDAL user, even the most experienced, has <br>
made the mistake of typing "gdalinfo <a href="https://example.com/my.tif" rel="noreferrer noreferrer" target="_blank">https://example.com/my.tif</a>" instead <br>
of "gdalinfo /vsicurl/<a href="https://example.com/my.tif" rel="noreferrer noreferrer" target="_blank">https://example.com/my.tif</a>". Both commands work, <br>
but the first one triggers the HTTP pseudo-driver which downloads the <br>
entire file into memory before passing it to the GeoTIFF driver, while <br>
the second reads it in chunks.<br>
<br>
I would be inclined to modify the GDALOpen() logic with the following <br>
tweak: if the passed filename starts with "http://" or "https://", <br>
automatically prepend "/vsicurl/", unless the string has query <br>
parameters. That restriction about not having query parameters is <br>
because in most of the cases this is for dynamically generated resources <br>
that don't support range requests.<br>
<br>
For users really wanting to go through the HTTP pseudo-driver, we'd <br>
modify it to accept a "HTTP:" prefix before the URL or it would trigger <br>
if using the "-if HTTP" argument of command line utilities (or <br>
allowed_drivers = ["HTTP"] in the API)<br>
<br>
So this change wouldn't be fully backwards compatible, but I feel it <br>
would still make more people happy than unhappy.<br>
<br>
Thoughts?<br>
<br>
Even<br>
<br>
-- <br>
<a href="http://www.spatialys.com" rel="noreferrer noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div></div></div>