You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/12/23 09:22:25 UTC

[GitHub] [camel] yasserzamani opened a new pull request, #8944: [CAMEL-15111] Fixes bug in camel-as2 via not forcing ascii charset when not specified

yasserzamani opened a new pull request, #8944:
URL: https://github.com/apache/camel/pull/8944

   ... otherwise you will get `java.nio.charset.MalformedInputException: Input length = 1` when content transfer encoding is binary. This PR mainly does AS2SessionInputBuffer.setCharsetDecoder(null) instead when charset is not specified so it doesn't reach MalformedInputException. Then it convert returned result back to byte[] from String when charset is not specified. String were required to find multipart boundaries. Generally this PR keeps previous behavior otherwise, i.e. when charset is specified. It also tests all 8 different situations for encrypt, sign and compress via a parameterized test. as2-lib third-party library is used for these tests as at the moment, binary content transfer encoding is not supported by Camel AS2 client.
   
   - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
   - [x] Each commit in the pull request should have a meaningful subject line and body.
   - [x] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] oscerd commented on a diff in pull request #8944: [CAMEL-15111] Fixes bug in camel-as2 via not forcing ascii charset when not specified

Posted by GitBox <gi...@apache.org>.
oscerd commented on code in PR #8944:
URL: https://github.com/apache/camel/pull/8944#discussion_r1056178400


##########
components/camel-as2/camel-as2-api/pom.xml:
##########
@@ -96,6 +96,13 @@
             <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
+        <!-- added for binary content transfer encoding test because Camel AS2 client doesn't support binary currently -->
+        <dependency>
+            <groupId>com.helger.as2</groupId>
+            <artifactId>as2-lib</artifactId>
+            <version>4.11.0</version>
+            <scope>test</scope>

Review Comment:
   This should be in a property placeholder in parent pom. Don't use a static version inside the component pom



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #8944: [CAMEL-15111] Fixes bug in camel-as2 via not forcing ascii charset when not specified

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8944:
URL: https://github.com/apache/camel/pull/8944#issuecomment-1363839739

   :leftwards_arrow_with_hook: There are either **too many** changes to be tested in this PR or the code **needs be rebased**: (334 components likely to be affected)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #8944: [CAMEL-15111] Fixes bug in camel-as2 via not forcing ascii charset when not specified

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8944:
URL: https://github.com/apache/camel/pull/8944#issuecomment-1363821414

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 1 | 1 | 1 | 0 |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus merged pull request #8944: [CAMEL-15111] Fixes bug in camel-as2 via not forcing ascii charset when not specified

Posted by GitBox <gi...@apache.org>.
davsclaus merged PR #8944:
URL: https://github.com/apache/camel/pull/8944


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] yasserzamani commented on a diff in pull request #8944: [CAMEL-15111] Fixes bug in camel-as2 via not forcing ascii charset when not specified

Posted by GitBox <gi...@apache.org>.
yasserzamani commented on code in PR #8944:
URL: https://github.com/apache/camel/pull/8944#discussion_r1056189327


##########
components/camel-as2/camel-as2-api/pom.xml:
##########
@@ -96,6 +96,13 @@
             <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
+        <!-- added for binary content transfer encoding test because Camel AS2 client doesn't support binary currently -->
+        <dependency>
+            <groupId>com.helger.as2</groupId>
+            <artifactId>as2-lib</artifactId>
+            <version>4.11.0</version>
+            <scope>test</scope>

Review Comment:
   Thanks! There were a lot to do and I forgot to do so while I was going to. Nice catch :+1: fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #8944: [CAMEL-15111] Fixes bug in camel-as2 via not forcing ascii charset when not specified

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8944:
URL: https://github.com/apache/camel/pull/8944#issuecomment-1363775299

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :warning: Please note that the changes on this PR may be **tested automatically**. 
   
   If necessary Apache Camel Committers may access logs and test results in the job summaries!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org