https://issues.apache.org/bugzilla/show_bug.cgi?id=50583

           Summary: Standard error pages (e.g.404) do not work if
                    AccessLogValve is configured on webapp
           Product: Tomcat 7
           Version: 7.0.6
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: knst.koli...@gmail.com


Steps to reproduce:
1. Configure AccessLogValve on the examples webapp:
E.g., create webapps/examples/META-INF/context.xml with the following content:

<Context>
    <Valve className="org.apache.catalina.valves.AccessLogValve"
       directory="logs" prefix="examples_access_log." suffix=".txt"
       pattern="%h %l %u %t &quot;%r&quot; %s %b" resolveHosts="false"/>
</Context>

2. Start Tomcat and access
http://localhost:8080/examples/404

3. Expected result: Standard error 404 page provided by Tomcat.
Actual result: blank page.
If I use telnet to send the request, I see the following:
GET /examples/4 HTTP/1.1
Host:1

HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Date: Fri, 14 Jan 2011 09:32:30 GMT

0

If AccessLogValve is removed from META-INF/context.xml, the correct behaviour
is restored. The presence of AccessLogValve in server.xml (as configured by
default) does not trigger this issue.

I suspect that the cause might be the same as in bug 50582: a flush() performed
by AccessLogValve.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to