// Check if any servlet filters have consumed a request entity
// of the media type application/x-www-form-urlencoded
// This can happen if a filter calls request.getParameter(...)
filterFormParameters(servletRequest, requestContext);
final ResponseWriter responseWriter = new ResponseWriter(
forwardOn404,
configSetStatusOverSendError,
servletResponse,
asyncExtensionDelegate.createDelegate(servletRequest, servletResponse),
backgroundTaskScheduler);
requestContext.setRequestScopedInitializer(new RequestScopedInitializer() {
@Override
public void initialize(ServiceLocator locator) {
locator.<Ref<HttpServletRequest>>getService(RequestTYPE).set(servletRequest);
locator.<Ref<HttpServletResponse>>getService(ResponseTYPE).set(servletResponse);
}
});
requestContext.setWriter(responseWriter);
appHandler.handle(requestContext);
return Values.lazy(new Value<Integer>() {
@Override
public Integer get() {
return responseWriter.getResponseStatus();
}
});
} catch (final HeaderValueException hve) {
final Response.Status status = Response.Status.BAD_REQUEST;
if (configSetStatusOverSendError) {