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

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

GitHub user convoi opened a pull request:

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

    CAMEL-11671 dont rebuild the request and respect url encoding of the 
original request

    imho it makes no sense to rebuild the request. the prepare methods are 
mostly used for a) prototyped requests or b) simplified requests in form of 
simple urls.
    we however already have a prepared request (not a prototype).


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

    $ git pull https://github.com/convoi/camel master

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

    https://github.com/apache/camel/pull/1892.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 #1892
    
----
commit 03b3a4dcd8f211a50bb28f5073bcab20f492c83a
Author: Justin Heesemann <[email protected]>
Date:   2017-08-15T11:30:00Z

    CAMEL-11671 dont rebuild the request and respect url encoding of the 
original request

----


> camel-ahc - No way to disable url encoding
> ------------------------------------------
>
>                 Key: CAMEL-11671
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11671
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ahc
>    Affects Versions: 2.19.1
>            Reporter: Justin Heesemann
>
> There currently seems to be now way to really disable url encoding for ahc 
> urls with query parameters.
> I even tried to use my own ahc binding.
> The problem seems to be, that the AhcProducer uses this section:
> {code}
>  public boolean process(Exchange exchange, AsyncCallback callback) {
>         try {
>             // AHC supports async processing
>             Request request = 
> getEndpoint().getBinding().prepareRequest(getEndpoint(), exchange);
>             log.debug("Executing request {} ", request);
>             client.prepareRequest(request).execute(new 
> AhcAsyncHandler(exchange, callback, request.getUrl(), 
> getEndpoint().getBufferSize()));
>             return false;
>         } catch (Exception e) {
>             exchange.setException(e);
>             callback.done(true);
>             return true;
>         }
>     }
> {code}
> By calling {{client.prepareRequest(request)}} the already created request 
> will be turned again into a request builder with enabled url encoding.
> From my perspective this makes no sense:
> # we could already return a request builder from the AhcBinding, which would 
> save us some processing time
> # the settings on this request builder would then not be overriden 
> But I can see this would be a breaking change in the API of the AhcBinding.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to