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

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

onderson commented on issue #1938: CAMEL-11658: test for RestletProducer 
handling unencoded headers
URL: https://github.com/apache/camel/pull/1938#issuecomment-397993626
 
 
   So coming back to this issue after so long and tracking the issue in git 
history. I can see this issue might be introduced regarding the changes in an 
improvement item in CAMEL-10392's implementation. (by @stsiano). That was why 
included him in the loop. 
   Before that, `new URI` was never called so uri encoding check was never done 
on the string value uri so you don't see any such error before that. In restlet 
maybe this can be left and tied up to and option. but the implementation in 
CAMEL-10392 seems larger and open to be discussed by the community. but in my 
opinion there is always a workaaround where you can encode your uri with a 
processor before passing it in route.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> URISyntaxException in RestletProducer
> -------------------------------------
>
>                 Key: CAMEL-11658
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11658
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-restlet
>    Affects Versions: 2.19.0
>            Reporter: Anton Koscejev
>            Priority: Minor
>
> CAMEL-10392 introduced session/cookie handling for camel-restlet. However, 
> this also introduced a bug where new URI is created from resourceUri before 
> it's encoded.
> Before this change the uri would be safely encoded within restlet's Request 
> constructor.
> See this code in RestletProducer:
> {code}
>             String resourceUri = buildUri(endpoint, exchange);
>             URI uri = new URI(resourceUri); // <- causes exception on 
> unencoded uri
>             request = new Request(endpoint.getRestletMethod(), resourceUri); 
> // <- will encode uri
>             binding.populateRestletRequestFromExchange(request, exchange);
> {code}



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

Reply via email to