INT-1951 limiting the exclusion of a request body to GET requests for now

This commit is contained in:
Mark Fisher
2011-07-15 11:40:56 -04:00
parent 544a34bf28
commit 44d570f700
2 changed files with 51 additions and 89 deletions

View File

@@ -531,7 +531,7 @@ public class HttpRequestExecutingMessageHandlerTests {
}
@Test
public void contentTypeIsNotSet() throws Exception {
public void contentTypeIsNotSetForGetRequest() throws Exception {
//GET
HttpRequestExecutingMessageHandler handler = new HttpRequestExecutingMessageHandler("http://www.springsource.org/spring-integration");
MockRestTemplate template = new MockRestTemplate();
@@ -550,6 +550,11 @@ public class HttpRequestExecutingMessageHandlerTests {
HttpEntity<?> request = template.lastRequestEntity.get();
assertNull(request.getHeaders().getContentType());
/* TODO: reconsider the inclusion of content-type for various HttpMethods (only ignoring for GET as of 2.0.5)
* uncomment code below accordingly (see INT-1951)
*/
/*
//HEAD
handler = new HttpRequestExecutingMessageHandler("http://www.springsource.org/spring-integration");
template = new MockRestTemplate();
@@ -603,6 +608,7 @@ public class HttpRequestExecutingMessageHandlerTests {
assertEquals("intentional", exception.getCause().getMessage());
request = template.lastRequestEntity.get();
assertNull(request.getHeaders().getContentType());
*/
}
public static class City{