/* SJSAS 4936855
requestParametersParsed = true;
*/
Parameters parameters = coyoteRequest.getParameters();
// Set this every time in case limit has been changed via JMX
parameters.setLimit(getConnector().getMaxParameterCount());
// getCharacterEncoding() may have been overridden to search for
// hidden form field containing request encoding
String enc = getCharacterEncoding();
// START SJSAS 4936855
// Delay updating requestParametersParsed to TRUE until
// after getCharacterEncoding() has been called, because
// getCharacterEncoding() may cause setCharacterEncoding() to be
// called, and the latter will ignore the specified encoding if
// requestParametersParsed is TRUE
requestParametersParsed = true;
// END SJSAS 4936855
if (enc != null) {
parameters.setEncoding(enc);
parameters.setQueryStringEncoding(enc);
} else {
parameters.setEncoding(com.sun.grizzly.tcp.Constants.DEFAULT_CHARACTER_ENCODING);
parameters.setQueryStringEncoding(com.sun.grizzly.tcp.Constants.DEFAULT_CHARACTER_ENCODING);
}
parameters.handleQueryParameters();
if (usingInputStream || usingReader) {
return;
}
if (!getMethod().equalsIgnoreCase("POST")) {
return;
}
String contentType = getContentType();
if (contentType == null) {
contentType = "";
}
int semicolon = contentType.indexOf(';');
if (semicolon >= 0) {
contentType = contentType.substring(0, semicolon).trim();
} else {
contentType = contentType.trim();
}
if ("multipart/form-data".equals(contentType)) {
getMultipart();
}
if (!("application/x-www-form-urlencoded".equals(contentType))) {
return;
}
int len = getContentLength();
if (len > 0) {
int maxPostSize = ((Connector) connector).getMaxPostSize();
if ((maxPostSize > 0) && (len > maxPostSize)) {
log(sm.getString("coyoteRequest.postTooLarge"));
throw new IllegalStateException("Post too large");
}
try {
/* SJSAS 6346738
byte[] formData = null;
if (len < CACHED_POST_LEN) {
if (postData == null)
postData = new byte[CACHED_POST_LEN];
formData = postData;
} else {
formData = new byte[len];
}
int actualLen = readPostBody(formData, len);
if (actualLen == len) {
parameters.processParameters(formData, 0, len);
}
*/
// START SJSAS 6346738
byte[] formData = getPostBody();
if (formData != null) {
parameters.processParameters(formData, 0, len);
}
// END SJSAS 6346738
} catch (Throwable t) {
; // Ignore
}