[ 
https://issues.apache.org/jira/browse/HTTPCORE-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCORE-152.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0-beta2

Patch checked in. Many thanks, Sam. I took liberty of changing the signature of 
the responseComplete method from #responseComplete(NHttpServerConnection conn, 
HttpResponse response) to #responseComplete(HttpResponse response, HttpContext 
context). I think this way it is more consistent with the rest of API and one 
can always obtain the connection from the context.

Oleg

> Lack of NHttpRequestHandler breaks AsyncNHttpServiceHandler
> -----------------------------------------------------------
>
>                 Key: HTTPCORE-152
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-152
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>            Reporter: Sam Berlin
>             Fix For: 4.0-beta2
>
>         Attachments: changes.txt
>
>
> In AsyncNHttpServiceHandler.sendResponse, the connection is closed before the 
> response is submitted.  The patch moves the submitResponse to before 'close', 
> so that it correctly goes into the CLOSING state instead of CLOSED.  Also 
> added a test to that broke before but now passes.  
> Seperate from the fix is a new 'responseComplete' method that's called after 
> an entity is fully written or immediately when submitting if there's no 
> entity.  This is very useful for subclasses that want to hook into knowing 
> when a response has been written.  There's no good way to do it w/o the hook 
> because of the asynchronous nature of the sending.  (LimeWire, for example, 
> uses to notify listeners when a response is sent and to add an event for 
> triggering a read if there was buffered read data, since the underlying NIO 
> layer doesn't do it automatically.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to