PageFlowRequestWrapper pageFlowRequestWrapper = PageFlowRequestWrapper.get( request );
//
// We may have already gotten a multipart wrapper during process(). If so, use that.
//
MultipartRequestWrapper cachedWrapper = pageFlowRequestWrapper.getMultipartRequestWrapper();
if ( cachedWrapper != null && cachedWrapper.getRequest() == request ) return cachedWrapper;
try
{
//
// First, pre-handle the multipart request. This parses the stream and caches a single
// MultipartRequestHandler in the outer request, so we can create new wrappers around it at will.
//
MultipartRequestUtils.preHandleMultipartRequest( request );
}
catch ( ServletException e )
{
_log.error( "Could not parse multipart request.", e.getRootCause() );
return request;
}
MultipartRequestWrapper ret = new RehydratedMultipartRequestWrapper( request );
pageFlowRequestWrapper.setMultipartRequestWrapper( ret );
return ret;
}
else
{