Hi Fabien
The easiest way to develop such functions is to look at Ethereal/Wireshark recordings and then 'play back' these contents through you new code.
The uTasker method during post is to identify the post by analysing the header sent by the web browser.
There are several tags which need to be identified:
"boundary=" is a mime boundary which splits parts in the post (eg. text, application, binary etc. can be sent in one post).
"Content-Length:" will indicate the size of each file.
"\r\n\r\n" is used also to end most tags.
The following indicate some examples content types which are being sent:
"application/octet-stream\r\n\r\n"
"text/plain\r\n\r\n"
"image/gif\r\n\r\n"
We have an option to define which types of post are supported (application/octet-stream is for example adequate for binary code uploading).
Once you are synchronised to the data content and know its length it can be saved to FLASH (or to a file). When all has been received the file can be closed and a reset commanded if the copy phase should be started.
The uTasker supports playing back Ethereal recordings through its simulator so makes development of such things fairly easy (basically it involves adding a parser to interpret the TCP data). I don't have any experience with your stack and development environment but the parsing part is quite adstract from the stack itself.
Regards
Mark
www.uTasker.com