[ 
https://issues.apache.org/jira/browse/FELIX-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Valentin Valchev resolved FELIX-4849.
-------------------------------------
       Resolution: Fixed
         Assignee: Valentin Valchev
    Fix Version/s: webconsole-4.2.12

fixed in svn r1701212

> Do not call setContentLength after calling sendRedirect
> -------------------------------------------------------
>
>                 Key: FELIX-4849
>                 URL: https://issues.apache.org/jira/browse/FELIX-4849
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-4.2.8
>         Environment: All
>            Reporter: Thomas Watson
>            Assignee: Valentin Valchev
>             Fix For: webconsole-4.2.12
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to