Skip to content

Commit

Permalink
Merge pull request #86 from wso2/revert-78-master
Browse files Browse the repository at this point in the history
Revert "Fixing the ESBJAVA-4014 issue"
  • Loading branch information
callkalpa committed Jun 3, 2016
2 parents 48c8804 + 8fc8935 commit a005f95
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions modules/kernel/src/org/apache/axis2/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@

public class Utils {
private static final Log log = LogFactory.getLog(Utils.class);
private static final String LOCAL_TRANSPORT_PREFIX = "local:/";
private static final String HTTP_URL_PREFIX = "http://";
private static final String AXIS2_SERVICE_TEST_PREFIX = "/axis2/services/";

public static void addHandler(Flow flow, Handler handler, String phaseName) {
HandlerDescription handlerDesc = new HandlerDescription(handler.getName());
Expand Down Expand Up @@ -272,22 +269,10 @@ public static String getServiceAndOperationPart(String path, String servicePath)
servicePath = servicePath+"/";
}

//Adding "/" at the beginning of the "servicePath" to check the "paths" which are starting with "servicePath"
if(!servicePath.startsWith("/")){
servicePath = "/"+servicePath;
}

int index = path.lastIndexOf(servicePath);
String serviceOpPart = null;

/* Here we had to check multiple cases to prevent the tests from failing with the fix given to
https://wso2.org/jira/browse/ESBJAVA-4014.
1. Accessing admin services through local transport (local:/AuthenticationAdmin)
2. Dispatching requests coming to "http://127.0.0.1" kind of paths
3. Dispatching requests coming to "10.100.0.37/axis2/services" kind of paths
*/
if (path.startsWith(servicePath) || path.startsWith(LOCAL_TRANSPORT_PREFIX) || path.startsWith(HTTP_URL_PREFIX)
|| path.contains(AXIS2_SERVICE_TEST_PREFIX)) {
int index = path.lastIndexOf(servicePath);
if (-1 != index) {
int serviceStart = index + servicePath.length();

//get the string after services path
Expand Down

0 comments on commit a005f95

Please sign in to comment.