return response;
}
private HttpResponse addFilters(HttpRequest requestFromBrowser, boolean modify, HttpResponse response, int responseCode) {
if (response instanceof StreamingHttpResponse) {
StreamingHttpResponse streamingResponse = (StreamingHttpResponse) response;
// if (modify && !requestFromBrowser.isExcluded() && !requestFromBrowser.session().isAjaxRedirect(requestFromBrowser.url())) {
// if (logger.isLoggable(Level.FINER)){
// logger.finer("Modifying response with HttpModifiedResponse");
// }
// streamingResponse = new HttpModifiedResponse(streamingResponse, requestFromBrowser.isSSL(), requestFromBrowser
// .fileExtension(), responseCode);
// }
// streamingResponse.addFilter(new TrafficLoggerFilter(TrafficLogger.getLoggerForThread()));
streamingResponse.addFilter(new ChunkedFilter());
return streamingResponse;
} else {
final Session session = requestFromBrowser.session();
if (modify && !requestFromBrowser.isExcluded() && !session.isAjaxRedirect(requestFromBrowser.url())) {
return new HttpModifiedResponse2(response, requestFromBrowser.isSSL(), requestFromBrowser.fileExtension(), responseCode);