axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java
Date Fri, 15 Aug 2003 19:08:17 GMT
stevel      2003/08/15 12:08:17

  Modified:    java/src/org/apache/axis/transport/http AxisServlet.java
  Log:
  Fix out of bounds exception, patch supplied by Shinji Suzuki
  
  Revision  Changes    Path
  1.166     +9 -3      xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- AxisServlet.java	11 Aug 2003 14:20:23 -0000	1.165
  +++ AxisServlet.java	15 Aug 2003 19:08:17 -0000	1.166
  @@ -1045,9 +1045,15 @@
                  return false;
             }
             
  -          serviceName = request.getRequestURI().substring
  -               (request.getRequestURI().indexOf (path) + path.length() + 1);
  -          
  +        String servletURI = request.getContextPath() + path;
  +        String reqURI = request.getRequestURI();
  +        // chop off '/'.
  +        if (servletURI.length() + 1 < reqURI.length()) {
  +            serviceName = reqURI.substring(servletURI.length() + 1);
  +        }
  +        else {
  +            serviceName = "";
  +        }
             while (i.hasNext() == true) {
                  String queryHandler = (String) i.next();
                  
  
  
  

Mime
View raw message