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 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]