jira-importer opened a new issue, #777: URL: https://github.com/apache/httpcomponents-core/issues/777
**[Sam Berlin](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sberlin)** opened **[HTTPCORE-152](https://issues.apache.org/jira/browse/HTTPCORE-152?redirect=false)** and commented 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.) --- **Attachments:** - [changes.txt](https://issues.apache.org/jira/secure/attachment/12376877/changes.txt) (_7.43 kB_) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
