Package org.apache.tomcat.util.buf

Examples of org.apache.tomcat.util.buf.MessageBytes.toChars()


            authenticateCC.append(Integer.toString(request.getServerPort()));
        } else {
            authenticateCC.append(config.getRealmName());
        }
        authenticateCC.append('\"');       
        authenticate.toChars();
        response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
        //response.flushBuffer();
        return (false);

    }
View Full Code Here


            }
        } else {
            // The URL is chars or String, and has been sent using an in-memory
            // protocol handler, we have to assume the URL has been properly
            // decoded already
            decodedURI.toChars();
            // Remove any path parameters
            CharChunk uriCC = decodedURI.getCharChunk();
            int semicolon = uriCC.indexOf(';');
            if (semicolon > 0) {
                decodedURI.setChars
View Full Code Here

      else
      {
         // The URL is chars or String, and has been sent using an in-memory
         // protocol handler, we have to assume the URL has been properly
         // decoded already
         decodedURI.toChars();
      }

      return true;

   }
View Full Code Here

            authenticateCC.append(Integer.toString(request.getServerPort()));
         } else {
            authenticateCC.append(config.getRealmName());
         }
         authenticateCC.append('\"');       
         authenticate.toChars();

         response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
      }
      catch (IOException e)
      {
View Full Code Here

      else
      {
         // The URL is chars or String, and has been sent using an in-memory
         // protocol handler, we have to assume the URL has been properly
         // decoded already
         decodedURI.toChars();
      }

      return true;

   }
View Full Code Here

        MappingData mappingData = new MappingData();
        MessageBytes host = MessageBytes.newInstance();
        host.setString("iowejoiejfoiew");
        MessageBytes uri = MessageBytes.newInstance();
        uri.setString("/foo/bar/blah/bobou/foo");
        uri.toChars();
        uri.getCharChunk().setLimit(-1);

        mapper.map(host, uri, null, mappingData);
        assertEquals("blah7", mappingData.host);
        assertEquals("context2", mappingData.context);
View Full Code Here

        assertTrue(mappingData.redirectPath.isNull());

        mappingData.recycle();
        uri.recycle();
        uri.setString("/foo/bar/bla/bobou/foo");
        uri.toChars();
        uri.getCharChunk().setLimit(-1);
        mapper.map(host, uri, null, mappingData);
        assertEquals("blah7", mappingData.host);
        assertEquals("context3", mappingData.context);
        assertEquals("wrapper7", mappingData.wrapper);
View Full Code Here

        MappingData mappingData = new MappingData();
        MessageBytes host = MessageBytes.newInstance();
        host.setString("iowejoiejfoiew");
        MessageBytes uri = MessageBytes.newInstance();
        uri.setString("/foo/bar/blah/bobou/foo");
        uri.toChars();
        uri.getCharChunk().setLimit(-1);

        long start = System.currentTimeMillis();
        for (int i = 0; i < 1000000; i++) {
            mappingData.recycle();
View Full Code Here

        MappingData mappingData = new MappingData();
        MessageBytes host = MessageBytes.newInstance();
        host.setString("iowejoiejfoiew");
        MessageBytes uri = MessageBytes.newInstance();
        uri.setString("/foo/bar/blah/bobou/foo");
        uri.toChars();
        uri.getCharChunk().setLimit(-1);

        mapper.map(host, uri, mappingData);
        System.out.println("MD Host:" + mappingData.host);
        System.out.println("MD Context:" + mappingData.context);
View Full Code Here

                        .addValue(AUTHENTICATE_BYTES, 0, AUTHENTICATE_BYTES.length);
                CharChunk authenticateCC = authenticate.getCharChunk();
                authenticateCC.append("Basic realm=\"");
                authenticateCC.append((realmName == null) ? "<unspecified>" : realmName);
                authenticateCC.append('\"');
                authenticate.toChars();
                response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
                return new AuthResult(TomcatAuthStatus.SEND_CONTINUE, null);
            } catch (IOException e) {
                throw new ServerAuthException(e);
            }
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.