Bug report #1165

WFS must follow WMS convention for URL (missing ? or & at end auto supplied)

Added by LuizDomingues53 - over 16 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Vectors
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11225

Description

This WFS URL (for MapServer GMap PHP Demo) doesn't work

http://localhost/cgi-bin/mapserv.exe?MAP=/ms4w/apps/gmap/htdocs/gmap75_wfs.map

because ending "&" is missing.

We expect this to work like WMS URLs: ending ? or & are optional and
auto supplied by QGIS as needed.

History

#1 Updated by LuizDomingues53 - over 16 years ago

WFS should check URL like WMS (code follows)

// from: root/trunk/qgis/src/providers/wms/qgswmsprovider.cpp
/*************************************************************************** 
   qgswmsprovider.cpp  -  QGIS Data provider for OGC Web Map Service layers
*/
//***** Lines up to 135 missing **** Follows lines 136 to 154 ****
//
// URL can be in 3 forms:
//     1) http://xxx.xxx.xx/yyy/yyy
//     2) http://xxx.xxx.xx/yyy/yyy?
//     3) http://xxx.xxx.xx/yyy/yyy?zzz=www
//
// Prepare the URI so that we can later simply append param=value
//
    if ( !(baseUrl.contains("?")) )
    {
        baseUrl.append("?");
    }
    else if ( (baseUrl.right(1) != "?" )  &&  (baseUrl.right(1) != "&" ) )
    { 
        baseUrl.append("&");
    }

#2 Updated by Marco Hugentobler over 16 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Fixed in f930e4fc (SVN r1166). Thanks for reporting!

Marco

#3 Updated by Marco Hugentobler over 16 years ago

Oops, I meant f5227a6a (SVN r8993).

#4 Updated by Anonymous over 15 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF