-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem opening a GeoJSON with http protocol with a script as system proxy. #49179
Comments
Could you also post me the result of these lines QNetworkProxyFactory.proxyForQuery( QNetworkProxyQuery( QUrl( "https://www.vigicrues.gouv.fr/services/1/InfoVigiCru.geojson/" ) ) )[0].port()
QNetworkProxyFactory.proxyForQuery( QNetworkProxyQuery( QUrl( "https://www.vigicrues.gouv.fr/services/1/InfoVigiCru.geojson/" ) ) )[0].hostName()
QNetworkProxyFactory.proxyForQuery( QNetworkProxyQuery( QUrl( "https://www.vigicrues.gouv.fr/services/1/InfoVigiCru.geojson/" ) ) )[0].type() |
I was on holiday and am teleworking today and next Monday. I could do the test next Tuesday... |
QgsNetworkAccessManager.instance().proxyFactory().queryProxy( QNetworkProxyQuery( QUrl( "https://www.vigicrues.gouv.fr/services/1/InfoVigiCru.geojson/" ) ) )[0].type() |
strangely if we pass by a qlr file indicating the source |
Everything returned by but the same command with hostName returns what ? empty string ? it look very strange to me! What returns this? QNetworkProxyFactory.systemProxyForQuery( QNetworkProxyQuery( QUrl( "https://www.vigicrues.gouv.fr/services/1/InfoVigiCru.geojson/" ) ) )[0].port() Same question with hostname/type/port |
hostname() correctly returns 'pfrie-std.proxy.e2.rie.gouv.fr' |
What is the bug or the crash?
I use http protocol geojson to open for example:
https://www.vigicrues.gouv.fr/services/1/InfoVigiCru.geojson/
In QGIS I set proxy to default proxy
If I use a script (.pac) in the system settings, opening the Geojson fails.
It succeeds if in the systems settings I use a manual configuration.
Note that I use in the python console the instruction:
QgsNetworkAccessManager.instance().proxyFactory().queryProxy( QNetworkProxyQuery( QUrl( "https://www.vigicrues.gouv.fr/services/1/InfoVigiCru.geojson/" ) ) )[0].hostName()
which allows me to check that the proxy retrieved is the correct one when using the script (.pac).
Steps to reproduce the issue
Use a configuration where a proxy is required.
create a test.Pac file which returns the proxy directly and configure it in the Windows system settings.
Versions
Version de QGIS
3.22.6-Białowieża
Révision du code
b6f33b1
Version de Qt
5.15.2
Version de Python
3.9.5
Version de GDAL/OGR
3.4.2
Version de Proj
9.0.0
Version de la base de données du registre EPSG
v10.041 (2021-12-03)
Version de GEOS
3.10.2-CAPI-1.16.0
Compilé avec SQLite
3.38.1
Fonctionne avec SQLite
3.26.0
Version de PDAL
2.3.0
Version du client PostgreSQL
13.0
Version de SpatiaLite
5.0.1
Version de QWT
6.1.3
Version de QScintilla2
2.11.5
Version de l'OS
Windows 10 Version 1909
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: