Opened 12 years ago
Closed 12 years ago
#842 closed defect (fixed)
WFS: infinite recursion processing schemas.
Reported by: | brentrobinson | Owned by: | brentrobinson |
---|---|---|---|
Priority: | major | Milestone: | 3.7.0 |
Component: | WFS Provider | Version: | |
Severity: | 2 | Keywords: | WFS stack overflow |
Cc: | External ID: |
Description
Steps:
- connect to http://www.mapinfo.com/miwfs using WFS provider
- perform an IDescribeSchema command
provider gets a stack overflow.
Change History (2)
comment:1 by , 12 years ago
Status: | new → assigned |
---|
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Revision: 6529 Author: brentrobinson Date: 1:54:12 PM, Monday, July 30, 2012 Message: Ticket#842: Remove "./" from schema location uri's.
Modified : /trunk/Providers/WFS/Src/Provider/FdoWfsSchemaMerger.cpp
Note:
See TracTickets
for help on using tickets.
When the WFS provider retrieves a server's schema, it recursively includes schemas referenced by that schema. Checks are done to ensure that each schema is included once, in order to avoid infinite recursion. This is done by keeping a list of the absolute paths of the schemas included sofar.
The infinite recursion can still happen when a referenced schema's location is a relative path starting with "./". For example, http://schemas.opengis.net/wfs/1.0.0/wfs.xsd references ./WFS-basic.xsd, which in turn, references ./wfs.xsd.
The WFS provider converts relative schema paths to absolute, by prepending the absolute path of the referenced schema. After it includes:
it then includes:
and then:
due to the extra "./" in the path, the provider doesn't recognize that it already included this schema, so it continues on including:
until there is a stack overflow.