Hello,
 
Background:
I am using HttpClient 3.0 rc4. I am trying to connect to an IIS server using 
SSL. I need to POST data to that server. My connection timeout is set to 10 
seconds. When execute method runs, the first response I get is 100 Continue 
which is almost immediate, but the HTTP content comes back much after 10 
seconds.
 
Question:
I am not sure if HttpClient is using a second connection in the execute method 
for sending the actual POST data.
1. If the client uses the same connection to POST data, then will the timeout 
value NOT matter anymore since the client has already recieved 100 Continue 
immediately?
2. If it uses another connection, then will that connection also have a 
connection timeout of 10 seconds. If yes, then why is it taking longer than 10 
seconds to get my response?
3. If I want to set the connection timeout = 10 seconds from the time the first 
request is made to the time I get a final response, what do I have to do?
 
Code:

HttpClient httpClient = new HttpClient(new SimpleHttpConnectionManager());

Integer timeout = new Integer(10*1000);



httpClient.getHttpConnectionManager().getParams().setParameter("http.connection.timeout",
 timeout);

httpPostMethod.setRequestBody(data);

int statusCode = httpClient.executeMethod(httpPostMethod);

 

Thanks in advance!




                
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  

Reply via email to