final void writeTrailers() throws IOException { Supplier<Map<String,String>> supplier = coyoteResponse.getTrailerFields(); if (supplier == null) { // No supplier was set, end of stream will already have been sent return; } // We can re-use the MimeHeaders from the response since they have // already been processed by the encoder at this point MimeHeaders mimeHeaders = coyoteResponse.getMimeHeaders(); mimeHeaders.recycle(); Map<String,String> headerMap = supplier.get(); if (headerMap == null) { headerMap = Collections.emptyMap(); } // Copy the contents of the Map to the MimeHeaders // TODO: Is there benefit in refactoring this? Is MimeHeaders too // heavyweight? Can we reduce the copy/conversions? for (Map.Entry<String, String> headerEntry : headerMap.entrySet()) { MessageBytes mb = mimeHeaders.addValue(headerEntry.getKey()); mb.setString(headerEntry.getValue()); } handler.writeHeaders(this, 0, mimeHeaders, true, Constants.DEFAULT_HEADERS_FRAME_SIZE); }
characterEncoding = null; expectation = false; headers.recycle(); trailerFields.clear(); serverNameMB.recycle();
rmh.recycle(); boolean cachable = "GET".equalsIgnoreCase(method) || "HEAD".equalsIgnoreCase(method);
public void recycle() { bytesRead=0; contentLength = -1; contentTypeMB = null; charEncoding = null; headers.recycle(); serverNameMB.recycle(); serverPort=-1; localNameMB.recycle(); localPort = -1; remotePort = -1; available = 0; cookies.recycle(); parameters.recycle(); unparsedURIMB.recycle(); uriMB.recycle(); decodedUriMB.recycle(); queryMB.recycle(); methodMB.recycle(); protoMB.recycle(); schemeMB.recycle(); instanceId.recycle(); remoteUser.recycle(); authType.recycle(); attributes.clear(); listener = null; allDataReadEventSent.set(false); startTime = -1; }
rmh.recycle(); boolean cachable = "GET".equalsIgnoreCase(saved.getMethod()) || "HEAD".equalsIgnoreCase(saved.getMethod());
public void recycle() { bytesRead=0; contentLength = -1; contentTypeMB = null; charEncoding = null; headers.recycle(); serverNameMB.recycle(); serverPort=-1; localPort = -1; remotePort = -1; available = 0; cookies.recycle(); parameters.recycle(); unparsedURIMB.recycle(); uriMB.recycle(); decodedUriMB.recycle(); queryMB.recycle(); methodMB.recycle(); protoMB.recycle(); schemeMB.recycle(); instanceId.recycle(); remoteUser.recycle(); authType.recycle(); attributes.clear(); }
/** * Recycles this object and readies it further use. */ public void recycle() { method.recycle(); protocol.recycle(); requestURI.recycle(); remoteAddr.recycle(); remoteHost.recycle(); serverName.recycle(); serverPort = 80; remoteUser.recycle(); authType.recycle(); queryString.recycle(); authorization.recycle(); scheme = SCHEME_HTTP; secure = false; contentLength = 0; contentType.recycle(); headers.recycle(); cookies.recycle(); attributes.clear(); tomcatInstanceId.recycle(); }
/** * Recycles this object and readies it further use. */ public void recycle() { method.recycle(); protocol.recycle(); requestURI.recycle(); remoteAddr.recycle(); remoteHost.recycle(); serverName.recycle(); serverPort = 80; remoteUser.recycle(); authType.recycle(); queryString.recycle(); authorization.recycle(); scheme = SCHEME_HTTP; secure = false; contentLength = 0; contentType.recycle(); headers.recycle(); cookies.recycle(); attributes.clear(); tomcatInstanceId.recycle(); }
/** * Recycles this object and readies it further use. */ public void recycle() { method.recycle(); protocol.recycle(); requestURI.recycle(); remoteAddr.recycle(); remoteHost.recycle(); serverName.recycle(); serverPort = 80; remoteUser.recycle(); authType.recycle(); queryString.recycle(); authorization.recycle(); scheme = SCHEME_HTTP; secure = false; contentLength = 0; contentType.recycle(); headers.recycle(); cookies.recycle(); attributes.clear(); tomcatInstanceId.recycle(); }
public void recycle() { bytesRead=0; contentLength = -1; contentTypeMB = null; charEncoding = null; headers.recycle(); serverNameMB.recycle(); serverPort=-1; localPort = -1; remotePort = -1; available = 0; cookies.recycle(); parameters.recycle(); unparsedURIMB.recycle(); uriMB.recycle(); decodedUriMB.recycle(); queryMB.recycle(); methodMB.recycle(); protoMB.recycle(); schemeMB.recycle(); instanceId.recycle(); remoteUser.recycle(); authType.recycle(); attributes.clear(); }
public void recycle() { bytesRead=0; contentLength = -1; contentTypeMB = null; charEncoding = null; headers.recycle(); serverNameMB.recycle(); serverPort=-1; localPort = -1; remotePort = -1; available = 0; cookies.recycle(); parameters.recycle(); unparsedURIMB.recycle(); uriMB.recycle(); decodedUriMB.recycle(); queryMB.recycle(); methodMB.recycle(); protoMB.recycle(); schemeMB.recycle(); instanceId.recycle(); remoteUser.recycle(); authType.recycle(); attributes.clear(); }
public void recycle() { bytesRead=0; contentLength = -1; contentTypeMB = null; charEncoding = null; headers.recycle(); serverNameMB.recycle(); serverPort=-1; localPort = -1; remotePort = -1; available = 0; cookies.recycle(); parameters.recycle(); unparsedURIMB.recycle(); uriMB.recycle(); decodedUriMB.recycle(); queryMB.recycle(); methodMB.recycle(); protoMB.recycle(); schemeMB.recycle(); instanceId.recycle(); remoteUser.recycle(); authType.recycle(); attributes.clear(); startTime = -1; }
public void recycle() { bytesRead=0; contentLength = -1; contentTypeMB = null; charEncoding = null; headers.recycle(); serverNameMB.recycle(); serverPort=-1; localPort = -1; remotePort = -1; available = 0; cookies.recycle(); parameters.recycle(); unparsedURIMB.recycle(); uriMB.recycle(); decodedUriMB.recycle(); queryMB.recycle(); methodMB.recycle(); protoMB.recycle(); schemeMB.recycle(); instanceId.recycle(); remoteUser.recycle(); authType.recycle(); attributes.clear(); }
rmh.recycle(); boolean cachable = "GET".equalsIgnoreCase(saved.getMethod()) || "HEAD".equalsIgnoreCase(saved.getMethod());
rmh.recycle(); boolean cachable = "GET".equalsIgnoreCase(method) || "HEAD".equalsIgnoreCase(method);
rmh.recycle(); boolean cachable = "GET".equalsIgnoreCase(method) || "HEAD".equalsIgnoreCase(method);
rmh.recycle(); boolean cachable = "GET".equalsIgnoreCase(saved.getMethod()) || "HEAD".equalsIgnoreCase(saved.getMethod());
rmh.recycle(); boolean cachable = "GET".equalsIgnoreCase(saved.getMethod()) || "HEAD".equalsIgnoreCase(saved.getMethod());
public void recycle() { bytesRead=0; contentLength = -1; contentTypeMB = null; charEncoding = null; headers.recycle(); serverNameMB.recycle(); serverPort=-1; localNameMB.recycle(); localPort = -1; remotePort = -1; available = 0; cookies.recycle(); parameters.recycle(); unparsedURIMB.recycle(); uriMB.recycle(); decodedUriMB.recycle(); queryMB.recycle(); methodMB.recycle(); protoMB.recycle(); schemeMB.recycle(); instanceId.recycle(); remoteUser.recycle(); authType.recycle(); attributes.clear(); }
rmh.recycle(); Iterator names = saved.getHeaderNames(); while (names.hasNext()) {