public SolrParams parseParamsAndFillStreams(
final HttpServletRequest req, ArrayList<ContentStream> streams ) throws Exception
{
String method = req.getMethod().toUpperCase(Locale.ENGLISH);
if( "GET".equals( method ) || "HEAD".equals( method )) {
return new ServletSolrParams(req);
}
if( "POST".equals( method ) ) {
String contentType = req.getContentType();
if( contentType != null ) {
int idx = contentType.indexOf( ';' );
if( idx > 0 ) { // remove the charset definition "; charset=utf-8"
contentType = contentType.substring( 0, idx );
}
if( "application/x-www-form-urlencoded".equals( contentType.toLowerCase(Locale.ENGLISH) ) ) {
return new ServletSolrParams(req); // just get the params from parameterMap
}
if( ServletFileUpload.isMultipartContent(req) ) {
return multipart.parseParamsAndFillStreams(req, streams);
}
}