Repository: camel Updated Branches: refs/heads/camel-2.18.x 5db353756 -> b803badce refs/heads/camel-2.19.x 300974fde -> 7494e48ff refs/heads/master f23bdca82 -> 8f7b5e366
CAMEL-11423 Fix minor copy/paste issue. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8f7b5e36 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8f7b5e36 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8f7b5e36 Branch: refs/heads/master Commit: 8f7b5e3668ecb29bcf1578ddc429d26972315b6d Parents: f23bdca Author: Sean Haynes <s.a.hay...@ieee.org> Authored: Tue Jul 11 12:08:02 2017 -0400 Committer: Claus Ibsen <davscl...@apache.org> Committed: Tue Jul 11 20:31:05 2017 +0200 ---------------------------------------------------------------------- .../camel/component/olingo2/api/impl/Olingo2AppImpl.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/8f7b5e36/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java ---------------------------------------------------------------------- diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java index af06775..6ec94fc 100644 --- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java +++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java @@ -802,7 +802,6 @@ public final class Olingo2AppImpl implements Olingo2App { if (!headers.containsKey(HttpHeaders.ACCEPT_CHARSET) && (null != charset)) { headers.put(HttpHeaders.ACCEPT_CHARSET, charset.name().toLowerCase()); } - return BatchQueryPart.method("GET") .uri(createBatchUri(batchRequest)) @@ -1028,15 +1027,15 @@ public final class Olingo2AppImpl implements Olingo2App { && !contentType.getMimeType().startsWith(MULTIPART_MIME_TYPE)) { // otherwise accept what is being sent httpUriRequest.addHeader(HttpHeaders.ACCEPT, contentType.withCharset("").toString().toLowerCase()); + final Charset charset = contentType.getCharset(); + if (null != charset) { + httpUriRequest.addHeader(HttpHeaders.ACCEPT_CHARSET, charset.name().toLowerCase()); + } } // is something being sent? if (httpUriRequest instanceof HttpEntityEnclosingRequestBase && httpUriRequest.getFirstHeader(HttpHeaders.CONTENT_TYPE) == null) { httpUriRequest.addHeader(HttpHeaders.CONTENT_TYPE, contentType.toString()); - final Charset charset = contentType.getCharset(); - if (null != charset) { - httpUriRequest.addHeader(HttpHeaders.ACCEPT_CHARSET, charset.name().toLowerCase()); - } } // set user specified custom headers