Bug report #4799
QGIS Server - GetMap URI inconsistency
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||14651|
Using the OSGeo4W package installer on Windows7 64bit I installed QGIS Server 1.7.3-1, Apache 2.2.14-4 and associated dependencies including fcgi. I created a demo project in QGIS Desktop 1.7.3-1 and successfully returned a GetCapabilities document in my web browser.
The next step was to try to access the QGIS server WMS in various GIS packages (QGIS, MapInfo and ArcGIS). In all cases the software was able to parse the GetCapabilities document, however I could not view the data. Generating a GetMap request in my web browser did return a map image though. Eventually I got a WMS layer to display in QGIS Desktop by enabling the 'Ignore GetMap URI reported in capabilities' option in the WMS connection setup dialog.
The same problem is reported here:
As reported in the second thread above, the problem appears to stem from the fact that the GetCapabilities document reports the GetMap link omitting the http: prefix. An excerpt from my test GetCapabilities document is shown below:
<HTTP GetCapabilities="http://localhost/qgis/qgis_mapserv.fcgi.exe?map=C:/temp/ArealApportionment/Working.qgs" GetMap="//localhost/qgis/qgis_mapserv.fcgi.exe?map=C:/temp/ArealApportionment/Working.qgs&" />
I believe this is a bug, and is restricting the functionality of what would otherwise be a very quick way to set up a WMS service.