KaalH! a écrit :
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've made some cleaning & fixes, updated patches attached.
I still wonder why you absolutely want to parse the multipart data on
the Tora side instead of the web server side ?
Let's say that when do_get_params get called, you're sending the
multipart data just after GET data (and instead of POST data) with
send_multipart_data (to be made public in protocol.c and added in
protocol.h).
This way the tora server would receive :
<all startup infos>
CParamKey "p1"
CParamValue "v1"
CParamKey "p2"
CParamValue "v2"
....(other params)
CPartKey "k1"
CPartData ...
CPartData ...
CPartData ...
CPartDone
.....(other parts)
CExecute
<handle request>
And you would only have to handle CPart* messages in Client.hx, so files
get saved on disk directly.
I suggest using a unique file with an unique ID :
uid_lock.acquire();
var uid = UID++;
uid_lock.release();
"tora"+uid+".tmp"
And store the different parts in the same file, keeping only the file
position and file name in memory for further handling when requested by
ModNekoApi.
Best,
Nicolas
--
Neko : One VM to run them all
(http://nekovm.org)