camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11092) If setting Exchange.REST_HTTP_URI the RestProducer should remove Exchange.HTTP_PATH header
Date Wed, 12 Apr 2017 08:32:41 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-11092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15965551#comment-15965551
] 

Claus Ibsen commented on CAMEL-11092:
-------------------------------------

Is this not fixed?

> If setting Exchange.REST_HTTP_URI the RestProducer should remove Exchange.HTTP_PATH header
> ------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-11092
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11092
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Zoran Regvart
>            Assignee: Zoran Regvart
>
> One of patterns in using microservices is consuming REST and producing from REST resources
using REST component. For instance have a frontend exposed API using REST DSL and calling
backend using REST producer.
> As most HTTP components generate URIs by concatenating {{Exchange.REST_HTTP_URI}} and
{{Exchange.HTTP_PATH}} when the REST producer generates {{Exchange.REST_HTTP_URI}} header
that contains the whole URI to be used it should remove the {{Exchange.HTTP_PATH}} header
in order to prevent incorrect URIs.
> For example {{Exchange.HTTP_PATH}} is set by the REST consumer to {{/api/pet/123}}, and
REST producer is configured with {{Exchange.REST_HTTP_URI}} with URI {{/api/pet/&#123;petId&#125;}}
if the {{Exchange.HTTP_PATH}} is not removed HTTP component (IMHO all except for Restlet)
would try to send the request to {{/api/pet/&#123;petId&#125;/api/pet/123}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message