Rostislav_Zatol
Apr 02, 2010Nimbostratus
unchanking and collecting whole POST body
Hi,
I am going crazy trying to collect complete POST body sent in chunked format to the server.
HTTP::collect requires a number of bytes to collect, chunked http messages doese not have content-length header, so I dont see a possibility to collect whole body.
Chunked format has byte count for following body part. i.e.
-----
POST /xyz HTTP 1.1
header 1
header 2
Transfer-Encoding: chunked
28
herebodypartwith13characters
0
--------
the shows that 28 bytes of body follows.
I was trying to call [HTTP::payload length], it delivers 4, that means it should be 280d0a, but [HTTP::payload] itself delivers 0
I have tried to call [HTTP::collect [HTTP::payload]] doese not work also, also [HTTP::collect [HTTP::payload length]].
Maybe I am just stupid, but is there no standard parsing mechanism for HTTP 1.1 chunked POST requests?
BR
RZ