-
Type:
Improvement
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.19.0
-
Fix Version/s: 2.19.0
-
Component/s: camel-core, camel-http, camel-http4, camel-jetty, camel-netty4-http, camel-restlet, camel-undertow
-
Labels:None
-
Estimated Complexity:Unknown
All RestProducerFactory implementations use code similar to:
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); }
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).