Hi,
I'm currently interfacing to an external module which has a pre-defined protocol that I'm trying to comply with. The module uses both GET and POST messages to the same cgi file, for example;
Get example; GET http://<server>/<filename>.cgi?req=<parampath>
Post example; POST http://<server>/<filename>.cgi\r\n content-Length:XX\r\n \r\n <paramPath>=<value>\r\n
I can successfully capture and action the GET messages sent by the external module via the cgi_process_var() . I don't however seem to be able to capture and action the POST messages via the cgi_process_data(). The cgi_process_data() never seems to be called on receipt of the POST message.
Is it possible to do both methods via the same cgi file?
I've tried to look at the cgi script language to see if there is anything I should be including in my cgi file but i cannot see anything other then possibly including a <FORM> element?(http://www.keil.com/support/man/docs/rlarm/rlarm_tn_http_scriptlang.htm)
My cgi file currently only contains a call to the cgi_func() via the simple script "c S E %s" to allow me to send back a custom strings to the module.
Apologies in advance for the gaps in my knowledge on this subject.
Thanks
Tom
I have been continuing work on this subject and it seems my problem may be a little more basic/fundamental.
I have gone back to trying to implement the Keil example for POST as described in the "Getting Started Building Applications with RL-ARM" to check that POST commands work on their own. Unfortunately there seems to be a problem with my project as the "change" button in the example also doesn't trigger CGI_process_data().
cgi_process_var() and cgi_func() are both OK and have been seen to work.
I have used wireshark and can see the HTTP POST request coming from the web browser, I can also see the stack ACK via TCP the HTTP POST. After this I would expect the CGI_process_data() to be called but this doesn't happen.
I'm using what I think is the latest legacy library ( __RL_TCP_VER 0x00000477 Number 0 at_system.o ABSOLUTE) .
Does anybody have any ideas on what I could be overlooking?