GitHub user hirthwork opened a pull request:
https://github.com/apache/httpcore/pull/5
Allow custom processing for "Response already submitted" errors
Currently, second call of exchage.submitResponse() will raise
IllegalStateException. There is no way to log any additional information
concerning request caused this error.
Two new protected functions had been added to HttpAsyncService, their
default behaviour is exactly same as it was before: throw IllegalStateException
with "Response already submitted". Anyone can override them and log any request
information stored in context.
Also, HttpAsyncExchangeImpl.completed flag made atomic, so really no two
concurrent submissions will be available. Currently two threads could call
submitResponse, simultaneously pass completion flag check and after that one of
responses will be silently lost without notifying anybody.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hirthwork/httpcore trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/httpcore/pull/5.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5
----
commit ad5759875a692b41eb7de9731844bdae3da04835
Author: Dmitry Potapov <[email protected]>
Date: 2014-10-14T16:05:09Z
Allow custom processing for "Response already submitted" errors
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]