[
https://issues.apache.org/jira/browse/CAMEL-11658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16467497#comment-16467497
]
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-387427803
@koscejev , it is up to users what they want to convey in headers of camel
exchange. Here, the restlet component uses various headers (if they are set
before getting applied in the code). i think you can do what you want to do by
using anoym processor to set as camel header. I am not sure what you mean about
camel being protocol agnostic vs setting header. setting of a header value is
users preference and setting special headers like HTTP_QUERY is also user's
preference as it is optional and if you set explicity, i think you should know
what you need to do with path param. (it should be URL encoded in your case).
This is just IMHO. @davsclaus , @zregvart @WillemJiang @stsiano may also
have a comment on it.
@koscejev i may be getting you/your purpose wrong, i guess it would be great
if you can elaborate on the issue and your test case more .
----------------------------------------------------------------
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)