Package org.apache.tomcat.util.buf

Examples of org.apache.tomcat.util.buf.ByteChunk.indexOf()


        index = 0;

        // Resolve occurrences of "/../" in the normalized path
        while (true) {
            index = uriBC.indexOf("/../", 0, 4, index);
            if (index < 0)
                break;
            // Prevent from going outside our context
            if (index == 0)
                return false;
View Full Code Here


      index = 0;

      // Resolve occurrences of "/./" in the normalized path
      while(true)
      {
         index = uriBC.indexOf("/./", 0, 3, index);
         if(index < 0)
         {
            break;
         }
         copyBytes(b, start + index, start + index + 2,
View Full Code Here

      index = 0;

      // Resolve occurrences of "/../" in the normalized path
      while(true)
      {
         index = uriBC.indexOf("/../", 0, 4, index);
         if(index < 0)
         {
            break;
         }
         // Prevent from going outside our context
View Full Code Here

      index = 0;

      // Resolve occurrences of "/./" in the normalized path
      while(true)
      {
         index = uriBC.indexOf("/./", 0, 3, index);
         if(index < 0)
         {
            break;
         }
         copyBytes(b, start + index, start + index + 2,
View Full Code Here

      index = 0;

      // Resolve occurrences of "/../" in the normalized path
      while(true)
      {
         index = uriBC.indexOf("/../", 0, 4, index);
         if(index < 0)
         {
            break;
         }
         // Prevent from going outside our context
View Full Code Here

        // Check for a full URI (including protocol://host:port/)
        ByteChunk uriBC = request.requestURI().getByteChunk();
        if (uriBC.startsWithIgnoreCase("http", 0)) {

            int pos = uriBC.indexOf("://", 0, 3, 4);
            int uriBCStart = uriBC.getStart();
            int slashPos = -1;
            if (pos != -1) {
                byte[] uriB = uriBC.getBytes();
                slashPos = uriBC.indexOf('/', pos + 3);
View Full Code Here

            int pos = uriBC.indexOf("://", 0, 3, 4);
            int uriBCStart = uriBC.getStart();
            int slashPos = -1;
            if (pos != -1) {
                byte[] uriB = uriBC.getBytes();
                slashPos = uriBC.indexOf('/', pos + 3);
                if (slashPos == -1) {
                    slashPos = uriBC.getLength();
                    // Set URI as "/"
                    request.requestURI().setBytes
                        (uriB, uriBCStart + pos + 1, 1);
View Full Code Here

        // Check for a full URI (including protocol://host:port/)
        ByteChunk uriBC = request.requestURI().getByteChunk();
        if (uriBC.startsWithIgnoreCase("http", 0)) {

            int pos = uriBC.indexOf("://", 0, 3, 4);
            int uriBCStart = uriBC.getStart();
            int slashPos = -1;
            if (pos != -1) {
                byte[] uriB = uriBC.getBytes();
                slashPos = uriBC.indexOf('/', pos + 3);
View Full Code Here

            int pos = uriBC.indexOf("://", 0, 3, 4);
            int uriBCStart = uriBC.getStart();
            int slashPos = -1;
            if (pos != -1) {
                byte[] uriB = uriBC.getBytes();
                slashPos = uriBC.indexOf('/', pos + 3);
                if (slashPos == -1) {
                    slashPos = uriBC.getLength();
                    // Set URI as "/"
                    request.requestURI().setBytes
                        (uriB, uriBCStart + pos + 1, 1);
View Full Code Here

        // Check for a full URI (including protocol://host:port/)
        ByteChunk uriBC = request.requestURI().getByteChunk();
        if (uriBC.startsWithIgnoreCase("http", 0)) {

            int pos = uriBC.indexOf("://", 0, 3, 4);
            int uriBCStart = uriBC.getStart();
            int slashPos = -1;
            if (pos != -1) {
                byte[] uriB = uriBC.getBytes();
                slashPos = uriBC.indexOf('/', pos + 3);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.