Message
Hi,
I have a TCP
client-server application written in Java using the standard socket
APIs.
Now, I want to
introduce Apache as the proxy server between them. And hence I am using the
mod_proxy module.
The communication
among client, apache and server is properly being established but facing a
strange problem.
Here the
client wants to send many requests, so I am writing the code
as:
CLIENT:
/** 1st
Request [START] **/
contentLength = 6.
out.writeBytes("A");
out.writeBytes("B");
out.writeBytes("C");
out.flush();
/** 1st
Request [END] **/
/** 2nd Request [START]
**/
contentLength =
6.
out.writeBytes("P");
out.writeBytes("Q");
out.writeBytes("R");
out.flush();
/** 2nd
Request [END] **/
/** 3rd
Request [START] **/
contentLength =
6.
out.writeBytes("X");
out.writeBytes("Y");
out.writeBytes("Z");
out.flush();
/** 3rd
Request [END] **/
out.close();
The request properly
goes to Apache without any exception on client side.
But the server
receives very data only for 2 requests:
SERVER:
POST /
HTTP/1.1
Host: 192.168.56.17:9801
X-Forwarded-For:
192.168.56.17
X-Forwarded-Server: www.pavan.com
Connection:
Keep-Alive
Content-Length: 6
ABC
PQR
This is because of
content length is 6. If I increase it to 9 then it works
perfectly.
See here every
request is sending its content length. But apache considers all 3 requests as
the part of single request.
How to
convince Apache that the client wants to make 3 separate
requests?
Waitng for the
reply.
regards,
Anand