Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
webconsole-4.2.8
-
None
-
All
Description
Calling setContentLength(0) after calling sendRedirect(path) is unnecessary and usually results in an error message getting logged by the container. In FELIX-3006 a call to setContentLength(0) was added to line 523 of the method OsgiManager.service(HttpServletRequest, HttpServletResponse)
response.sendRedirect(path);
response.setContentLength(0);
The sendRedirect method commits the response so there is no benefit to trying to call setContentLength because that attempts to set the Content-Length header which cannot happen after a response has been committed.