gdal
gdal copied to clipboard
Default User-Agent
I know that there are some ways to set the value of User-Agent, for example:
$ GDAL_HTTP_USERAGENT="gdal/3.0.4" gdalinfo /vsicurl/https://...
But it would be nice if GDAL could have some default value for it (ideally with the version). This is how it is done in requests:
>>> from requests.utils import default_user_agent
>>> default_user_agent()
'python-requests/2.16.5'
At least WMS driver sets a default User-Agent, I do not know if any other driver does.
Thanks!