You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Ron Gavlin (JIRA)" <ji...@apache.org> on 2014/09/20 07:09:33 UTC
[jira] [Created] (CMIS-844) POSTHttpServletRequestWrapper should
accommodate prior consumption of request body by a filter
Ron Gavlin created CMIS-844:
-------------------------------
Summary: POSTHttpServletRequestWrapper should accommodate prior consumption of request body by a filter
Key: CMIS-844
URL: https://issues.apache.org/jira/browse/CMIS-844
Project: Chemistry
Issue Type: Improvement
Components: opencmis-server
Affects Versions: OpenCMIS 0.12.0
Reporter: Ron Gavlin
POSTHttpServletRequestWrapper should accommodate prior consumption of request body by a filter.
The POSTHttpServletRequestWrapper constructor should be modified as follows:
{code}
...
if (isMultipart) {
...
} else {
// form data processing
StringBuilder sb = new StringBuilder();
InputStreamReader sr = new InputStreamReader(request.getInputStream(), IOUtils.UTF8);
char[] buffer = new char[4096];
int c = 0;
while ((c = sr.read(buffer)) > -1) {
sb.append(buffer, 0, c);
}
if (sb.length() < 3) {
getParameterMap().putAll(request.getParameterMap());
} else {
parseFormData(sb.toString());
}
}
...
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)