httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Noordhuis <i...@bnoordhuis.nl>
Subject Re: RPC over HTTP
Date Wed, 03 Oct 2012 11:26:29 GMT
On Wed, Oct 3, 2012 at 11:57 AM, Evgeny Shvidky <evgeny@skyfence.com> wrote:
> 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.

Do you check that  ap_setup_client_block() returns OK?

Does ap_get_client_block() return -1 on the first call? If yes, you
may want to step through the function in a debugger to see what the
error condition is.

> How should I read client's data?
> Is there any other API for it?

The filter API?

Mime
View raw message