当前位置: 首页>>代码示例>>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;未经允许,请勿转载。