You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by eh...@inexware.fr on 2001/08/20 14:47:39 UTC
Does AJPv1x need Content-Length ?
hi,
I'm trying to send data to a servlet through a TCP connection. I create my
socket, then send a GET /myapp HTTP/1.1 ....... But I need to define the
content-length for apache to transfert the data to the servlet and
afterwaerds I can't send any more data through this opened connection. Has
anybody met such an issue and found a workaround ?
Thanks in advance
Emmanuel
Re: Does AJPv1x need Content-Length ?
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 20 Aug 2001 ehugonnet@inexware.fr wrote:
> hi,
> I'm trying to send data to a servlet through a TCP connection. I create my
> socket, then send a GET /myapp HTTP/1.1 ....... But I need to define the
> content-length for apache to transfert the data to the servlet and
> afterwaerds I can't send any more data through this opened connection. Has
> anybody met such an issue and found a workaround ?
> Thanks in advance
> Emmanuel
>
>
Using persistent connections with HTTP/1.1 is done by sending completely
separate requests without closing the socket in between. But it's
actually a *lot* more complex than that -- the specification that your
client program needs to obey (RFC 2616) is several hundred pages long.
You might want to investigate finding a class library that does all the
hard stuff for you, or in JDK 1.3 or later you can use HttpURLConnection
with HTTP/1.1 persistent connections.
Craig McClanahan