Hi, Try-ing this GET request: `http://web.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=catasto:rt_cat.idcatbdfog.rt.bb&maxFeatures=10&Filter=<Filter xmlns:wfs="http://www.opengis.net/wfs"><PropertyIsEqualTo><PropertyName>comune</PropertyName><Literal>FIRENZE</Literal></PropertyIsEqualTo></Filter> ` I have a good response . Instead if I send the same request using a POST method Tiny will crash silently: This is the post request I try ` [Tue Dec 11 10:09:30 2012] [EVENT] == Filling Storage == [Tue Dec 11 10:09:30 2012] [QUERY] <?xml version="1.0" encoding="UTF-8"?> <wfs:GetFeature handle="GeoTools 2.7.4 WFS DataStore" outputFormat="text/xml; subtype=gml/3.1.1" resultType="results" service="WFS" version="1.1.0" xmlns="http://www.opengis.net/ogc" maxFeatures="10" xmlns:gml="http://www.opengis.net/gml" xmlns:ambiti_amministrativi="http://www.regione.toscana.it/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ows="http://www.opengis.net/ows" xmlns:wfs="http://www.opengis.net/wfs"> <wfs:Query srsName="urn:ogc:def:crs:EPSG::25832" typeName="ambiti_amministrativi:idprovince"> <Filter> <PropertyIsEqualTo matchCase="true"> <PropertyName>nome</PropertyName> <Literal>FIRENZE</Literal> </PropertyIsEqualTo> </Filter> </wfs:Query> </wfs:GetFeature> ` The log of tiny say nothing else. Instead from the Tomcat Log I see this error: INFO: cgi-tinyows: runCGI (stderr):wfs: src/struct/buffer.c:290: buffer_cmp: Assertion `buf' failed.
Activity
ocourtin commentedon Dec 12, 2012
Andrea,
I'm not able to reproduce this error.
Which TinyOWS version do you use ?
Is it 1.1.0 or trunk ?
aperi2007 commentedon Dec 12, 2012
I'm using tinyows trunk version on a RedHat Enterprise 6 - 64bit.
ocourtin commentedon Dec 12, 2012
Humm quite strange,
could you load tinyows_demo and provide a sample using world or france layer ?
On my own i've used this one for instance:
aperi2007 commentedon Dec 13, 2012
Hi,
I guess this could be an issue of my installation.
So I'm try-ing to trace the call the buffer_op with the buf variable null-ed.
Can you say me in what file there is the calls for the GetFeature Requests.
Thx,
Andrea.
aperi2007 commentedon Dec 13, 2012
Another information:
the issue come only with a post request.
It don't come with a get request.
ocourtin commentedon Dec 13, 2012
You could use valgrind and tinyows debug script to help on this:
./test/unit-test YOUR_POST_REQUEST_FILE_PATH 2
aperi2007 commentedon Dec 26, 2012
Hi,
it was not so easy for me.
However I found something.
I see the issue is in the
ows/ows_request.c (at 310 line about)
I can see that before this line of code
/* check if VERSION is set and init Version */
or->version = ows_version_init();
The 'cgi' variable is properly set.
I check it with an "assert(cgi)".
After this function (ows_version_init) the 'cgi' variable is null.
This happened only when the request is with POST method.
I don't know at now what happened in that function.
aperi2007 commentedon Dec 26, 2012
mmhh..
no. The function ows_request_check end correctly.
I wrong interpret the flow.
aperi2007 commentedon Dec 26, 2012
Perhaps I do a step forward the issue.
In the "ows_layer.c"
the function
list *ows_layer_list_by_ns_prefix(ows_layer_list * ll, list * layer_name_prefix, buffer * ns_prefix)
in this piece of code:
for (ln = layer_name_prefix->first; ln ; ln = ln->next) {
layer_ns_prefix = ows_layer_ns_prefix(ll, ln->value);
seem to have always NULL the "layer_ns_prefix".
Now I need to understand why this is always NULL on a POST request.
aperi2007 commentedon Dec 26, 2012
found !
The issue was in the name of the prefix.
My config.xml was using:
<layer ns_prefix='ambiti_amministrativi'
ns_uri="http://www.regione.toscana.it/"
The character "_" was not understand from tinyows.
When I remove it using
<layer ns_prefix='ambitiamministrativi'
ns_uri="http://www.regione.toscana.it/"
It begin to work.
I guess is better open a specific ticket.
aperi2007 commentedon Dec 26, 2012
opened the ticket #52
aperi2007 commentedon Dec 26, 2012
I found another bug always on the lists of layer.
Opened another ticket to explain it.