StringBuffer responseBuf = new StringBuffer( "HTTP/" );
responseBuf.append( m_httpVersion );
responseBuf.append( " " );
responseBuf.append( m_httpStatus );
responseBuf.append( "\r\n" );
HeaderGroup headerGroup = new HeaderGroup( );
headerGroup.addHeader( new Header( "Date",
HTTP_DATE_FORMAT.format( timeNow ) ) );
headerGroup.addHeader( new Header( "Server", m_httpServerName ) );
headerGroup.addHeader( new Header( "Cache-Control", "max-age=86400" ) );
headerGroup.addHeader( new Header( "Expires",
HTTP_DATE_FORMAT.format( sameTimeTomorrow ) ) );
Header[] headers = headerGroup.getAllHeaders( );
for ( int i = 0; i < headers.length; i++ )
{
responseBuf.append( headers[i] );
}