I managed to have ogrinfo working by adding "Accept: application/json" header using GDAL_HTTP_HEADER_FILE.

Now the problem is I can't do that with QGIS...

--
Christophe Damour

Le 15/02/2022 à 08:46, Rahkonen Jukka (MML) a écrit :

Hi,

I wonder if there could be something in the Accept headers that orginfo is using.  Ogrinfo seems to set headers “Accept: text/plain, application/json” but GeoJSON is now officially “application/geo+json”. I do not know the hierarchy of the MIME types and if “json” should include also the subtype “geo+json”.

I made a test with ogrinfo and  --config GDAL_HTTP_HEADER_FILE my_headers.txt. After this I could see from the logs this

Accept: application/geo+json

Accept: text/plain, application/json

By https://datatracker.ietf.org/doc/html/rfc2616/ I suppose this is correct and http server should concatenate Accept headers. However, the test was not successful so maybe there is something else going wrong.

-Jukka Rahkonen-

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to