SPR-7845 - FormHttpMessageConverter.read() always ignores post data when processing request (from Tomcat)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3845 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
50da443eb3
commit
dfb8b267ca
|
|
@ -48,6 +48,8 @@ public class ServletServerHttpRequest implements ServerHttpRequest {
|
||||||
|
|
||||||
private static final String POST_METHOD = "POST";
|
private static final String POST_METHOD = "POST";
|
||||||
|
|
||||||
|
private static final String PUT_METHOD = "PUT";
|
||||||
|
|
||||||
private static final String FORM_CHARSET = "UTF-8";
|
private static final String FORM_CHARSET = "UTF-8";
|
||||||
|
|
||||||
private final HttpServletRequest servletRequest;
|
private final HttpServletRequest servletRequest;
|
||||||
|
|
@ -105,7 +107,7 @@ public class ServletServerHttpRequest implements ServerHttpRequest {
|
||||||
|
|
||||||
private boolean isFormSubmittal(HttpServletRequest request) {
|
private boolean isFormSubmittal(HttpServletRequest request) {
|
||||||
return FORM_CONTENT_TYPE.equals(request.getContentType()) &&
|
return FORM_CONTENT_TYPE.equals(request.getContentType()) &&
|
||||||
POST_METHOD.equalsIgnoreCase(request.getMethod());
|
(POST_METHOD.equalsIgnoreCase(request.getMethod()) || PUT_METHOD.equalsIgnoreCase(request.getMethod()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private InputStream getFormBody(HttpServletRequest request) throws IOException {
|
private InputStream getFormBody(HttpServletRequest request) throws IOException {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue