[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-12-19 Thread JIRA


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

Önder Sezgin commented on CAMEL-11658:
--

When new PR to open , please consider the PR below to reproduce.

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

> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-11-19 Thread ASF GitHub Bot (JIRA)


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

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-439881399
 
 
   tested with master, the issue is still there.  The possible workaround is to 
encode your uri with a processor before calling the producer endpoint 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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-11-19 Thread ASF GitHub Bot (JIRA)


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

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-439875995
 
 
   Anyone one looking into possible solution around this or is this already 
resolved?


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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-06-18 Thread ASF GitHub Bot (JIRA)


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

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. 
   what @zregvart  suggested looks like a good idea to me as well. 
   @davsclaus might want to comment too.
   As a conclusion, i want to have this closed and mark the issue as improved 
rather than a bug.


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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-06-18 Thread ASF GitHub Bot (JIRA)


[ 
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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-05-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11658:


koscejev commented on issue #1938: CAMEL-11658: test for RestletProducer 
handling unencoded headers
URL: https://github.com/apache/camel/pull/1938#issuecomment-388612844
 
 
   This is how it worked before some recent changes in 2.19.0: 
   1. Header was added to URL
   2. Restlet encoded the full URL, so that it's valid
   3. Full URL is used
   
   Now, nothing was actually changed in these 3 steps, so it essentially works 
the same, BUT there's a new side-effect step that tries to construct URL 
manually without encoding and without getting the URL that Restlet is 
*actually* using. This step fails whenever URL contains invalid characters 
(that Restlet was and still is handling) due to headers.
   
   In my opinion this is a regression and a regrettable one. It's not even a 
change in behavior, whether wanted or not, it's just broken.
   
   However, it also highlights another issue with these headers, such as being 
able to break other functionality (like providing HTTP_QUERY header) by using 
certain headers. Not only it's not documented, but it's extremely 
counter-intuitive. E.g., according to documentation you can use HTTP_QUERY 
header to provide the query params, but if a header used in your path param 
contains `?` character, then this functionality will not work and other 
documented stuff will just break in unexpected ways.


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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-05-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11658:


koscejev commented on issue #1938: CAMEL-11658: test for RestletProducer 
handling unencoded headers
URL: https://github.com/apache/camel/pull/1938#issuecomment-388612844
 
 
   This is how it worked before some recent changes in 2.19.0: 
   1. Header was added to URL
   2. Restlet encoded the full URL, so that it's valid
   3. Full URL is used
   
   Now, nothing was actually changed in these 3 steps, so it essentially works 
the same, BUT there's a new step that tries to construct URL manually without 
encoding and without getting the URL that Restlet is *actually* using. This 
step fails whenever URL contains invalid characters (that Restlet was and still 
is handling) due to headers.
   
   In my opinion this is a regression and a regrettable one. It's not even a 
change in behavior, whether wanted or not, it's just broken.
   
   However, it also highlights another issue with these headers, such as being 
able to break other functionality (like providing HTTP_QUERY header) by using 
certain headers. Not only it's not documented, but it's extremely 
counter-intuitive. E.g., according to documentation you can use HTTP_QUERY 
header to provide the query params, but if a header used in your path param 
contains `?` character, then this functionality will not work and other 
documented stuff will just break in unexpected ways.


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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-05-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11658:


zregvart commented on issue #1938: CAMEL-11658: test for RestletProducer 
handling unencoded headers
URL: https://github.com/apache/camel/pull/1938#issuecomment-388291007
 
 
   Sorry, got lost in my GitHub notifications. Seems to me that can either:
- encode the URL placeholder parameters and by that loose the ability to 
specify query parameters in the placeholders. So you can't use something like 
`http://example.com/{query}` and have `query` equal `?q=something`, and make 
the users use `RAW(?q=something)`
- introduce a helper syntax similar to `RAW` but for encoding URL 
parameters, something like `http://example.com/ENC({query})`
- leave as is and make the user URL encode the parameter as needed
   
   Either way there are some cons and pros, we should think about not breaking 
backward compatibility I think, so if we URL encoded before we can do that now.
   
   2c


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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-05-09 Thread ASF GitHub Bot (JIRA)

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

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-387953782
 
 
   guys, any comment?


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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-05-08 Thread ASF GitHub Bot (JIRA)

[ 
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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-05-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11658:


koscejev commented on issue #1938: CAMEL-11658: test for RestletProducer 
handling unencoded headers
URL: https://github.com/apache/camel/pull/1938#issuecomment-387057433
 
 
   @onderson, perhaps I used incorrect test class for this, but this is about 
using unencoded header values as path param, not query param. The test already 
does this for `username` header used as path param, so I simply reused this.
   
   Normally Camel internals are protocol-agnostic, so I would expect it will 
encode/decode header as required by the protocol, not just fail due to some 
values.


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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2018-05-07 Thread ASF GitHub Bot (JIRA)

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

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-387052035
 
 
   @koscejev , what's the use case for providing unencoded uri in http query?


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:
us...@infra.apache.org


> 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)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2017-09-18 Thread Anton Koscejev (JIRA)

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

Anton Koscejev commented on CAMEL-11658:


I've submitted a unit test as a PR (see above). 

The regression is only for some characters (such as space). Other characters 
actually didn't work very well before (question mark "?" could cause other 
parts of path to become query, etc.).

> 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
>
> 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
(v6.4.14#64029)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2017-09-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-11658:


GitHub user koscejev opened a pull request:

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

CAMEL-11658: test for RestletProducer handling unencoded headers

This is just a unit test showing how a header with characters that are not 
allowed in URI path will cause a failure within RestletProducer.

CAMEL-11658: The regression is only for some characters (such as space). 
Other characters actually didn't work very well before (question mark "?" could 
cause other parts of path to become query, etc.).

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

$ git pull https://github.com/koscejev/camel CAMEL-11658

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

https://github.com/apache/camel/pull/1938.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 #1938


commit cd5f51ddb9d30aaa2161f6a11c1d45ea97d5978b
Author: Anton Koscejev 
Date:   2017-09-18T16:49:48Z

CAMEL-11658: test for RestletProducer handling unencoded headers




> 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
>
> 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
(v6.4.14#64029)


[jira] [Commented] (CAMEL-11658) URISyntaxException in RestletProducer

2017-09-12 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-11658:
-

Do you have a sample project or unit test that better highlight this problem?

> 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
>
> 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
(v6.4.14#64029)