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/06/21 17:54:57 UTC

[GitHub] [cxf] kwin opened a new pull request, #964: CXF-8725: Optionally don't set

kwin opened a new pull request, #964:
URL: https://github.com/apache/cxf/pull/964

   "org.apache.cxf.transport.service_not_available" for 404 responses


-- 
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 #964: CXF-8725: Allow RetryStrategy to optionally not retry for 404 responses

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


-- 
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 #964: CXF-8725: Optionally don't set

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


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java:
##########
@@ -1600,7 +1605,7 @@ protected int doProcessResponseCode() throws IOException {
             }
             if (exchange != null) {
                 exchange.put(Message.RESPONSE_CODE, rc);
-                if (rc == 404 || rc == 503 || rc == 429) {
+                if ((rc == 404 && MessageUtils.getContextualBoolean(outMessage, SERVICE_NOT_AVAILABLE_ON_HTTP_404, true)) || rc == 503 || rc == 429) {

Review Comment:
   Thanks @kwin , I am wondering if we could use list of status codes as contextual property instead (`404`, `503`, `429` being the default)? 



##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java:
##########
@@ -1600,7 +1605,7 @@ protected int doProcessResponseCode() throws IOException {
             }
             if (exchange != null) {
                 exchange.put(Message.RESPONSE_CODE, rc);
-                if (rc == 404 || rc == 503 || rc == 429) {
+                if ((rc == 404 && MessageUtils.getContextualBoolean(outMessage, SERVICE_NOT_AVAILABLE_ON_HTTP_404, true)) || rc == 503 || rc == 429) {

Review Comment:
   Thanks @kwin , I am wondering if we could use list of status codes as contextual property instead (`404`, `503`, `429` being the default)? What do you think?



-- 
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] kwin commented on a diff in pull request #964: CXF-8725: Optionally don't set

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


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java:
##########
@@ -1600,7 +1605,7 @@ protected int doProcessResponseCode() throws IOException {
             }
             if (exchange != null) {
                 exchange.put(Message.RESPONSE_CODE, rc);
-                if (rc == 404 || rc == 503 || rc == 429) {
+                if ((rc == 404 && MessageUtils.getContextualBoolean(outMessage, SERVICE_NOT_AVAILABLE_ON_HTTP_404, true)) || rc == 503 || rc == 429) {

Review Comment:
   Makes sense, I am gonna change the PR



-- 
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] kwin commented on a diff in pull request #964: CXF-8725: Optionally don't set

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


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java:
##########
@@ -1600,7 +1605,7 @@ protected int doProcessResponseCode() throws IOException {
             }
             if (exchange != null) {
                 exchange.put(Message.RESPONSE_CODE, rc);
-                if (rc == 404 || rc == 503 || rc == 429) {
+                if ((rc == 404 && MessageUtils.getContextualBoolean(outMessage, SERVICE_NOT_AVAILABLE_ON_HTTP_404, true)) || rc == 503 || rc == 429) {

Review Comment:
   Done in https://github.com/apache/cxf/pull/964/commits/191bea69cff1ff282d6565d0ba1e4b49daa6d95b



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