return String.valueOf(Calendar.getInstance().get(Calendar.DAY_OF_WEEK)); } else if (key.equals("TIME")) { return FastHttpDateFormat.getCurrentDate();
return String.valueOf(Calendar.getInstance().get(Calendar.DAY_OF_WEEK)); } else if (key.equals("TIME")) { return FastHttpDateFormat.getCurrentDate();
return String.valueOf(Calendar.getInstance().get(Calendar.DAY_OF_WEEK)); } else if (key.equals("TIME")) { return FastHttpDateFormat.getCurrentDate();
return String.valueOf(Calendar.getInstance().get(Calendar.DAY_OF_WEEK)); } else if (key.equals("TIME")) { return FastHttpDateFormat.getCurrentDate();
return String.valueOf(Calendar.getInstance().get(Calendar.DAY_OF_WEEK)); } else if (key.equals("TIME")) { return FastHttpDateFormat.getCurrentDate();
public Http11Processor(int headerBufferSize, JIoEndpoint endpoint) { this.endpoint = endpoint; request = new Request(); inputBuffer = new InternalInputBuffer(request, headerBufferSize); request.setInputBuffer(inputBuffer); response = new Response(); response.setHook(this); outputBuffer = new InternalOutputBuffer(response, headerBufferSize); response.setOutputBuffer(outputBuffer); request.setResponse(response); initializeFilters(); // Cause loading of HexUtils int foo = HexUtils.DEC[0]; // Cause loading of FastHttpDateFormat FastHttpDateFormat.getCurrentDate(); }
public Http11Processor(int headerBufferSize, JIoEndpoint endpoint) { this.endpoint = endpoint; request = new Request(); inputBuffer = new InternalInputBuffer(request, headerBufferSize); request.setInputBuffer(inputBuffer); response = new Response(); response.setHook(this); outputBuffer = new InternalOutputBuffer(response, headerBufferSize); response.setOutputBuffer(outputBuffer); request.setResponse(response); initializeFilters(); // Cause loading of HexUtils int foo = HexUtils.DEC[0]; // Cause loading of FastHttpDateFormat FastHttpDateFormat.getCurrentDate(); }
public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint) { this.endpoint = endpoint; request = new Request(); inputBuffer = new InternalAprInputBuffer(request, headerBufferSize, endpoint); request.setInputBuffer(inputBuffer); if (endpoint.getUseSendfile()) { request.setSendfile(true); } response = new Response(); response.setHook(this); outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize, endpoint); response.setOutputBuffer(outputBuffer); request.setResponse(response); ssl = endpoint.isSSLEnabled(); initializeFilters(); Http11AbstractProcessor.containerThread.set(Boolean.FALSE); // Cause loading of HexUtils int foo = HexUtils.DEC[0]; // Cause loading of FastHttpDateFormat FastHttpDateFormat.getCurrentDate(); }
public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint) { this.endpoint = endpoint; request = new Request(); inputBuffer = new InternalAprInputBuffer(request, headerBufferSize, endpoint); request.setInputBuffer(inputBuffer); response = new Response(); response.setHook(this); outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize, endpoint); response.setOutputBuffer(outputBuffer); request.setResponse(response); ssl = endpoint.isSSLEnabled(); initializeFilters(); // Cause loading of HexUtils int foo = HexUtils.DEC[0]; // Cause loading of FastHttpDateFormat FastHttpDateFormat.getCurrentDate(); }
return String.valueOf(Calendar.getInstance().get(Calendar.DAY_OF_WEEK)); case TIME: return FastHttpDateFormat.getCurrentDate(); case DEFAULT: return null;
static void prepareHeaders(Request coyoteRequest, Response coyoteResponse, boolean noSendfile, Http2Protocol protocol, Stream stream) { MimeHeaders headers = coyoteResponse.getMimeHeaders(); int statusCode = coyoteResponse.getStatus(); // Add the pseudo header for status headers.addValue(":status").setString(Integer.toString(statusCode)); // Check to see if a response body is present if (!(statusCode < 200 || statusCode == 205 || statusCode == 304)) { String contentType = coyoteResponse.getContentType(); if (contentType != null) { headers.setValue("content-type").setString(contentType); } String contentLanguage = coyoteResponse.getContentLanguage(); if (contentLanguage != null) { headers.setValue("content-language").setString(contentLanguage); } } // Add date header unless it is an informational response or the // application has already set one if (statusCode >= 200 && headers.getValue("date") == null) { headers.addValue("date").setString(FastHttpDateFormat.getCurrentDate()); } // Compression can't be used with sendfile if (noSendfile && protocol != null && protocol.useCompression(coyoteRequest, coyoteResponse)) { // Enable compression. Headers will have been set. Need to configure // output filter at this point. stream.addOutputFilter(new GzipOutputFilter()); } }
/** * Create a new instance of {@code Http11NioProcessor} * * @param headerBufferSize * @param endpoint */ public Http11NioProcessor(int headerBufferSize, NioEndpoint endpoint) { this.endpoint = endpoint; request = new Request(); inputBuffer = new InternalNioInputBuffer(this, request, headerBufferSize, endpoint); request.setInputBuffer(inputBuffer); if (endpoint.getUseSendfile()) { request.setSendfile(true); } response = new Response(); response.setHook(this); outputBuffer = new InternalNioOutputBuffer(this, response, headerBufferSize, endpoint); response.setOutputBuffer(outputBuffer); request.setResponse(response); sslEnabled = endpoint.getSSLEnabled(); initializeFilters(); // Cause loading of HexUtils int foo = HexUtils.DEC[0]; // Cause loading of FastHttpDateFormat FastHttpDateFormat.getCurrentDate(); }
headers.setValue("Date").setString(FastHttpDateFormat.getCurrentDate());
String date = FastHttpDateFormat.getCurrentDate(); response.addHeader("Date", date);
headers.setValue("Date").setString(FastHttpDateFormat.getCurrentDate());
headers.setValue("Date").setString(FastHttpDateFormat.getCurrentDate());
headers.setValue("Date").setString(FastHttpDateFormat.getCurrentDate());
headers.setValue("Date").setString(FastHttpDateFormat.getCurrentDate());
headers.setValue("Date").setString(FastHttpDateFormat.getCurrentDate());
headers.setValue("Date").setString(FastHttpDateFormat.getCurrentDate());