@Test public void testLongHeader() throws Exception { URL url = new URL(baseUrl, "/longheader"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); StringBuilder sb = new StringBuilder(); for (int i = 0 ; i < 63 * 1024; i++) { sb.append("a"); } conn.setRequestProperty("longheader", sb.toString()); assertEquals(HttpURLConnection.HTTP_OK, conn.getResponseCode()); }
@Override public String toString() { if (listeners.size() == 0) { return "Inactive HttpServer"; } else { StringBuilder sb = new StringBuilder("HttpServer (") .append(isAlive() ? STATE_DESCRIPTION_ALIVE : STATE_DESCRIPTION_NOT_LIVE).append("), listening at:"); for (ListenerInfo li : listeners) { Connector l = li.listener; sb.append(l.getHost()).append(":").append(l.getPort()).append("/,"); } return sb.toString(); } }
HttpServer implements FilterContainer { @Override public String toString() { if (listeners.size() == 0) { return "Inactive HttpServer"; } else { StringBuilder sb = new StringBuilder("HttpServer (") .append(isAlive() ? STATE_DESCRIPTION_ALIVE : STATE_DESCRIPTION_NOT_LIVE).append("), listening at:"); for (ListenerInfo li : listeners) { Connector l = li.listener; sb.append(l.getHost()).append(":").append(l.getPort()).append("/,"); } return sb.toString(); } } }
HttpServer implements FilterContainer { @Override public String toString() { if (listeners.size() == 0) { return "Inactive HttpServer"; } else { StringBuilder sb = new StringBuilder("HttpServer (") .append(isAlive() ? STATE_DESCRIPTION_ALIVE : STATE_DESCRIPTION_NOT_LIVE).append("), listening at:"); for (ListenerInfo li : listeners) { Connector l = li.listener; sb.append(l.getHost()).append(":").append(l.getPort()).append("/,"); } return sb.toString(); } } @Deprecated  HttpServer(String name, String bindAddress, int port, boolean findPort
      ); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, Connector connector); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, String[] pathSpecs); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, AccessControlList adminsAcl); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, AccessControlList adminsAcl, 
      Connector connector); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, AccessControlList adminsAcl, 
      Connector connector, String[] pathSpecs); private  HttpServer(final Builder b); }
HttpServer implements FilterContainer { @Override public String toString() { if (listeners.size() == 0) { return "Inactive HttpServer"; } else { StringBuilder sb = new StringBuilder("HttpServer (") .append(isAlive() ? STATE_DESCRIPTION_ALIVE : STATE_DESCRIPTION_NOT_LIVE).append("), listening at:"); for (ListenerInfo li : listeners) { Connector l = li.listener; sb.append(l.getHost()).append(":").append(l.getPort()).append("/,"); } return sb.toString(); } } @Deprecated  HttpServer(String name, String bindAddress, int port, boolean findPort
      ); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, Connector connector); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, String[] pathSpecs); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, AccessControlList adminsAcl); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, AccessControlList adminsAcl, 
      Connector connector); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, AccessControlList adminsAcl, 
      Connector connector, String[] pathSpecs); private  HttpServer(final Builder b); Connector createBaseListener(Configuration conf); @InterfaceAudience.Private static Connector createDefaultChannelConnector(); void addContext(Context ctxt, boolean isFiltered); void setAttribute(String name, Object value); void addJerseyResourcePackage(final String packageName,
      final String pathSpec); void addServlet(String name, String pathSpec,
      Class<? extends HttpServlet> clazz); void addInternalServlet(String name, String pathSpec,
      Class<? extends HttpServlet> clazz); void addInternalServlet(String name, String pathSpec, 
      Class<? extends HttpServlet> clazz, boolean requireAuth); @Override void addFilter(String name, String classname,
      Map<String, String> parameters); @Override void addGlobalFilter(String name, String classname,
      Map<String, String> parameters); static void defineFilter(Context ctx, String name,
      String classname, Map<String,String> parameters, String[] urls); Object getAttribute(String name); WebAppContext getWebAppContext(); String getWebAppsPath(String appName); @Deprecated int getPort(); InetSocketAddress getConnectorAddress(int index); void setThreads(int min, int max); void start(); void stop(); void join(); boolean isAlive(); @Override String toString(); static boolean isInstrumentationAccessAllowed(
    ServletContext servletContext, HttpServletRequest request,
    HttpServletResponse response); static boolean hasAdministratorAccess(
      ServletContext servletContext, HttpServletRequest request,
      HttpServletResponse response); static boolean userHasAdministratorAccess(ServletContext servletContext,
      String remoteUser); }
HttpServer implements FilterContainer { @Override public String toString() { if (listeners.size() == 0) { return "Inactive HttpServer"; } else { StringBuilder sb = new StringBuilder("HttpServer (") .append(isAlive() ? STATE_DESCRIPTION_ALIVE : STATE_DESCRIPTION_NOT_LIVE).append("), listening at:"); for (ListenerInfo li : listeners) { Connector l = li.listener; sb.append(l.getHost()).append(":").append(l.getPort()).append("/,"); } return sb.toString(); } } @Deprecated  HttpServer(String name, String bindAddress, int port, boolean findPort
      ); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, Connector connector); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, String[] pathSpecs); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, AccessControlList adminsAcl); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, AccessControlList adminsAcl, 
      Connector connector); @Deprecated  HttpServer(String name, String bindAddress, int port,
      boolean findPort, Configuration conf, AccessControlList adminsAcl, 
      Connector connector, String[] pathSpecs); private  HttpServer(final Builder b); Connector createBaseListener(Configuration conf); @InterfaceAudience.Private static Connector createDefaultChannelConnector(); void addContext(Context ctxt, boolean isFiltered); void setAttribute(String name, Object value); void addJerseyResourcePackage(final String packageName,
      final String pathSpec); void addServlet(String name, String pathSpec,
      Class<? extends HttpServlet> clazz); void addInternalServlet(String name, String pathSpec,
      Class<? extends HttpServlet> clazz); void addInternalServlet(String name, String pathSpec, 
      Class<? extends HttpServlet> clazz, boolean requireAuth); @Override void addFilter(String name, String classname,
      Map<String, String> parameters); @Override void addGlobalFilter(String name, String classname,
      Map<String, String> parameters); static void defineFilter(Context ctx, String name,
      String classname, Map<String,String> parameters, String[] urls); Object getAttribute(String name); WebAppContext getWebAppContext(); String getWebAppsPath(String appName); @Deprecated int getPort(); InetSocketAddress getConnectorAddress(int index); void setThreads(int min, int max); void start(); void stop(); void join(); boolean isAlive(); @Override String toString(); static boolean isInstrumentationAccessAllowed(
    ServletContext servletContext, HttpServletRequest request,
    HttpServletResponse response); static boolean hasAdministratorAccess(
      ServletContext servletContext, HttpServletRequest request,
      HttpServletResponse response); static boolean userHasAdministratorAccess(ServletContext servletContext,
      String remoteUser); static final Log LOG; static final String CONF_CONTEXT_ATTRIBUTE; static final String ADMINS_ACL; static final String BIND_ADDRESS; static final String SPNEGO_FILTER; static final String NO_CACHE_FILTER; static final String APP_DIR; }