You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "JiriOndrusek (via GitHub)" <gi...@apache.org> on 2023/03/03 14:13:23 UTC

[GitHub] [camel] JiriOndrusek opened a new pull request, #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated does not work

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

   fixes https://issues.apache.org/jira/browse/CAMEL-19113
   
   It would be nice to apply this fix also for `camel-3.18.x` branch.
   
   # Description
   
   <!--
   - Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   -->
   
   # Target
   
   - [ ] I checked that the commit is targeting the correct branch (note that Camel 3 uses `camel-3.x`, whereas Camel 4 uses the `main` branch)
   
   # Tracking
   - [ ] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).
   
   <!--
   # *Note*: trivial changes like, typos, minor documentation fixes and other small items do not require a JIRA issue. In this case your pull request should address just this issue, without pulling in other changes.
   -->
   
   # Apache Camel coding standards and style
   
   - [ ] I checked that each commit in the pull request has a meaningful subject line and body.
   
   <!--  
   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.
   -->
   
   - [ ] I formatted the code using `mvn -Pformat,fastinstall install && mvn -Psourcecheck`
   
   <!-- 
   You can run the aforementioned command in your module so that the build auto-formats your code and the source check verifies that is complies with our coding style. This will also be verified as part of the checks and your PR may be rejected if the checkstyle does not pass.
   
   You can learn more about the contribution guidelines at 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] github-actions[bot] commented on pull request #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated does not work

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1453593862

   :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


[GitHub] [camel] github-actions[bot] commented on pull request #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1457743472

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


-- 
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] JiriOndrusek commented on pull request #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1458007714

   PRs: https://github.com/apache/camel/pull/9473, https://github.com/apache/camel/pull/9474, https://github.com/apache/camel/pull/9475


-- 
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 commented on pull request #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1457857787

   @JiriOndrusek can you backport this to camel-3.x, camel-3.20.x and camel-3.18.x branches.


-- 
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 #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1457758152

   :leftwards_arrow_with_hook: There are either **too many** changes to be tested in this PR or the code **needs be rebased**: (30 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 #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1456524073

   :leftwards_arrow_with_hook: There are either **too many** changes to be tested in this PR or the code **needs be rebased**: (29 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 #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1453660799

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


-- 
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] JiriOndrusek commented on pull request #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1453704268

   make sense, I'll add the same functionality for produces and cover it with tests.


-- 
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] JiriOndrusek commented on a diff in pull request #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on code in PR #9465:
URL: https://github.com/apache/camel/pull/9465#discussion_r1127455245


##########
components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpConsumer.java:
##########
@@ -111,10 +111,16 @@ protected void doStart() throws Exception {
         }
 
         if (getEndpoint().getConsumes() != null) {
-            newRoute.consumes(getEndpoint().getConsumes());
+            //comma separated contentTypes has to be registered one by one
+            for (String c : getEndpoint().getConsumes().split(",")) {
+                newRoute.consumes(c);
+            }
         }
         if (getEndpoint().getProduces() != null) {
-            newRoute.produces(getEndpoint().getProduces());
+            //comma separated contentTypes has to be registered one by one
+            for (String c : getEndpoint().getProduces().split(",")) {

Review Comment:
   Copy-paste error. It's fixed now.



-- 
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 #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1456529884

   :leftwards_arrow_with_hook: There are either **too many** changes to be tested in this PR or the code **needs be rebased**: (29 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] jamesnetherton commented on pull request #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1453624761

   I guess we should also do the same for `produces`.
   
   


-- 
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] JiriOndrusek commented on pull request #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on PR #9465:
URL: https://github.com/apache/camel/pull/9465#issuecomment-1456414254

   Handling of `produces`  (+test) is added. PR could be merged.


-- 
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 commented on a diff in pull request #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #9465:
URL: https://github.com/apache/camel/pull/9465#discussion_r1126707368


##########
components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpConsumer.java:
##########
@@ -111,10 +111,16 @@ protected void doStart() throws Exception {
         }
 
         if (getEndpoint().getConsumes() != null) {
-            newRoute.consumes(getEndpoint().getConsumes());
+            //comma separated contentTypes has to be registered one by one
+            for (String c : getEndpoint().getConsumes().split(",")) {
+                newRoute.consumes(c);
+            }
         }
         if (getEndpoint().getProduces() != null) {
-            newRoute.produces(getEndpoint().getProduces());
+            //comma separated contentTypes has to be registered one by one
+            for (String c : getEndpoint().getProduces().split(",")) {

Review Comment:
   You may want to call this `p`



-- 
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 #9465: CAMEL-19113 Platform-http-vertx: consume with comma separated values does not work

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #9465:
URL: https://github.com/apache/camel/pull/9465


-- 
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