RE: cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_global.h

2001-10-01 Thread GOMEZ Henri

>Hi,
>
>If I'm not mistaken, the default for 3.3 should be JK_OPT_FWDURICOMPAT
>with re-escaping the URI for getRequestURI() being done in the facade.
>Consistent with
>this, I updated jk_isapi_plugin.c to un-escape the URI.
>
>Is this still the plan?

yes, I was wrong, but I'll keep the JkOptions flag since
it may help some of us play with Apache without having to
rebuild. We still could remove them later in the future



RE: cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_global.h

2001-10-01 Thread Larry Isaacs

Hi,

If I'm not mistaken, the default for 3.3 should be JK_OPT_FWDURICOMPAT
with re-escaping the URI for getRequestURI() being done in the facade.
Consistent with
this, I updated jk_isapi_plugin.c to un-escape the URI.

Is this still the plan?

Larry

-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 10/1/01 5:27 PM
Subject: cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_global.h

hgomez  01/10/01 14:27:29

  Modified:src/native/mod_jk/apache1.3 mod_jk.c
   src/native/mod_jk/common jk_global.h
  Log:
  Updated code to handle getRequestURI()
  with compatibility mode for old TC and
  new schema (by default) for TC 3.3

  Revision  ChangesPath
  1.20  +70 -5
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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- mod_jk.c 2001/09/28 09:55:14 1.19
  +++ mod_jk.c 2001/10/01 21:27:29 1.20
  @@ -443,9 +443,42 @@
* HttpServletRequest.getRequestURI() should remain encoded.
* [http://java.sun.com/products/servlet/errata_042700.html]
*
  + * We use JkOptions to determine which method to be used
  + *
  + * ap_escape_uri is the latest recommanded but require
  + *   some java decoding (in TC 3.3 rc2)
  + *
  + * unparsed_uri is used for strict compliance with spec and
  + *  old Tomcat (3.2.3 for example)
  + *
  + * uri is use for compatibilty with mod_rewrite with old Tomcats
*/
  -s->req_uri  = ap_escape_uri(r->pool, r->uri);

  +switch (conf->options & JK_OPT_FWDURIMASK) {
  +
  +case JK_OPT_FWDURICOMPATUNPARSED :
  +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;
  +}
  +}
  +
  +break;
  +
  +case JK_OPT_FWDURICOMPAT :
  +s->req_uri = r->uri;
  +break;
  +
  +case JK_OPT_FWDURIESCAPED :
  +s->req_uri  = ap_escape_uri(r->pool, r->uri);
  +break;
  +
  +default :
  +return JK_FALSE;
  +}
  +
   s->is_ssl   = JK_FALSE;
   s->ssl_cert = NULL;
   s->ssl_cert_len = 0;
  @@ -735,11 +768,23 @@
   }


  +/*
  + * JkOptions Directive Handling
  + *
  + *
  + * +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
  + *  ForwardURICompat => Forward URI normally, less spec
compliant but mod_rewrite compatible (old TC)
  + *  ForwardURICompatUnparsed => Forward URI as unparsed, spec
compliant but broke mod_rewrite (old TC)
  + *  ForwardURIEscaped=> Forward URI escaped and Tomcat (3.3
rc2) stuff will do the decoding part
  + */
  +
   const char *jk_set_options(cmd_parms *cmd,
  void *dummy,
  const char *line)
   {
   int  opt = 0;
  +int  mask = 0;
   char action;
   char *w;

  @@ -754,12 +799,29 @@
   if (*w == '+' || *w == '-') {
   action = *(w++);
   }
  +
  +mask = 0;

  -if (!strcasecmp(w, "ForwardKeySize"))
  +if (!strcasecmp(w, "ForwardKeySize")) {
   opt = JK_OPT_FWDKEYSIZE;
  +}
  +else if (!strcasecmp(w, "ForwardURICompat")) {
  +opt = JK_OPT_FWDURICOMPAT;
  +mask = JK_OPT_FWDURIMASK;
  +}
  +else if (!strcasecmp(w, "ForwardURICompatUnparsed")) {
  +opt = JK_OPT_FWDURICOMPATUNPARSED;
  +mask = JK_OPT_FWDURIMASK;
  +}
  +else if (!strcasecmp(w, "ForwardURIEscaped")) {
  +opt = JK_OPT_FWDURIESCAPED;
  +mask = JK_OPT_FWDURIMASK;
  +}
   else
   return ap_pstrcat(cmd->pool, "JkOptions: Illegal option
'", w, "'", NULL);

  +conf->options &= ~mask;
  +
   if (action == '-') {
   conf->options &= ~opt;
   }
  @@ -858,8 +920,11 @@
   /*
* Options to tune mod_jk configuration
* for now we understand :
  - * +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
  + * +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
  + *  ForwardURICompat => Forward URI normally, less spec
compliant 

RE: cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_global.h

2001-10-01 Thread GOMEZ Henri

>I thought what we decided to do was use
>
>s->uri = r->uri (a URI decoded already in Apache)
>
>and in the facade, re-encode it.  So
>JK_OPT_FWDURICOMPAT should be the default.

Ok so there is just nothing to be done in mod_jk
isn't it just revert to old code ?

Argh, I didn't understand well what Costin asked :

>
>- Revert jk/apache to use uri, remove the encode call ( again, j-t and
>j-t-c - one more week to do that, after that we'll be j-t-c only ). Henri
>- could you do this and the next one ?

I'll fix ASAP !



RE: cvs commit: jakarta-tomcat/src/native/mod_jk/common jk_global.h

2001-10-01 Thread Keith Wannamaker

I thought what we decided to do was use

s->uri = r->uri (a URI decoded already in Apache)

and in the facade, re-encode it.  So
JK_OPT_FWDURICOMPAT should be the default.


| -Original Message-
|   + * We use JkOptions to determine which method to be used 
|   + * 
|   + * ap_escape_uri is the latest recommanded but require
|   + *   some java decoding (in TC 3.3 rc2)
|   + *
|   + * unparsed_uri is used for strict compliance with spec and
|   + *  old Tomcat (3.2.3 for example)
|   + *
|   + * uri is use for compatibilty with mod_rewrite with old Tomcats
| */