You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ke...@apache.org on 2001/09/18 01:43:59 UTC
cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_global.h
keith 01/09/17 16:43:59
Modified: src/native/mod_jk/apache1.3 mod_jk.c
src/native/mod_jk/common jk_global.h
Log:
Enable mod_rewrite and maintain spec compliance by
passing Apache's r->uri to Tomcat, but re-encoding
it first.
Revision Changes Path
1.17 +2 -22 jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c
Index: mod_jk.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- mod_jk.c 2001/09/14 17:47:58 1.16
+++ mod_jk.c 2001/09/17 23:43:59 1.17
@@ -437,30 +437,14 @@
s->is_chunked = r->read_chunked;
s->no_more_chunks = 0;
s->query_string = r->args;
- s->req_uri = r->uri;
- if (conf->options & JK_OPT_FWDUNPARSED) {
/*
* The 2.2 servlet spec errata says the uri from
* HttpServletRequest.getRequestURI() should remain encoded.
* [http://java.sun.com/products/servlet/errata_042700.html]
*
- * we follow spec in that case but can't use mod_rewrite
*/
- s->req_uri = r->unparsed_uri;
- if (s->req_uri != NULL) {
- char *query_str = strchr(s->req_uri, '?');
- if (query_str != NULL) {
- *query_str = 0;
- }
- }
- }
- else {
- /*
- * we don't follow spec but we can use mod_rewrite
- */
- s->req_uri = r->uri;
- }
+ s->req_uri = ap_escape_uri(r->pool, r->uri);
s->is_ssl = JK_FALSE;
s->ssl_cert = NULL;
@@ -771,9 +755,7 @@
action = *(w++);
}
- if (!strcasecmp(w, "ForwardUnparsedUri"))
- opt = JK_OPT_FWDUNPARSED;
- else if (!strcasecmp(w, "ForwardKeySize"))
+ if (!strcasecmp(w, "ForwardKeySize"))
opt = JK_OPT_FWDKEYSIZE;
else
return ap_pstrcat(cmd->pool, "JkOptions: Illegal option '", w, "'", NULL);
@@ -876,8 +858,6 @@
/*
* Options to tune mod_jk configuration
* for now we understand :
- * +ForwardUnparsed => Forward URI as unparsed, spec compliant but broke mod_rewrite
- * -ForwardUnparsed => Forward URI normally, less spec compliant but mod_rewrite compatible
* +ForwardSSLKeySize => Forward SSL Key Size, to follow 2.3 specs but may broke old TC 3.2
* -ForwardSSLKeySize => Don't Forward SSL Key Size, will make mod_jk works with all TC release
*/
1.5 +1 -2 jakarta-tomcat/src/native/mod_jk/common/jk_global.h
Index: jk_global.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_global.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- jk_global.h 2001/09/14 17:47:58 1.4
+++ jk_global.h 2001/09/17 23:43:59 1.5
@@ -149,7 +149,6 @@
* JK options
*/
-#define JK_OPT_FWDUNPARSED 0x0001
#define JK_OPT_FWDKEYSIZE 0x0002
#ifdef __cplusplus