You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/09/19 07:21:43 UTC
[camel] branch camel-2.x updated (dc791f7 -> 6b7cc29)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git.
from dc791f7 Camel-Kubernetes: Fixed CS
new 4fd16b6 CAMEL-13968: resolved HTTP header case sensitivity while parsing
new 6b7cc29 CAMEL-13968 - Fixed CS
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../component/as2/api/entity/EntityParser.java | 45 +++++-----------------
1 file changed, 10 insertions(+), 35 deletions(-)
[camel] 02/02: CAMEL-13968 - Fixed CS
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6b7cc29d0807543a01fc073d3c897284a183a3ad
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Sep 13 15:31:07 2019 +0200
CAMEL-13968 - Fixed CS
---
.../camel/component/as2/api/entity/EntityParser.java | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
index d1fcbd2..49d9220 100644
--- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
+++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
@@ -207,8 +207,7 @@ public final class EntityParser {
for (Header header : headers) {
if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
entityContentType = ContentType.parse(header.getValue());
- }
- else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
+ } else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
entityContentTransferEncoding = header.getValue();
}
}
@@ -517,8 +516,7 @@ public final class EntityParser {
for (Header header : headers) {
if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
signedEntityContentType = ContentType.parse(header.getValue());
- }
- else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
+ } else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
signedEntityContentTransferEncoding = header.getValue();
}
}
@@ -548,8 +546,7 @@ public final class EntityParser {
for (Header header : headers) {
if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
signatureContentType = ContentType.parse(header.getValue());
- }
- else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
+ } else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
signatureContentTransferEncoding = header.getValue();
}
}
@@ -623,8 +620,7 @@ public final class EntityParser {
for (Header header : headers) {
if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
textReportContentType = ContentType.parse(header.getValue());
- }
- else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
+ } else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
textReportContentTransferEncoding = header.getValue();
}
}
@@ -658,8 +654,7 @@ public final class EntityParser {
for (Header header : headers) {
if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
dispositionNotificationContentType = ContentType.parse(header.getValue());
- }
- else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
+ } else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
dispositionNotificationContentTransferEncoding = header.getValue();
}
}
[camel] 01/02: CAMEL-13968: resolved HTTP header case sensitivity
while parsing
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4fd16b65e7492c1868e7d70708177ac00166e2e9
Author: Maurice Betzel <ma...@betzel.net>
AuthorDate: Fri Sep 13 10:01:17 2019 +0200
CAMEL-13968: resolved HTTP header case sensitivity while parsing
---
.../component/as2/api/entity/EntityParser.java | 50 +++++++---------------
1 file changed, 15 insertions(+), 35 deletions(-)
diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
index 9652f5e9..d1fcbd2 100644
--- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
+++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
@@ -205,15 +205,11 @@ public final class EntityParser {
ContentType entityContentType = null;
String entityContentTransferEncoding = null;
for (Header header : headers) {
- switch (header.getName()) {
- case AS2Header.CONTENT_TYPE:
+ if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
entityContentType = ContentType.parse(header.getValue());
- break;
- case AS2Header.CONTENT_TRANSFER_ENCODING:
+ }
+ else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
entityContentTransferEncoding = header.getValue();
- break;
- default:
- continue;
}
}
if (entityContentType == null) {
@@ -519,15 +515,11 @@ public final class EntityParser {
ContentType signedEntityContentType = null;
String signedEntityContentTransferEncoding = null;
for (Header header : headers) {
- switch (header.getName()) {
- case AS2Header.CONTENT_TYPE:
+ if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
signedEntityContentType = ContentType.parse(header.getValue());
- break;
- case AS2Header.CONTENT_TRANSFER_ENCODING:
+ }
+ else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
signedEntityContentTransferEncoding = header.getValue();
- break;
- default:
- continue;
}
}
if (signedEntityContentType == null) {
@@ -554,15 +546,11 @@ public final class EntityParser {
ContentType signatureContentType = null;
String signatureContentTransferEncoding = null;
for (Header header : headers) {
- switch (header.getName()) {
- case AS2Header.CONTENT_TYPE:
+ if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
signatureContentType = ContentType.parse(header.getValue());
- break;
- case AS2Header.CONTENT_TRANSFER_ENCODING:
+ }
+ else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
signatureContentTransferEncoding = header.getValue();
- break;
- default:
- continue;
}
}
if (signatureContentType == null) {
@@ -633,15 +621,11 @@ public final class EntityParser {
ContentType textReportContentType = null;
String textReportContentTransferEncoding = null;
for (Header header : headers) {
- switch (header.getName()) {
- case AS2Header.CONTENT_TYPE:
+ if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
textReportContentType = ContentType.parse(header.getValue());
- break;
- case AS2Header.CONTENT_TRANSFER_ENCODING:
+ }
+ else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
textReportContentTransferEncoding = header.getValue();
- break;
- default:
- continue;
}
}
if (textReportContentType == null) {
@@ -672,15 +656,11 @@ public final class EntityParser {
ContentType dispositionNotificationContentType = null;
String dispositionNotificationContentTransferEncoding = null;
for (Header header : headers) {
- switch (header.getName()) {
- case AS2Header.CONTENT_TYPE:
+ if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TYPE)) {
dispositionNotificationContentType = ContentType.parse(header.getValue());
- break;
- case AS2Header.CONTENT_TRANSFER_ENCODING:
+ }
+ else if (header.getName().equalsIgnoreCase(AS2Header.CONTENT_TRANSFER_ENCODING)) {
dispositionNotificationContentTransferEncoding = header.getValue();
- break;
- default:
- continue;
}
}
if (dispositionNotificationContentType == null) {