synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiranya Jayathilaka (JIRA)" <>
Subject [jira] [Commented] (SYNAPSE-992) Adding the default Content-Type when there is no body in the response
Date Fri, 19 Sep 2014 03:34:34 GMT


Hiranya Jayathilaka commented on SYNAPSE-992:

I'm not entirely confident about this fix. All this content type inference code is guarded
by an if condition right now:

if (expectEntityBody) {

So perhaps a better solution is to set the expectEntityBody to false to cover your scenario
(Content-Length = 0; Content-Type = null;). This is a vert specific case, and we can easily
check for it and set the boolean value to false early in the flow. Can you please look into
that option please? Take a look at the TargetHandler#isResponseHaveBodyExpected() method.

> Adding the default Content-Type when there is no body in the response
> ---------------------------------------------------------------------
>                 Key: SYNAPSE-992
>                 URL:
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.1
>            Reporter: Sivajothy Vanjikumaran
>            Assignee: Hiranya Jayathilaka
>            Priority: Critical
>              Labels: patch
>             Fix For: FUTURE
>         Attachments: Synapse_2_2_0_SNAPSHOT_SYNAPSE-992.diff
> When there is no content type in the response synapse set the default content type as
> The HTTP Spec only talks about dealing with Content-Types and assuming "application/ocet-stream"
for messages, containing an entity-body [1]. As we are not providing an entity body, the ESB
should not infer a Content-Type.
> Instead of, the ESB just should pass through the response to the client without adding
a Content-Type.
> [1]

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message