return true; HttpConfiguration httpConfig = Request.getBaseRequest(request).getHttpChannel().getHttpConfiguration();
public HttpOutput(HttpChannel<?> channel) { _channel = channel; _bufferSize = _channel.getHttpConfiguration().getOutputBufferSize(); }
public HttpOutput(HttpChannel<?> channel) { _channel = channel; _bufferSize = _channel.getHttpConfiguration().getOutputBufferSize(); }
public GzipHttpOutputInterceptor(GzipFactory factory, HttpChannel channel, HttpOutput.Interceptor next,boolean syncFlush) { this(factory,VARY_ACCEPT_ENCODING_USER_AGENT,channel.getHttpConfiguration().getOutputBufferSize(),channel,next,syncFlush); }
public GzipHttpOutputInterceptor(GzipFactory factory, HttpField vary, HttpChannel channel, HttpOutput.Interceptor next,boolean syncFlush) { this(factory,vary,channel.getHttpConfiguration().getOutputBufferSize(),channel,next,syncFlush); }
public GzipHttpOutputInterceptor(GzipFactory factory, HttpField vary, HttpChannel channel, HttpOutput.Interceptor next,boolean syncFlush) { this(factory,vary,channel.getHttpConfiguration().getOutputBufferSize(),channel,next,syncFlush); }
public GzipHttpOutputInterceptor(GzipFactory factory, HttpChannel channel, HttpOutput.Interceptor next,boolean syncFlush) { this(factory,VARY_ACCEPT_ENCODING_USER_AGENT,channel.getHttpConfiguration().getOutputBufferSize(),channel,next,syncFlush); }
public HttpInput(HttpChannelState state) { _channelState=state; if (_channelState.getHttpChannel().getHttpConfiguration().getBlockingTimeout()>0) _blockingTimeoutAt=0; }
@Override protected long getIdleTimeout() { long blockingTimeout = _channel.getHttpConfiguration().getBlockingTimeout(); if (blockingTimeout == 0) return _channel.getIdleTimeout(); return blockingTimeout; } }
protected void write(ByteBuffer content, boolean complete, Callback callback) { if (_firstByteTimeStamp == -1) { long minDataRate = getHttpChannel().getHttpConfiguration().getMinResponseDataRate(); if (minDataRate > 0) _firstByteTimeStamp = System.nanoTime(); else _firstByteTimeStamp = Long.MAX_VALUE; } _interceptor.write(content, complete, callback); }
@Override protected long getIdleTimeout() { long bto = getHttpChannel().getHttpConfiguration().getBlockingTimeout(); if (bto>0) return bto; if (bto<0) return -1; return _channel.getIdleTimeout(); } };
public HttpOutput(HttpChannel<?> channel) { _channel = channel; HttpConfiguration config = channel.getHttpConfiguration(); _bufferSize = config.getOutputBufferSize(); _commitSize = config.getOutputAggregationSize(); if (_commitSize>_bufferSize) { LOG.warn("OutputAggregationSize {} exceeds bufferSize {}",_commitSize,_bufferSize); _commitSize=_bufferSize; } }
private long getBlockingTimeout() { return getHttpChannelState().getHttpChannel().getHttpConfiguration().getBlockingTimeout(); }
protected void writeErrorPageBody(HttpServletRequest request, Writer writer, int code, String message, boolean showStacks) throws IOException { String uri= request.getRequestURI(); writeErrorPageMessage(request,writer,code,message,uri); if (showStacks) writeErrorPageStacks(request,writer); Request.getBaseRequest(request).getHttpChannel().getHttpConfiguration() .writePoweredBy(writer,"<hr>","<hr/>\n"); }
protected void writeErrorPageBody(HttpServletRequest request, Writer writer, int code, String message, boolean showStacks) throws IOException { String uri= request.getRequestURI(); writeErrorPageMessage(request,writer,code,message,uri); if (showStacks) writeErrorPageStacks(request,writer); Request.getBaseRequest(request).getHttpChannel().getHttpConfiguration() .writePoweredBy(writer,"<hr>","<hr/>\n"); }
/** * @param cookies * The cookies to set. */ public void setCookies(Cookie[] cookies) { if (_cookies == null) _cookies = new CookieCutter(getHttpChannel().getHttpConfiguration().getCookieCompliance()); _cookies.setCookies(cookies); }
public void reset() { HttpConfiguration config = _channel.getHttpConfiguration(); _bufferSize = config.getOutputBufferSize(); _commitSize = config.getOutputAggregationSize(); if (_commitSize>_bufferSize) { LOG.warn("OutputAggregationSize {} exceeds bufferSize {}",_commitSize,_bufferSize); _commitSize=_bufferSize; } _written = 0; reopen(); }
public HttpOutput(HttpChannel channel) { _channel = channel; _interceptor = channel; _writeBlocker = new WriteBlocker(channel); HttpConfiguration config = channel.getHttpConfiguration(); _bufferSize = config.getOutputBufferSize(); _commitSize = config.getOutputAggregationSize(); if (_commitSize > _bufferSize) { LOG.warn("OutputAggregationSize {} exceeds bufferSize {}", _commitSize, _bufferSize); _commitSize = _bufferSize; } }
public void recycle() { _interceptor = _channel; HttpConfiguration config = _channel.getHttpConfiguration(); _bufferSize = config.getOutputBufferSize(); _commitSize = config.getOutputAggregationSize(); if (_commitSize > _bufferSize) _commitSize = _bufferSize; releaseBuffer(); _written = 0; _writeListener = null; _onError = null; _firstByteTimeStamp = -1; _flushed = 0; reopen(); }
private MultiParts newMultiParts(ServletInputStream inputStream, String contentType, MultipartConfigElement config, Object object) throws IOException { MultiPartFormDataCompliance compliance = getHttpChannel().getHttpConfiguration().getMultipartFormDataCompliance(); if(LOG.isDebugEnabled()) LOG.debug("newMultiParts {} {}",compliance, this); switch(compliance) { case RFC7578: return new MultiParts.MultiPartsHttpParser(getInputStream(), getContentType(), config, (_context != null?(File)_context.getAttribute("javax.servlet.context.tempdir"):null), this); case LEGACY: default: return new MultiParts.MultiPartsUtilParser(getInputStream(), getContentType(), config, (_context != null?(File)_context.getAttribute("javax.servlet.context.tempdir"):null), this); } }