views:

36

answers:

1

I have a Proprietery Client-Server application written in MFC. No clients other then my client is going to communicate with the server . For safetly reason , we are using HTTP.

Until know , we used content-length to describe the client where the response body ends. Now we are having a situation where the length isn't known in advance and we can't buffer the data. I read in the rfc that there is the Chunked Transfer Coding. The problem is that I don't want to implement the formatting which is defined in the rfc(http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6 section 3.6.1).

The problem is that if I use my own chunk formatting and then MFC class try to parse it , it will through error since this is not the format is expect as defined in the RFC.

Is it possible to put "Chunked Transfer Coding" in the response headers and then use my own chunk formatting? Or in other words , does MFC classes , when they see "Chunked Transfer Coding" in the response headers , try to parse the body according to the defintion of chanked formatting in the rfc ?

A: 

I'm not sure I understand.

1) What's wrong with the chunked encoding as defined by RFC 2616?

2) And how is existing code supposed to deal with an encoding it doesn't know?

Julian Reschke
Objectively , Nothing is wrong with it. For some reason which doesn't metter right now. The idea is that i'll define my own encoding and imeplement it both in the Client and the Server.
Well, the HTTP framework needs to understand the encoding to see where the message ends. So you'd have to implement it at a rather low level.
Julian Reschke