[gdal-dev] WFS driver bug1

Even Rouault even.rouault at spatialys.com
Wed Sep 28 05:17:21 PDT 2016

Le mercredi 28 septembre 2016 14:00:36, Odd Ragnar Lydersen a écrit :
> When I'm using the WFS driver for version 1.0.0, or version 1.1.0 then I
> get some error messages back from GDAL, when the service is password
> protected. I have not tested this for version 2.x.
> Here is what I have found out:
> 1)      Calls to CPLHTTPFetch() from OGRWFSDataSource::HTTPFetch() is sent
> with UserPwd in papszOptions parameter.
> 2)      Calls to CPLHTTPFetch() from OGRGMLDataSource::Open() is sent
> without UserPwd in papszOptions parameter, in fact the calls from the GML
> driver is always called with the parameter set to NULL .
> Even though I get these errors, I'm still able to read features from the
> service.

The call to CPLHTTPFetch() in the GML driver is to retrieve the XSD from the 
schemaLocation attribute. 
If the driver doesn't manage to retrieve the schema, then it guesses it, which 
explains why this still works despite the error.

> But why are the calls in the GML driver, (on behalf of the WFS driver),
> made without UserPwd in papszOptions parameter?

Because this hasn't been yet implemented. Patch welcome. This would involve 
adding new open options to the GML driver and set them in the WFS driver.


Spatialys - Geospatial professional services

More information about the gdal-dev mailing list