Bug report #12840
Updated by Alessandro Pasotti over 6 years ago
qgis_mapserver.fcgi does not respect the proxy settings written in QGIS2.ini.
As suggested by the guide, I set the QGIS_OPTIONS_PATH to a folder which contains a QGIS folder which contains the configuration file QGIS2.ini.
The file is correctly accessed by qgis_mapserver.fcgi, as shown by Process Monitor:
09:56:20 qgis_mapserv.fcgi 12016 QueryNetworkOpenInformationFile C:\\OSGeo4W\\httpd.d\\QgisConfig\\QGIS\\QGIS2.ini SUCCESS CreationTime: 28/05/2015 00:32:03, LastAccessTime: 28/05/2015 09:37:11, LastWriteTime: 28/05/2015 09:43:11, ChangeTime: 28/05/2015 09:43:27, AllocationSize: 01/01/1601 02:00:00, EndOfFile: 01/01/1601 02:00:00, FileAttributes: A
However the server still ignores the proxy setting.
By inspecting the source code in qgis_map_serv.cpp I suspect that this is due to the fact that the setupNetworkAccessManager() method is not calling QgsNetworkAccessManager::setupDefaultProxyAndCache().
As suggested by the guide, I set the QGIS_OPTIONS_PATH to a folder which contains a QGIS folder which contains the configuration file QGIS2.ini.
The file is correctly accessed by qgis_mapserver.fcgi, as shown by Process Monitor:
09:56:20 qgis_mapserv.fcgi 12016 QueryNetworkOpenInformationFile C:\\OSGeo4W\\httpd.d\\QgisConfig\\QGIS\\QGIS2.ini SUCCESS CreationTime: 28/05/2015 00:32:03, LastAccessTime: 28/05/2015 09:37:11, LastWriteTime: 28/05/2015 09:43:11, ChangeTime: 28/05/2015 09:43:27, AllocationSize: 01/01/1601 02:00:00, EndOfFile: 01/01/1601 02:00:00, FileAttributes: A
However the server still ignores the proxy setting.
By inspecting the source code in qgis_map_serv.cpp I suspect that this is due to the fact that the setupNetworkAccessManager() method is not calling QgsNetworkAccessManager::setupDefaultProxyAndCache().