[ 
https://issues.apache.org/jira/browse/CAMEL-10917?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zoran Regvart resolved CAMEL-10917.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.19.0

> Implementations of RestProducerFactory should handle empty or null basePath 
> and uriTemplate
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-10917
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10917
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-http, camel-http4, camel-jetty, 
> camel-netty4-http, camel-restlet, camel-undertow
>    Affects Versions: 2.19.0
>            Reporter: Zoran Regvart
>            Assignee: Zoran Regvart
>            Priority: Minor
>             Fix For: 2.19.0
>
>
> All RestProducerFactory implementations use code similar to:
> {code:java}
> String url;
> if (uriTemplate != null) {
>     // http is already prefixed in base path
>     url = String.format("%s/%s/%s", host, basePath, uriTemplate);
> } else {
>     // http is already prefixed in base path
>     url = String.format("%s/%s", host, basePath);
> }
> {code}
> This fails to account for {{basePath}} being null or empty, and 
> {{uriTemplate}} being empty, which results in the resulting {{url}} to either 
> have double slashes (e.g. {{http://host//uriTemplate}}) or {{"null"}} 
> {{String}} in {{url}} (e.g. {{http://host/null/uriTemplate}}).



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

Reply via email to