Guy Katz wrote:
Hi; (using: centos, apache 2.0.52, mod_jk 1.2.21, tomcat 6)

Recently, I encountered a problem with URIs that has 'non western
European' characters (for example:
http://www.somehost.com/roller/admin/entry/nofx_%D7%91%D7%93%D7%A8%D7%9A
). I noticed that apache was forwarding to tomcat a different URI than
the original which caused problems in my site.

Digging into the subject I found the JkOptions +ForwardURICompatUnparsed
fixed my problem. However, I then encountered a different problem then.
On the first hit, some images were not displayed in the browser (not
served to it). So I checked the forums and found out about the
JkStripSession. I figured it might help so I turned it on but nothing
happened.

If you absolutely need to forward the original URI, you should set

JkOptions +JkForwardURIUnparsed

This has negative side effects:

- if you rewrite the URL via mod_rewrite, and then forward via mod_jk, mod_jk wil still forward the original URI, not the rewritten one

- the Tomcat AJP connector expects a session id that does not come via a cookie but via URL encoding as ";jsessionid=..." in the URI. It has to be a semicolon, not it's percent encoded equivalent.

The last jk 1.2.25 has a new forwarding policy. It reencodes everything that does not seem save, and that way tries to forward a URI that should fit into most cases- I would suggest you try that version without any JkOptions.

Also: with log level debug, it logs a line similar to:

[Sun Aug 26 01:12:03.482 2007] [27669:0] [debug]
init_ws_service::mod_jk.c (782): Service protocol=HTTP/1.1 method=GET
host=(null) addr=127.0.0.1 name=fraxinus.entenhausen.zz port=8080
auth=Basic user=jung laddr=127.0.0.1 raddr=127.0.0.1 uri=/auth.jsp

for every request. The line includes the URI exactly as it got forwarded to Tomcat, so you might be able to debug your problems more easily. The line exist also in the debug log of earlier versions, but for them does not include the uri.

My questions are:

1.      Should the JkStripSession help in this case? Was there a known
bug in my apache/mod_jk versions related to this (couldn't find in
bugzilla)?

JkStripSession is only important, if your static content gets served by Apache, but your webapp added URL encoded sessions to the links.

2.      How should I solve this? The only thing I need is to be able to
forward URIs with 'special characters' as is to tomcat for a specific
application (context)

Concerning the broken links: add an access log to Tomcat, check the request in the Apache access log, the Tomcat access log and the uri in the jk debug log to understand, what's wrong with those requests.

I am really out of my element here so I would appreciate your help
greatly.

Thanks in advance

Regards,

Rainer


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to