tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37239] New: - HTTP requests that map to filter mapping but not to filesystem path are unnecessarily redirected by Tomcat
Date Tue, 25 Oct 2005 09:50:11 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37239>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37239

           Summary: HTTP requests that map to filter mapping but not to
                    filesystem path are unnecessarily redirected by Tomcat
           Product: Tomcat 5
           Version: 5.5.9
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: allistair.crossley@qas.com


Hi,

I am not too sure if this is a bug, a caveat or a lack in my knowledge of these 
matters.

If I configure a web application with a filter with a filter mapping of 

/*

Then I would expect any request that matches the web application context (a la 
JK->Tomcat AJP URI mappings) to be entered into that filter.

I have a web application that will respond to URLs that do not exist using the 
filter method. Therefore a reques to 

http://localhost/utilities

Whilst not a folder within the web application file structure, is still mapped 
to the ROOT web application, and should enter the filter with the /utilities 
part of the URL intact.

Instead, Tomcat sees that /utilities is not a folder, and sends a redirect to 
JK for

http://localhost/

This time, my filter is entered into but with just / as the request URI.

Is it correct that Tomcat should not allow the web application to decide (via a 
filter mapping or servlet mapping even) whether to handle any inbound request 
where the mapping is of the type /*

I note that by adding an empty folder of utilities to the web application 
causes the

http://localhost/utilities

to work.

Kind regards.

[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (700): Attempting to map 
URI '/localhost/utilities' from 18 maps
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI '/*'
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (755): Found a context match ajp13 -> /
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
HttpFilterProc::jk_isapi_plugin.c (770): check if [/utilities] is points to the 
web-inf directory
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
HttpFilterProc::jk_isapi_plugin.c (788): [/utilities] is a servlet url - should 
redirect to ajp13
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
wc_get_worker_for_name::jk_worker.c (92): found a worker ajp13
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
HttpExtensionProc::jk_isapi_plugin.c (920): got a worker for name ajp13
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_get_endpoint::jk_ajp_common.c (2016): time elapsed since last request = 22 
seconds
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_marshal_into_msgb::jk_ajp_common.c (551): ajp marshaling done
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] ajp_service::jk_ajp_common.c 
(1594): processing with 3 retries
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_connection_tcp_send_message::jk_ajp_common.c (883): sending to ajp13 pos=4 
len=466 max=8192 
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_send_request::jk_ajp_common.c (1199): request body to send 0 - request body 
to resend 0
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1007): received from ajp13 
pos=0 len=60 max=8192 
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_unmarshal_response::jk_ajp_common.c (606): status = 302
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_unmarshal_response::jk_ajp_common.c (613): Number of headers is = 2
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_unmarshal_response::jk_ajp_common.c (669): Header[0] [Location] = []
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_unmarshal_response::jk_ajp_common.c (669): Header[1] [Content-Length] = [0]
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1007): received from ajp13 
pos=0 len=2 max=8192 
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
HttpExtensionProc::jk_isapi_plugin.c (933): service() returned OK
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] ajp_done::jk_ajp_common.c 
(1942): recycling connection cache slot=0
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
HttpFilterProc::jk_isapi_plugin.c (687): Filter started
[Tue Oct 25 10:39:25 2005] [4044:4424] [debug] 
HttpFilterProc::jk_isapi_plugin.c (753): Virtual Host redirection of /localhost/

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

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


Mime
View raw message