httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny Shvidky <evg...@skyfence.com>
Subject RE: RPC over HTTP
Date Wed, 03 Oct 2012 12:06:32 GMT
Hi,

ap_setup_client_block() returns OK.

I think the problem is that "Content-Length" header value is 1073741824 (1 GB) and probably
apache tries to receive the whole content before it passed to my module.
Am I right?
If yes, is there any way to tell apache to send all received data till now?

Thanks,
Evgeny

-----Original Message-----
From: Ben Noordhuis [mailto:info@bnoordhuis.nl] 
Sent: Wednesday, October 03, 2012 1:26 PM
To: modules-dev@httpd.apache.org
Subject: Re: RPC over HTTP

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