- From: <Jim_Ravan@avid.com>
- Date: Fri, 18 Dec 1998 10:51:01 -0500
- To: www-lib@w3.org
>>// Perform a ranged PUT on that anchor. >>request = HTRequest_new(); >>//HTRequest_addRange(request, "bytes", (char*)&range); >>//HTRequest_addRqHd(request, HT_C_RANGE); >>Putting ranges on anything but HEAD and GET requests is tricky (can't be >>done reliably) as HTTP servers may ignore the ranges. In any case, it has >>to be content-range and not range as the latter talks about the requested >>amount of data in the response and not in the entity that you are saving. >Aha! Then would the safer thing be to start a chunked transfer? Then each call to my write >routine would write another chunk to the HTTP server. Is that possible to do? If so, how >can I do it? I am assured that my caller will eventually tell me to stop writing and I can >then send the "0" and end the chunked transfer. As you all can see from the above, we have been talking about chunked transfer coding. Has anyone successfully sent and received chunked transfers using libwww? Can anyone tell me how to do it? I've looked at the code for hours now, and I'm stuck. The mechanism for getting the transfer encoding and decoding to happen is just a little too opaque for me to figure out. The basic idea on my output side - my layer has both output and input, but the current issue only concerns output - is to have my callers ask me to start a transfer with the first piece of data they hand me. I would issue some yet-to-be-determined set of libwww calls and send the first chunk of the chunked transfer. I would then return to my callers. They would then pass me <n> additional pieces of data over time which I would continue to send as chunks in the current chunked entity. Then they would tell me that they were finished sending the current entity, and I would send a final "0" chunk to signal the end of the chunked transfer. This seems to me to be pretty much how HTTP/1.1 envisioned chunked transfer encoding should happen, but for the life of me, I can't figure out how to get libww to do it. Any help? regards, -jim
Received on Friday, 18 December 1998 11:45:50 UTC