get body of a response

Hi, All,

I send a PROPFIND request to the server and I can see the correct response
in the server's log but I couldn't get the response's body in my code. The
return code is the correct 206, multistatus. There is no such method in
HTResponse.c like HTResponse_body(). I tried to use code from
HTLoadToChunk():

// skip the code that prepares the request
HTStream* target = HTStreamToChunk(request, &chunk, 0);
HTRequest_setOutputStream(request, target);

BOOL retval;
if( retval = HTLoad(request, NO) )
{
	char * string;
	HTEventList_loop(request);
	string = HTChunk_toCString(chunk);
	HTPrint("%s", string ? string : "no text\n");
	HT_FREE(string);
}
else
	HTChunk_delete(chunk);

But I always get a empty string from the chunk. How can I read the body of a
response into a buffer? Since the chunk sample deals with the GET method,
I'm wondering if libwww treat status 200 and 206 different.

Thank you!

Received on Thursday, 1 November 2001 19:42:44 UTC