Hi,

Please review and commit the attached patch(axis2.diff)

Related jira: https://wso2.org/jira/browse/ESBJAVA-3178

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/
<http://wso2.com/about/team/malaka-silva/>

Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
Index: 
dependencies/axis2/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
===================================================================
--- 
dependencies/axis2/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
       (revision 205944)
+++ 
dependencies/axis2/modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java
       (working copy)
@@ -41,6 +41,7 @@
 
 import java.io.IOException;
 import java.net.URL;
+import java.util.Set;
 
 public class HTTPSender extends AbstractHTTPSender {
 
@@ -266,6 +267,7 @@
         int statusCode = method.getStatusCode();
         HTTPStatusCodeFamily family = getHTTPStatusCodeFamily(statusCode);
         log.trace("Handling response - " + statusCode);
+        Set<Integer>nonErrorCodes = (Set<Integer>) 
msgContext.getProperty("non.error.http.status.codes"); // Fixing ESBJAVA-3178   
     
         if (statusCode == HttpStatus.SC_ACCEPTED) {
                /* When an HTTP 202 Accepted code has been received, this will 
be the case of an execution 
                 * of an in-only operation. In such a scenario, the HTTP 
response headers should be returned,
@@ -305,6 +307,10 @@
                          String.valueOf(statusCode),
                          method.getStatusText()));
             }
+        } else if (nonErrorCodes != null && 
nonErrorCodes.contains(statusCode)) {
+            msgContext.setProperty(HTTPConstants.HTTP_METHOD, method);
+            processResponse(method, msgContext);
+            return;
         } else {
             // Since we don't process the response, we must release the 
connection immediately
             method.releaseConnection();
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to