<!-- Imports -->
<module name="AvoidStarImport"/>
- <module name="AvoidStaticImport"/>
+ <module name="AvoidStaticImport">
+ <property name="excludes"
+ value="org.apache.catalina.startup.SimpleHttpClient.CRLF"/>
+ </module>
<module name="IllegalImport"/>
<module name="ImportOrder">
<property name="groups" value="java,javax,async,jsp2,junit,org,util"/>
import javax.servlet.http.HttpServletResponse;
+import static org.apache.catalina.startup.SimpleHttpClient.CRLF;
+
import org.apache.catalina.startup.SimpleHttpClient;
import org.apache.catalina.startup.Tomcat;
import org.apache.catalina.startup.TomcatBaseTest;
client.setPort(getPort());
client.reset();
- client.setRequest(new String[] { "GET /MyApp/missing HTTP/1.0" +
- SimpleHttpClient.CRLF + SimpleHttpClient.CRLF });
+ client.setRequest(new String[] {
+ "GET /MyApp/missing HTTP/1.0" +CRLF + CRLF });
client.connect();
client.processRequest();
assertTrue(client.isResponse404());
//
client.reset();
client.setRequest(new String[] {
- "GET /MyApp/missing HTTP/1.1" + SimpleHttpClient.CRLF +
- "Host: localhost" + SimpleHttpClient.CRLF +
- "Connection: close" + SimpleHttpClient.CRLF +
- "If-Modified-Since: " + tomorrow + SimpleHttpClient.CRLF +
- SimpleHttpClient.CRLF });
+ "GET /MyApp/missing HTTP/1.1" + CRLF +
+ "Host: localhost" + CRLF +
+ "Connection: close" + CRLF +
+ "If-Modified-Since: " + tomorrow + CRLF + CRLF });
client.connect();
client.processRequest();
assertTrue(client.isResponse404());
//
client.reset();
client.setRequest(new String[] {
- "GET /MyApp/missing HTTP/1.1" + SimpleHttpClient.CRLF +
- "Host: localhost" + SimpleHttpClient.CRLF +
- "Connection: close" + SimpleHttpClient.CRLF +
- "Range: bytes=0-100" + SimpleHttpClient.CRLF +
- SimpleHttpClient.CRLF });
+ "GET /MyApp/missing HTTP/1.1" + CRLF +
+ "Host: localhost" + CRLF +
+ "Connection: close" + CRLF +
+ "Range: bytes=0-100" + CRLF + CRLF });
client.connect();
client.processRequest();
assertTrue(client.isResponse404());
client.setPort(getPort());
client.reset();
- client.setRequest(new String[] { "GET /MyApp/missing HTTP/1.0" +
- SimpleHttpClient.CRLF + SimpleHttpClient.CRLF });
+ client.setRequest(new String[] {
+ "GET /MyApp/missing HTTP/1.0" + CRLF + CRLF });
client.connect();
client.processRequest();
assertTrue(client.isResponse404());