You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2022/08/18 09:04:09 UTC

[GitHub] [cxf] ypiel-talend opened a new pull request, #987: feat(CXF-8752): list of redirectable verbs configurable.

ypiel-talend opened a new pull request, #987:
URL: https://github.com/apache/cxf/pull/987

   https://issues.apache.org/jira/browse/CXF-8752


-- 
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: dev-unsubscribe@cxf.apache.org

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


[GitHub] [cxf] reta merged pull request #987: feat(CXF-8752): list of redirectable verbs configurable.

Posted by GitBox <gi...@apache.org>.
reta merged PR #987:
URL: https://github.com/apache/cxf/pull/987


-- 
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: dev-unsubscribe@cxf.apache.org

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


[GitHub] [cxf] ypiel-talend commented on a diff in pull request #987: feat(CXF-8752): list of redirectable verbs configurable.

Posted by GitBox <gi...@apache.org>.
ypiel-talend commented on code in PR #987:
URL: https://github.com/apache/cxf/pull/987#discussion_r957273658


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java:
##########
@@ -1427,9 +1432,22 @@ private <T extends Exception> T mapException(String msg,
          * @throws IOException
          */
         protected void handleRetransmits() throws IOException {
+
+            String defaultVerbs = KNOWN_HTTP_VERBS_WITH_NO_CONTENT.stream().collect(Collectors.joining(","));

Review Comment:
   Thanks, you're right.
   Done : https://github.com/apache/cxf/pull/987/commits/af29d1e467a36726d4f8a6f1ee8eab5668f4806e



-- 
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: dev-unsubscribe@cxf.apache.org

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


[GitHub] [cxf] ypiel-talend commented on a diff in pull request #987: feat(CXF-8752): list of redirectable verbs configurable.

Posted by GitBox <gi...@apache.org>.
ypiel-talend commented on code in PR #987:
URL: https://github.com/apache/cxf/pull/987#discussion_r957273658


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java:
##########
@@ -1427,9 +1432,22 @@ private <T extends Exception> T mapException(String msg,
          * @throws IOException
          */
         protected void handleRetransmits() throws IOException {
+
+            String defaultVerbs = KNOWN_HTTP_VERBS_WITH_NO_CONTENT.stream().collect(Collectors.joining(","));

Review Comment:
   Thanks, you're right.
   Done : https://github.com/apache/cxf/pull/987/commits/af29d1e467a36726d4f8a6f1ee8eab5668f4806e



-- 
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: dev-unsubscribe@cxf.apache.org

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


[GitHub] [cxf] reta commented on a diff in pull request #987: feat(CXF-8752): list of redirectable verbs configurable.

Posted by GitBox <gi...@apache.org>.
reta commented on code in PR #987:
URL: https://github.com/apache/cxf/pull/987#discussion_r949412124


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java:
##########
@@ -1427,9 +1432,22 @@ private <T extends Exception> T mapException(String msg,
          * @throws IOException
          */
         protected void handleRetransmits() throws IOException {
+
+            String defaultVerbs = KNOWN_HTTP_VERBS_WITH_NO_CONTENT.stream().collect(Collectors.joining(","));

Review Comment:
   @ypiel-talend could you please add `getContextualStrings` to `MessageUtils` class (where we have a set of helper methods to deal with contextual properties):
   
   ```
       public static Set<String> getContextualStrings(Message m, String key, Set<String> defaultValue) {
           if (m != null) {
               Object o = m.getContextualProperty(key);
               if (o instanceof String) {
                   Set<String> values = new TreeSet<>();
                   for (String value : ((String) o).split(",")) {
                       if (!StringUtils.isEmpty(value)) {
                           values.add(value.trim());
                       }
                   }
                   return values;
               }
           }
           return defaultValue;
       }
   ```
   
   In this case, your implementation would be just:
   
   ```
               final Set<String> allowedVerbsSet = MessageUtils
                       .getContextualStrings(outMessage, AUTHORIZED_REDIRECTED_HTTP_VERBS, 
                           KNOWN_HTTP_VERBS_WITH_NO_CONTENT);
   ```
   
   Thank you.



-- 
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: dev-unsubscribe@cxf.apache.org

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


[GitHub] [cxf] reta commented on pull request #987: feat(CXF-8752): list of redirectable verbs configurable.

Posted by GitBox <gi...@apache.org>.
reta commented on PR #987:
URL: https://github.com/apache/cxf/pull/987#issuecomment-1219747736

   > Looks OK to me, if we can add a test for it. @reta any major objections?
   
   Left a comment, also agree that tests are needed, thanks @coheigea !


-- 
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: dev-unsubscribe@cxf.apache.org

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