hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: [HttpCore] NIO extensions: event-driven non-blocking HTTP transport
Date Thu, 19 Oct 2006 18:03:27 GMT
On Thu, 2006-10-19 at 17:48 +0200, Roland Weber wrote:
> Hi Oleg,
> 
> just a short glimpse...
> 
> ContentDecoder.isCompeted should be .isCompleted
> ContentEncoder.isCompeted should be .isCompleted
> 

Oopsie.

> NHttpClientConnection.getHttpResponse()
> NHttpServerConnection.getHttpRequest()
> We've avoided tying the request and response directly so far.
> But it's probably not a big issue, so leave it that way.
> 
> NHttpServerConnection.submitContinue()
> I don't like this at all. You are assuming that 100 continue
> is the only preliminary response that will ever be sent.
> That is true for the current HTTP specifications, but HTTP
> explicitly allows for extensions. I don't see why we should
> restrict our API in this case. Alternatives:
> 
> 1. NHttpServerConnection.submitPreliminary(HttpResponse)
> 2. NHttpServerConnection.submitResponse(HttpResponse, boolean preliminary)
> 

It just hit me. We do not a special method for 1xx responses at all. We
simply treat 1xx responses as intermediate (preliminary) ones. The
connection will remain in 'response uncommitted' state until a non 1xx
response has been committed. That is it.

> NHttpClientHandler.exception(...)
> Will the client handler get a chance to handle other kinds
> of exceptions, too? I usually prefer a generic error handling
> method, where the handler decides what to do (if anything):
> 
> /** @return true if handled, false otherwise */
> boolean NHttpClientHandler.exception(conn, Throwable)
> 

I think it is pointless to expect a high level protocol handler to be
able to recover from runtime exceptions and IOException and
HttpException are the only two types of checked exceptions that can be
thrown. Anyways, I can live with it either way.


> NHttpServerHandler.exception(...)
> See comments for client.
> 
> Your JavaDocing is much improved!

Working on it ;-)

Cheers

Oleg

>  I noticed a typo in
> NHttpConnection.request*put: "oprtations".
> 
> cheers,
>   Roland
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
> 
> 


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


Mime
View raw message