I am facing a problem during http connection. I have to post two requests in a single http connection. But Once the first header is set,connection goes into the connected state. So during 2nd request header setting it throws an exception "Connection is open". Plz give me a soln.
Try reading this thread
Originally posted by Debojit Nag:
I have to post two requests in a single http connection.
It helps to understand how the protocol works:
1.4 Overall Operation
The HTTP protocol is a request/response protocol. A client sends a
request to the server in the form of a request method, URI, and
protocol version, followed by a MIME-like message containing request
modifiers, client information, and possible body content over a
connection with a server. The server responds with a status line,
including the message's protocol version and a success or error code,
followed by a MIME-like message containing server information, entity
metainformation, and possible entity-body content.
HTTP RFC 2616
Send a request, read the response, THEN send another request and read the response.
[ July 19, 2005: Message edited by: Joe Ess ]