use of org.apache.commons.httpclient.methods.TraceMethod in project camel by apache.
the class NettyHttpTraceDisabledTest method testTraceDisabled.
@Test
public void testTraceDisabled() throws Exception {
HttpClient httpclient = new HttpClient();
TraceMethod trace = new TraceMethod("http://localhost:" + portTraceOff + "/myservice");
httpclient.executeMethod(trace);
// TRACE shouldn't be allowed by default
assertTrue(trace.getStatusCode() == 405);
trace.releaseConnection();
}
use of org.apache.commons.httpclient.methods.TraceMethod in project camel by apache.
the class NettyHttpTraceDisabledTest method testTraceDisabled.
@Test
public void testTraceDisabled() throws Exception {
HttpClient httpclient = new HttpClient();
TraceMethod trace = new TraceMethod("http://localhost:" + portTraceOff + "/myservice");
httpclient.executeMethod(trace);
// TRACE shouldn't be allowed by default
assertTrue(trace.getStatusCode() == 405);
trace.releaseConnection();
}
use of org.apache.commons.httpclient.methods.TraceMethod in project camel by apache.
the class NettyHttpTraceDisabledTest method testTraceEnabled.
@Test
public void testTraceEnabled() throws Exception {
HttpClient httpclient = new HttpClient();
TraceMethod trace = new TraceMethod("http://localhost:" + portTraceOn + "/myservice");
httpclient.executeMethod(trace);
// TRACE is now allowed
assertTrue(trace.getStatusCode() == 200);
trace.releaseConnection();
}
use of org.apache.commons.httpclient.methods.TraceMethod in project camel by apache.
the class NettyHttpTraceDisabledTest method testTraceEnabled.
@Test
public void testTraceEnabled() throws Exception {
HttpClient httpclient = new HttpClient();
TraceMethod trace = new TraceMethod("http://localhost:" + portTraceOn + "/myservice");
httpclient.executeMethod(trace);
// TRACE is now allowed
assertTrue(trace.getStatusCode() == 200);
trace.releaseConnection();
}
use of org.apache.commons.httpclient.methods.TraceMethod in project camel by apache.
the class JettyEndpointSetHttpTraceTest method testTraceDisabled.
@Test
public void testTraceDisabled() throws Exception {
HttpClient httpclient = new HttpClient();
TraceMethod trace = new TraceMethod("http://localhost:" + portTraceOff + "/myservice");
httpclient.executeMethod(trace);
// TRACE shouldn't be allowed by default
assertTrue(trace.getStatusCode() == 405);
trace.releaseConnection();
}
Aggregations