}
boolean iscomet = request.isComet();
request.setComet(false);
+ request.finishRequest();
response.finishResponse();
if (iscomet) request.cometClose();
}
}
}
if (!request.isAsync() && !comet) {
+ request.finishRequest();
response.finishResponse();
req.action(ActionCode.POST_REQUEST , null);
}
if (asyncConImpl != null) {
async = true;
} else if (!comet) {
+ request.finishRequest();
response.finishResponse();
if (postParseSuccess) {
// Log only if processing was invoked.
* @exception IOException if an input/output error occurs
*/
public void finishRequest() throws IOException {
- // The reader and input stream don't need to be closed
- // TODO: Is this ever called?
- // If so, move input swallow disabling from
- // Response.finishResponse() to here
+ // Optionally disable swallowing of additional request data.
+ Context context = getContext();
+ if (context != null &&
+ response.getStatus() == HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE &&
+ !context.getSwallowAbortedUploads()) {
+ coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
+ }
}
import org.apache.catalina.security.SecurityUtil;
import org.apache.catalina.util.CharsetMapper;
import org.apache.catalina.util.DateTool;
-import org.apache.coyote.ActionCode;
import org.apache.tomcat.util.buf.CharChunk;
import org.apache.tomcat.util.buf.UEncoder;
import org.apache.tomcat.util.http.FastHttpDateFormat;
*/
public void finishResponse()
throws IOException {
- // Optionally disable swallowing of additional request data.
- // TODO: Should be in Request.finishRequest(), but that method
- // seems to get called never.
- Context context = getContext();
- if (context != null
- && getStatus() == HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE
- && !context.getSwallowAbortedUploads()) {
- coyoteResponse.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
- }
// Writing leftover bytes
outputBuffer.close();
}