Home / RL-ARM User's Guide (MDK v4)
Large POST Messages
When the Web server receives the POST request, the server checks
the Content-Type header. For all XML-encoded content types,
the server does no further processing, but delivers the data to the
user in the callback function. It is a responsibility of the user to
correctly assemble large POST messages, because they are
fragmented and delivered from several TCP packets. For the first and
optional subsequent packets, the Web server calls the callback
function with code 5:
cgi_process_data (5, dat, len);
The user shall now start buffering the data.
For the last or single data packet, the Web server
calls the callback function with code 4:
cgi_process_data (4, dat, len);
The XML-POST data is now complete and the user can start parsing
the XML encoded data. In addition the user might check what was the
Content-Type with the function http_get_content_type.