hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Async HTTP
Date Mon, 05 Feb 2007 19:38:51 GMT
On Mon, 2007-02-05 at 14:07 -0500, Simon Dansereau wrote:
> Hi,
> 
> I would like to know how can I use http-core to send two responses to a client
> without closing the connection. I guess I will have to use httpcore-nio. I
> tried to modify AsyncHttpServer.java example but I didn't know where to start.
> 
> As soon as I get a request, I would like to send a "server is processing your
> request" response. The page would contain a little animation to make sure user
> don't think the application is down.
> 
> Then, after processing is completed (10-20 seconds), I would like to send the
> "result" response.
> 

Simon,

Theoretically this is possible but you would be really abusing the HTTP
protocol that way. HTTP is a request / response oriented protocol, and
as far as I can tell one HTTP request always implies just one HTTP non
1xx response. You can use the 102 - 199 status code range to send an
intermediate response to the client, but I would strongly recommend you
re-assess your architecture options before you go that route.

Oleg 



> Can someone help me?
> 
> Simon
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message