You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/07/11 18:37:16 UTC
[3/3] camel git commit: CAMEL-11423 Fix minor copy/paste issue.
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/7494e48f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7494e48f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7494e48f
Branch: refs/heads/camel-2.19.x
Commit: 7494e48ffc74b19ec0fed4a7f26006df8dd9cce1
Parents: 300974f
Author: Sean Haynes <s....@ieee.org>
Authored: Tue Jul 11 12:08:02 2017 -0400
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jul 11 20:35:57 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/7494e48f/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