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

ASF GitHub Bot commented on CAMEL-12827:
----------------------------------------

GitHub user bobpaulin opened a pull request:

    https://github.com/apache/camel/pull/2528

    CAMEL-12827 - HttpSendDynamicAware setting port to -1 when not defined.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bobpaulin/camel CAMEL-12827

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/2528.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2528
    
----
commit dffcfff129cdb9f5cb2fae984aabe4c8c761b96b
Author: Bob Paulin <bob@...>
Date:   2018-09-21T21:51:11Z

    CAMEL-12827 - HttpSendDynamicAware setting port to -1 when not defined.

commit 4a55d681648209341c076acce4bebf7a38bbed90
Author: Bob Paulin <bob@...>
Date:   2018-09-21T21:59:13Z

    CAMEL-12827 - Add Apache License Headers to test.

----


> camel-http-common HttpSendDynamicAware setting port to -1 when port is not 
> defined in uri
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-12827
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12827
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http-common
>    Affects Versions: 2.22.0, 2.22.1, 2.23.0
>            Reporter: Bob Paulin
>            Priority: Major
>
> If the route qualifies for SendDyanamicAware processing within the camel-http 
> or camel-http4 component and the route does not specify a port it is getting 
> set to -1.  This should simply assume port 80 or 443 based on http vs https.  
> Logic exists to trim those ports if they are specified however if you omit 
> them your get the following exception:
>  
> {code:java}
> 2018-09-21T16:20:32,797 | ERROR | Camel (camel-2) thread #10 - 
> NettyEventExecutorGroup | AbstractErrorListProcessor       | 26 - 
> com.somebundle - 1.0.76 | Error Handled for route: 
> http://0.0.0.0:8880/%7BsiteId%7D/%7Bcountry%7D/somepath?httpMethodRestrict=GET
> org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: 
> https4://somedomain.com:-1?bridgeEndpoint=true due to: Expected 
> scheme-specific part at index 6: https:
>     at 
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:758)
>  ~[91:org.apache.camel.camel-core:2.22.0]
>     at 
> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80)
>  ~[91:org.apache.camel.camel-core:2.22.0]
>     at 
> org.apache.camel.util.ExchangeHelper.resolveEndpoint(ExchangeHelper.java:91) 
> ~[91:org.apache.camel.camel-core:2.22.0]
>     at 
> org.apache.camel.processor.SendDynamicProcessor.resolveEndpoint(SendDynamicProcessor.java:239)
>  ~[91:org.apache.camel.camel-core:2.22.0]
>     at 
> org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:132)
>  ~[91:org.apache.camel.camel-core:2.22.0]
>     at 
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:181)
>  ~[91:org.apache.camel.camel-core:2.22.0]
>     at 
> org.apache.camel.processor.InterceptorToAsyncProcessorBridge.process(InterceptorToAsyncProcessorBridge.java:67)
>  ~[91:org.apache.camel.camel-core:2.22.0]{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to