Author: rjung
Date: Sun Jan 28 12:03:32 2007
New Revision: 500865

URL: http://svn.apache.org/viewvc?view=rev&rev=500865
Log:
Allow session IDs to get stripped off URLs of static content in IIS 
(configurable). (BZ 41439)
We still need to port this to Apache and Sun Web Server.

Modified:
    tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
    tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
    tomcat/connectors/trunk/jk/xdocs/reference/iis.xml

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?view=diff&rev=500865&r1=500864&r2=500865
==============================================================================
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sun Jan 28 12:03:32 
2007
@@ -89,6 +89,7 @@
 #define URI_REWRITE_TAG             ("rewrite_rule_file")
 #define SHM_SIZE_TAG                ("shm_size")
 #define WORKER_MOUNT_RELOAD_TAG     ("worker_mount_reload")
+#define STRIP_SESSION_TAG           ("strip_session")
 
 
 #define TRANSLATE_HEADER            ("Translate:")
@@ -165,6 +166,7 @@
 static int  worker_mount_reload = JK_URIMAP_DEF_RELOAD;
 static char rewrite_rule_file[MAX_PATH * 2] = {0};
 static int shm_config_size = JK_SHM_DEF_SIZE;
+static int strip_session = 0;
 
 #define URI_SELECT_OPT_PARSED       0
 #define URI_SELECT_OPT_UNPARSED     1
@@ -1010,6 +1012,17 @@
                 if (JK_IS_DEBUG_LEVEL(logger))
                     jk_log(logger, JK_LOG_DEBUG,
                            "[%s] is not a servlet url", uri);
+                if (strip_session) {
+                               char *jsessionid = strstr(uri, 
JK_PATH_SESSION_IDENTIFIER);
+                    if (jsessionid) {
+                        if (JK_IS_DEBUG_LEVEL(logger))
+                            jk_log(logger, JK_LOG_DEBUG,
+                                   "removing session identifier [%s] for non 
servlet url [%s]",
+                                   jsessionid, uri);
+                        *jsessionid = '\0';
+                        SetHeader(pfc, "url", uri);
+                    }
+                }
             }
         }
     }
@@ -1375,6 +1388,7 @@
     }
     shm_config_size = get_config_int(src, SHM_SIZE_TAG, JK_SHM_DEF_SIZE);
     worker_mount_reload = get_config_int(src, WORKER_MOUNT_RELOAD_TAG, 
JK_URIMAP_DEF_RELOAD);
+    strip_session = get_config_bool(src, STRIP_SESSION_TAG, JK_FALSE);
 
     if (using_ini_file) {
         jk_map_free(&map);

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=500865&r1=500864&r2=500865
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sun Jan 28 
12:03:32 2007
@@ -27,6 +27,10 @@
   <subsection name="Native">
     <changelog>
       <add>
+        <bug>41439</bug>: Allow session IDs to get stripped off URLs of static
+        content in IIS (configurable). (rjung)
+      </add>
+      <add>
         <bug>41333</bug>: Refactoring isapi_plugin configuration reading. 
(rjung)
       </add>
       <add>

Modified: tomcat/connectors/trunk/jk/xdocs/reference/iis.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/iis.xml?view=diff&rev=500865&r1=500864&r2=500865
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/reference/iis.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/iis.xml Sun Jan 28 12:03:32 2007
@@ -65,15 +65,15 @@
 (can be debug, info, warn, error or trace).
 </p></attribute>
 <attribute name="worker_file" required="true"><p>
-A string value with the full path to workers.properties file
+A string value which is the full path to workers.properties file
 (for example <b>c:\tomcat\conf\workers.properties</b>)
 </p></attribute>
 <attribute name="worker_mount_file" required="true"><p>
-A string value with is the full path to uriworkermap.properties file
+A string value which is the full path to uriworkermap.properties file
 (for example <b>c:\tomcat\conf\uriworkermap.properties</b>)
 </p></attribute>
 <attribute name="rewrite_rule_file" required="false"><p>
-A string value with is the full path to rewrite.properties file
+A string value which is the full path to rewrite.properties file
 (for example <b>c:\tomcat\conf\rewrite.properties</b>)
 </p></attribute>
 <attribute name="shm_size" required="false"><p>
@@ -88,6 +88,16 @@
 <b>worker_mount_file</b> will be reloaded.
 </p>
 <p>This directive has been added in version 1.2.20</p>
+</attribute>
+<attribute name="strip_session" required="false"><p>
+A string value representing a boolean. If it is set to true,
+URL session prefixes of the form ";jsessionid=..." get stripped of URLs,
+even if the are served locally by the web server.
+A true value can be represented by the string "1" or any string starting
+with the letters "T" or "t". A false value will be assumed for "0"
+or any string starting with "F" or "f". The default value is false.
+</p>
+<p>This directive has been added in version 1.2.21</p>
 </attribute>
 
 </attributes>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to