AnsweredAssumed Answered

SPWF04S HTTP-POST is sent in chunked transfer but not ended as per spec with "0", Why????

Question asked by Jonathan Harding on May 2, 2018
Latest reply on May 3, 2018 by Jonathan Harding

I am posting data up to a server using HTTP post, the module sends the data in chunked mode. It is a relatively short packet, so is sent in one transfer. However the module does not end the transfer by sending a last chunk character, I.e. "0" therefore leaving the server expecting more data.

The module then closes the connection with FIN-ACK, yet leaving the server expecting more data, so obviously the server responds with an error on every post. Rather annoying!

Please fix or suggest how the chunked transfer can terminated correctly!



3.6.1 Chunked Transfer Coding     The chunked encoding modifies the body of a message in order to    transfer it as a series of chunks, each with its own size indicator,    followed by an OPTIONAL trailer containing entity-header fields. This    allows dynamically produced content to be transferred along with the    information necessary for the recipient to verify that it has    received the full message.         Chunked-Body   = *chunk                         last-chunk                         trailer                         CRLF         chunk          = chunk-size [ chunk-extension ] CRLF                         chunk-data CRLF        chunk-size     = 1*HEX        last-chunk     = 1*("0") [ chunk-extension ] CRLF         chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )        chunk-ext-name = token        chunk-ext-val  = token | quoted-string        chunk-data     = chunk-size(OCTET)        trailer        = *(entity-header CRLF)     The chunk-size field is a string of hex digits indicating the size of    the chunk. The chunked encoding is ended by any chunk whose size is    zero, followed by the trailer, which is terminated by an empty line.     The trailer allows the sender to include additional HTTP header    fields at the end of the message. The Trailer header field can be    used to indicate which header fields are included in a trailer (see    section 14.40).