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

           Summary: mod_jk extension use_server_errors not working
           Product: Tomcat Connectors
           Version: 1.2.27
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_jk
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: [EMAIL PROTECTED]


The just released mod_jk 1.2.27 provides the new extension "use_server_errors"
to use Apache httpd's ErrorDocument instead of Tomcat's default error pages or
<error-page> definitions in the webapp.

I configured the extension in uriworkermap.properties:
/appname*=worker1 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=1 
);use_server_errors=400

ErrorDocument und JkMountFile directives are in an Apache <VirtualHost>.

Here is what I tried so far on my way to this bug report:
- no <error-page> in web.xml = Tomcats default 404 page
- <error-page> in web.xml using an empty file in my webapp as
  location = Empty page
- experiment with fail_on_status extension, which does work. This uriworkermap
entry results in httpd's 503 ErrorDocument:
/appname*=worker1 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=1 
);use_server_errors=400;fail_on_status=-404

I had to compile mod_jk from source and so I took a peek at the source and
added some debug logging in jk_ajp_common.c/ajp_process_callback() and
jk_uri_worker_map.c/uri_worker_map_add() to dig a little deeper.

Note: I'm far from grasping the whole mod_jk and so the following analysis
might be completely off, but maybe I'm on the right track and we can progress
from here.

The logging seems to confirm that my configuration is processed correctly but I
found two issues and stopped there:
1. In ajp_process_callback() the value of r->extension.use_server_error_pages
is 0 and not 404 as i expected.
The response from Tomcat is therefore not blocked here and send to the client.
2. If I hard code r->extension.use_server_error_pages = 404 in
ajp_process_callback() the response is blocked but apperently httpd does not
pick up and send it's ErrorDocument so the client waits with a blank window
(and seems to get a http status code 200).

Version information:
====================
- Tomcat: 6.0.18
- mod_jk: 1.2.27 (compiled from source, only configure option was
--with-apxs=/path/to/apxs)
- httpd: 1.3.34
- JDK: 1.6.0_07
- OS: Linux Debian 4.0 "Etch" Stable


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to