Ignore parse errors in HttpPutFormContentFilter

Errors when parsing the request content-type, in order to find out if
the request has form content, are translated to false.

Issue: SPR-9769
This commit is contained in:
Rossen Stoyanchev
2012-09-10 20:06:10 -04:00
parent 48b963aaa5
commit 2ff3d53962
2 changed files with 16 additions and 3 deletions

View File

@@ -87,6 +87,15 @@ public class HttpPutFormContentFilterTests {
}
}
@Test
public void invalidMediaType() throws Exception {
request.setContent("".getBytes("ISO-8859-1"));
request.setContentType("foo");
filterChain = new MockFilterChain();
filter.doFilter(request, response, filterChain);
assertSame(request, filterChain.getRequest());
}
@Test
public void getParameter() throws Exception {
request.setContent("name=value".getBytes("ISO-8859-1"));