Skip to content

Commit

Permalink
set Transfer-Encoding: chunked
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Apr 29, 2011
1 parent a648eb4 commit 988f0d7
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -181,7 +181,11 @@ protected String normalizeRequestUri(HttpServletRequest httpRequest) {
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
Servlet servlet = findMatchingServlet(req, res);
if (servlet != null) {
try {
try {
if (res instanceof HttpServletResponse) {
// let the client and web server know that we don't know the content length
((HttpServletResponse) res).setHeader("Transfer-Encoding", "chunked");
}
servlet.service(req, res);
} catch (Exception e) {
logException(req, e, !(e instanceof IOException && StringUtils.isNotBlank(e.getMessage())));
Expand Down

0 comments on commit 988f0d7

Please sign in to comment.