[Zoo-discuss] Debugging WFS request in GDB
Fenoy Gerald
gerald.fenoy at geolabs.fr
Thu Aug 21 07:20:10 PDT 2014
Dear Jerome,
you may add some code to print debug messages in your service.c code directly.
Something like the following:
fprintf(stderr, « [DEBUG] %s %d\n »,__FILE__,__LINE__);
But from GDB you should have access to enough informations (except the line number which will be missing, if any access violation occurred, you should have access to the backtrace of function calls).
Best regards,
Le 21 août 2014 à 15:53, Jerome Villeneuve Larouche <jlarouche at mapgears.com> a écrit :
> Hi,
>
> I've got another little problem. I'm trying to debug into service.c from zoo-service/ogr/base-vect-ops. Is it even possible since it's loaded dynamically?
>
> On 14-08-21 08:02 AM, Jerome Villeneuve Larouche wrote:
>> Hello,
>>
>> Thanks a lot. I should have thought about the URL Encode :).
>>
>>
>> I'm also grateful for the POST request tip, this will be really useful.
>>
>>
>> On 14-08-21 03:49 AM, Fenoy Gerald wrote:
>>> Hello Jerome,
>>> running zoo_loader.cgi from GDB for debugging purpose should work. Nevertheless, when I red your request I could notice that the xlink:href was not encoded using URLEncode, so the request was not correctly parsed by the ZOO-Kernel.
>>>
>>> I take advantage of this email about gdb usage to mention that you can also test the POST requests using GDB also (this way you won’t have to take care of such encoding of embedded URLs). So, to use GDB for debugging POST requests, you can use:
>>>
>>> 1) export REQUEST_METHOD=POST
>>> 2) export CONTENT_TYPE=text/xml
>>> 3) gdb ./zoo_loader.cgi
>>> 4) run < my_request.xml
>>>
>>> I hope that this will solve your issue,
>>> Best regards,
>>>
>>> Le 20 août 2014 à 21:50, Jerome Villeneuve Larouche <jlarouche at mapgears.com> a écrit :
>>>
>>>> Hello,
>>>>
>>>> I'm trying to run zoo_loader.cgi in GDB to debug C services. The thing is that in my requests I use WFS url for the DataInputs and it seems that the "request" in the WFS is the one Zoo is trying to read, so I get "Unenderstood request value. Please check that it was set to GetCapabilities, DescribeProcess or Execute."
>>>>
>>>> I'm trying to run this request in GDB.
>>>>
>>>> "request=Execute&service=WPS&version=1.0.0&Identifier=Buffer&DataInputs=BufferDistance=10 at datatype=interger;InputPolygon=Reference at xlink:href=myserver.com/ows?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.0.0&typename=feature:drainage&SRS=EPSG:3857&FeatureID=drainage.1811&RawDataOutput=Result at mimeType=application/json"
>>>>
>>>> Am I missing something to run that request in GDB?
>>>>
>>>> It works fine when I send it through Apache.
>>>>
>>>> Thank you
>>>>
>>>> --
>>>> Jérôme Villeneuve Larouche
>>>> www.mapgears.com
>>>>
>>>> _______________________________________________
>>>> Zoo-discuss mailing list
>>>> Zoo-discuss at lists.osgeo.org
>>>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss
>>>
>>>
>>> Gérald Fenoy
>>> http://wiki.osgeo.org/wiki/User:Djay
>>>
>>
>>
>
>
> --
> Jérôme Villeneuve Larouche
> www.mapgears.com
>
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20140821/1c0258ad/attachment.pgp>
More information about the Zoo-discuss
mailing list