當前位置: 首頁>>代碼示例>>Java>>正文


Java HttpConfiguration.setSendXPoweredBy方法代碼示例

本文整理匯總了Java中org.eclipse.jetty.server.HttpConfiguration.setSendXPoweredBy方法的典型用法代碼示例。如果您正苦於以下問題:Java HttpConfiguration.setSendXPoweredBy方法的具體用法?Java HttpConfiguration.setSendXPoweredBy怎麽用?Java HttpConfiguration.setSendXPoweredBy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jetty.server.HttpConfiguration的用法示例。


在下文中一共展示了HttpConfiguration.setSendXPoweredBy方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: generateJettyHttpConfiguration

import org.eclipse.jetty.server.HttpConfiguration; //導入方法依賴的package包/類
private HttpConfiguration generateJettyHttpConfiguration( ConnectorConfiguration theConfiguration ) {
	HttpConfiguration httpConfiguration = new HttpConfiguration();

	if( theConfiguration.getHeaderCacheSize( ) != null ) {
		httpConfiguration.setHeaderCacheSize( theConfiguration.getHeaderCacheSize( ) );
	}
	if( theConfiguration.getRequestHeaderSize( ) != null ) {
		httpConfiguration.setRequestHeaderSize( theConfiguration.getRequestHeaderSize( ) );
	}
	if( theConfiguration.getResponseHeaderSize( ) != null ) {
		httpConfiguration.setResponseHeaderSize( theConfiguration.getResponseHeaderSize( ) );
	}
	if( theConfiguration.getOutputBufferSize( ) != null ) {
		httpConfiguration.setOutputBufferSize( theConfiguration.getOutputBufferSize( ) );
	}
	httpConfiguration.setSendDateHeader( false ); // TODO: verify if I should manually do this, and in what way this sets it (UTC, local, etc)
	httpConfiguration.setSendServerVersion( false );
	httpConfiguration.setSendXPoweredBy( false );

	return httpConfiguration;
}
 
開發者ID:Talvish,項目名稱:Tales,代碼行數:22,代碼來源:HttpInterfaceBase.java

示例2: createConfiguration

import org.eclipse.jetty.server.HttpConfiguration; //導入方法依賴的package包/類
/**
 * Creates a Jetty HTTP configuration.
 * 
 * @return A Jetty HTTP configuration.
 */
private HttpConfiguration createConfiguration()
{
	final HttpConfiguration configuration = new HttpConfiguration();
	configuration.setHeaderCacheSize( getHttpHeaderCacheSize() );
	configuration.setRequestHeaderSize( getHttpRequestHeaderSize() );
	configuration.setResponseHeaderSize( getHttpResponseHeaderSize() );
	configuration.setOutputBufferSize( getHttpOutputBufferSize() );
	configuration.setDelayDispatchUntilContent( getHttpDelayDispatchUntilContent() );
	configuration.setOutputAggregationSize( getHttpOutputAggregationSize() );
	configuration.setPersistentConnectionsEnabled( getHttpPersistentConnectionsEnabled() );
	configuration.setSendDateHeader( getHttpSendDateHeader() );
	configuration.setSendServerVersion( getHttpSendVersionHeader() );
	configuration.setSendXPoweredBy( getHttpSendXPoweredBy() );
	return configuration;
}
 
開發者ID:tliron,項目名稱:restlet-jetty9,代碼行數:21,代碼來源:JettyServerHelper.java

示例3: get

import org.eclipse.jetty.server.HttpConfiguration; //導入方法依賴的package包/類
@Override
public HttpConfiguration get() {
  HttpConfiguration configuration = new HttpConfiguration();
  configuration.setSendXPoweredBy(false);
  configuration.setSendServerVersion(false);
  return configuration;
}
 
開發者ID:sorskod,項目名稱:webserver,代碼行數:8,代碼來源:HttpConfigurationProvider.java

示例4: newHttpConnectionFactory

import org.eclipse.jetty.server.HttpConfiguration; //導入方法依賴的package包/類
private HttpConnectionFactory newHttpConnectionFactory() {
    HttpConfiguration httpConfig = new HttpConfiguration();
    httpConfig.setSendDateHeader(true);
    httpConfig.setSendServerVersion(false);
    httpConfig.setSendXPoweredBy(false);
    httpConfig.setHeaderCacheSize(connectorConfig.headerCacheSize());
    httpConfig.setOutputBufferSize(connectorConfig.outputBufferSize());
    httpConfig.setRequestHeaderSize(connectorConfig.requestHeaderSize());
    httpConfig.setResponseHeaderSize(connectorConfig.responseHeaderSize());
    if (connectorConfig.ssl().enabled()) {
        httpConfig.addCustomizer(new SecureRequestCustomizer());
    }
    return new HttpConnectionFactory(httpConfig);
}
 
開發者ID:vespa-engine,項目名稱:vespa,代碼行數:15,代碼來源:ConnectorFactory.java

示例5: createHttpConfiguration

import org.eclipse.jetty.server.HttpConfiguration; //導入方法依賴的package包/類
private static HttpConfiguration createHttpConfiguration() {
    HttpConfiguration config = new HttpConfiguration();
    config.setSecureScheme("https");
    config.setSecurePort(SSL_PORT);
    config.setSendXPoweredBy(false);
    config.setSendServerVersion(false);
    config.addCustomizer(new SecureRequestCustomizer());
    return config;
}
 
開發者ID:AndreasKl,項目名稱:embedded-jetty-http2,代碼行數:10,代碼來源:Application.java

示例6: prepare

import org.eclipse.jetty.server.HttpConfiguration; //導入方法依賴的package包/類
/**
 * A fully configured Jetty Server instance
 */
public void prepare() throws Exception {

    // === jetty.xml ===
    // Setup Threadpool
    QueuedThreadPool threadPool = new QueuedThreadPool();
    threadPool.setMinThreads(MIN_THREADS);
    threadPool.setMaxThreads(MAX_THREADS);

    // Server
    server = new Server(threadPool);

    // Scheduler
    server.addBean(new ScheduledExecutorScheduler());

    // HTTP Configuration
    HttpConfiguration httpConfig = new HttpConfiguration();
    httpConfig.setSecureScheme(HttpScheme.HTTPS.asString());
    httpConfig.setSecurePort(CONFIG.getJetty().getHttpsPort());
    httpConfig.setOutputBufferSize(32768);
    httpConfig.setRequestHeaderSize(8192);
    httpConfig.setResponseHeaderSize(8192);
    httpConfig.setSendServerVersion(false);
    httpConfig.setSendDateHeader(false);
    httpConfig.setSendXPoweredBy(false);

    // Extra options
    server.setDumpAfterStart(false);
    server.setDumpBeforeStop(false);
    server.setStopAtShutdown(true);
    server.setStopTimeout(STOP_TIMEOUT);

    if (CONFIG.getJetty().isHttpEnabled()) {
        server.addConnector(httpConnector(httpConfig));
    }

    if (CONFIG.getJetty().isHttpsEnabled()) {
        server.addConnector(httpsConnector(httpConfig));
    }

    SteveAppContext steveAppContext = new SteveAppContext();
    server.setHandler(steveAppContext.getHandlers());
}
 
開發者ID:RWTH-i5-IDSG,項目名稱:steve-plugsurfing,代碼行數:46,代碼來源:JettyServer.java


注:本文中的org.eclipse.jetty.server.HttpConfiguration.setSendXPoweredBy方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。