APISonar


org.glassfish.grizzly.http.util.Header.Date

> org > glassfish > grizzly > http > util > Header > Date
org APIs glassfish APIs grizzly APIs http APIs util APIs Header APIs Date APIs

Example 1
public NextAction handleRead(FilterChainContext ctx) throws IOException {
		// Taken from HttpServerFilter
		final Object message = ctx.getMessage();
		if (HttpPacket.isHttp(message)) {
			// Otherwise cast message to a HttpContent
			final HttpContent httpContent = (HttpContent) message;
			final HttpRequestPacket request = (HttpRequestPacket) httpContent.getHttpHeader();
			final HttpResponsePacket response = request.getResponse();
			response.setHeader(Header.Server, Server.SERVER_VERSION);
			response.setHeader(Header.Date, FastHttpDateFormat.getCurrentDate());
		}
		return super.handleRead(ctx);
	}