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

Work on CAMEL-26169 started by Claus Ibsen.
-------------------------------------------
> camel-sap-netweaver - an endpoint url that already has a query string gets a 
> second ? added
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26169
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26169
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Found while adding the catalog body types of sap-netweaver (CAMEL-24961, PR 
> #28412).
> h4. 1. An endpoint url that already has a query string gets a second ?
> {{NetWeaverProducer.doStart}} (main 2a465aa4814c, line 81) builds the http 
> endpoint uri as {{getUrl() + "?authUsername=" + ...}}, always with a {{?}}. 
> When the configured url already has query parameters, the result has two 
> {{?}} and the http endpoint gets a wrong uri. Read in the code, not run.
> Proposed: append the parameters with {{&}} when the url already contains 
> {{?}} (for example with {{URISupport.appendParametersToURI}}).
> h4. 2. A password with & or + fails
> {{NetWeaverProducer}} (main 2a465aa4814c, line 81) builds the http endpoint 
> URI as {{url + "?authUsername=" + username + "&authPassword=" + password}}, 
> without {{RAW()}} or encoding. A password with {{&}} is cut there (with 
> {{RAW(a&b=c)}} the server got the Basic credentials {{u:a}}, and {{b=c}} in 
> the request query), and a {{+}} becomes a space. Checked on 4.24.0-SNAPSHOT 
> with a local HTTP server.
> Proposed: wrap the values in {{RAW()}}, or set the auth options on the http 
> endpoint instead of building them into the URI.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to