You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/01/16 13:29:51 UTC
DO NOT REPLY [Bug 16165] New: -
Problems with response.setHeader after chain.doFilter
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16165>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16165
Problems with response.setHeader after chain.doFilter
Summary: Problems with response.setHeader after chain.doFilter
Product: Tomcat 4
Version: 4.0.6 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: cml@mobileview.de
I have problems using setHeader after calling doFilter in a ServletFilter with
Response-Wrapper:
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain ) throws IOException, ServletException {
HttpServletRequest hreq=(HttpServletRequest)request;
HttpServletResponse hres=(HttpServletResponse)response;
LocalResponseWrapper lrw=new LocalResponseWrapper(hres);
PrintWriter w=response.getWriter();
hres.setHeader("1","1");
chain.doFilter(hreq,lrw);
hres.setHeader("2","2");
String result=lrw.toString();
w.println(result);
w.close();
}
Header "1" will be set, header "2" not...
With tomcat 4.1.18 this works. Is this a bug or a feature???
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>