Hi,
I am developing a new module on C.
One of the requirements of my module is to receive and handle RPC over HTTP
protocol.
RPC over HTTP opens two HTTP/1.1 requests:
One with request method RPC_IN_DATA to send data to the server, and second one
with method RPC_OUT_DATA to send data back to the client. The body consists of
raw binary data, and the connections are apparently re-used for several RPCs.
Here's an example of an IN connection header:
RPC_IN_DATA /rpc/rpcproxy.dll?<exchange>:6002 HTTP/1.1
Content-Length: 1073741824
...
After connections are established client sends on "IN" channel RPC message with
104 bytes.
I use the following apache API's in order to read these client message.
ap_setup_client_block(userReq, REQUEST_CHUNKED_ERROR);
ap_should_client_block(userReq)
ap_get_client_block(userReq, buf, size)
The problem is "ap_should_client_block" function returns "1" (means there is
message to read) but "ap_get_client_block" returns error (-1) and nothing read.
How should I read client's data?
Is there any other API for it?
Thanks,
Evgeny