Ticket #1346 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

Invalid GetMap Requests in WMS: two question marks

Reported by: neumann Owned by: nobody
Priority: major: does not work as expected Milestone:
Component: WMS Version: Trunk
Keywords: Cc:
Platform Version: Platform: Debian
Must Fix for Release: Yes Awaiting user input: no

Description

I just compiled the latest QGIS trunk version and ran into the problem that the WMS plugin now generates invalid WMS requests. Did someone change the WMS functionality recently?

The problem is that it adds a second question mark in the REQUEST string, although the original connection string already contains a question mark.

Here is my original WMS connection string which works fine for the GetCapabilities? request:

 http://192.168.0.10/cgi/mapserv?map=/home/mapserverdata/orthofoto_2006.map

Here is the connection string with two question marks that qgis generates:  http://192.168.0.10/cgi/mapserv?map=/home/mapserverdata/orthofoto_2006.map&?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=696445.925470,245312.612036,696779.574530,245536.794214&SRS=EPSG:21781&WIDTH=890&HEIGHT=599&LAYERS=orthofoto_2006_average,orthofoto_2006_bilinear&STYLES=&FORMAT=image/jpeg

Note the second question mark before the SERVICE parameter. I think this is rather simple to fix in the code. Just see if a question mark is already present in the connection string and don't add one if it is.

Thanks for having a look at this bug.

Change History

Changed 5 years ago by jef

  • status changed from new to closed
  • resolution set to fixed

fixed in r9475

Changed 5 years ago by neumann

wow - this was one of the fastest bug fixes I ever experienced - thank you very much!

Changed 4 years ago by anonymous

  • milestone Version 1.0.0 deleted

Milestone Version 1.0.0 deleted

Note: See TracTickets for help on using tickets.