synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Hubert (JIRA)" <>
Subject [jira] Created: (SYNAPSE-521) Send Synapse generated Hessian faults with HTTP status 200
Date Wed, 18 Mar 2009 11:15:50 GMT
Send Synapse generated Hessian faults with HTTP status 200

                 Key: SYNAPSE-521
             Project: Synapse
          Issue Type: Improvement
          Components: Transports
    Affects Versions: 1.2
            Reporter: Eric Hubert
            Priority: Minor
             Fix For: 1.3

If synapse generates faults using the fault mediator using the nhttp transport they are currently
always send using HTTP status 500. Hessian clients requires all messages to arrive with HTTP
status 200 (no differentiation between normal messages and fault messages). HTTP 500 is reserved
for real internal server errors.

The attached patch introduces a message context property to advice the nhttp transport to
use a HTTP 200 status code. For the Hessian case the message builder set this advice and the
HttpCoreNIOSender picks up this advice in case of fault messages. The logic to detect the
proper HTTP status has been extracted to a separate private method to improve readability.

I think this approach is even better than the approach discussed on the dev list modifying
the FaultMediator to set just another property with the value of the HTTP status. The FaultMediator
stays transport independent and the property is directly evaluated from the transport.

Regarding the naming and place of the new Constants in NhttpConstants I would appreciate a
review. The same applies to the extracted status code logic, which should not change the existing
bahavior. I just tried to make it a bit more readable, also changing some comments.

Feedback welcome!

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:
For additional commands, e-mail:

View raw message