BRGM / gml_application_schema_toolbox

GML Application Schema toolbox is a QGIS plugin allowing to manipulate OGC Complex Features
https://brgm.github.io/gml_application_schema_toolbox/
GNU General Public License v2.0
28 stars 18 forks source link

Allow to set a custom User Agent #67

Closed mhugo closed 6 years ago

mhugo commented 6 years ago

Allow the plugin to use a custom User Agent when making HTTP requests.

Things that need to be set:

mhugo commented 6 years ago

User-Agent set for gdal and qgis / urllib

sgrellet commented 6 years ago

Great. Which tag/string did you use ? (to anticipate our resolver configuration)

mhugo commented 6 years ago

capture d ecran de 2018-05-30 15-15-16

It's configurable in the settings

sgrellet commented 6 years ago

Nice

sgrellet commented 6 years ago

using v1.2.0-rc7 Version de Python : 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] Version de QGIS : 3.0.1-Girona Girona, a86bec25eb

Opening plugin settings, not touching anything an pressing 'OK'.

NameError: name 'httpUserAgentEdit' is not defined Traceback (most recent call last): File "C:/Users/grellets/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\gui\settings_dialog.py", line 103, in accept self.save_settings() File "C:/Users/grellets/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\gui\settings_dialog.py", line 44, in save_settings settings.setValue('http_user_agent', self.http_user_agent()) File "C:/Users/grellets/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gml_application_schema_toolbox\gui\settings_dialog.py", line 59, in http_user_agent return httpUserAgentEdit.text() NameError: name 'httpUserAgentEdit' is not defined

sgrellet commented 6 years ago

note : the User-Agent value is passed properly as it is logged by our resolver

mhugo commented 6 years ago

Fixed

sgrellet commented 6 years ago

ok under GMLAS toolbox plugin : v1.2.0 Version de Python : 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] Version de QGIS : 3.0.1-Girona Girona, a86bec25eb