hi,
Currently nhttp worker (ServerWorker.java 206) has the following logic
if (msgContext != null &&
msgContext.getOperationContext() != null &&
!msgContext.getOperationContext().getAxisOperation().isControlOperation()))
{
// send 202 accepted if other criterias also matched
}
This gives a problem with handling MakeConnection and
TerminateSequenceResponse message send by the server to client.
For an example if their are no pending messages Sandesah2 sends a 202
accepted for a MakeConnection request. This works with axis2 http
transport.
Both MakeConnection and TerminateSequence messages are mapped to RM specific
control messages.
Therefore even I set it to NhttpConstants.FORCE_SC_ACCEPTED it will not pass
the if condition since
msgContext.getOperationContext().getAxisOperation().isControlOperation() is
true.
Is it possible to change this logic as follows,
if (msgContext != null &&
msgContext.getOperationContext() != null &&
(!msgContext.getOperationContext().getAxisOperation().isControlOperation()
||
msgContext.isPropertyTrue(NhttpConstants.FORCE_SC_ACCEPTED))) {
// send 202 accepted if other criterias also matched
}
I don't have much understanding about the synapse context. But I feel it is
reasonable to allow send
202 accepted header even it is a control operation, if the
NhttpConstants.FORCE_SC_ACCEPTED is set.
WDYT?
thanks,
Amila.
--
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/