tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r424096 - /tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
Date Thu, 20 Jul 2006 22:35:40 GMT
Author: jfclere
Date: Thu Jul 20 15:35:40 2006
New Revision: 424096

URL: http://svn.apache.org/viewvc?rev=424096&view=rev
Log:
";" path parameter stripping. Like in tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?rev=424096&r1=424095&r2=424096&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c Thu Jul 20 15:35:40 2006
@@ -475,10 +475,10 @@
     unsigned int i;
     char *url_rewrite;
     const char *rv = NULL;
-    const char *url = uri;
-    char  buf[JK_MAX_URI_LEN+1];
+    char  url[JK_MAX_URI_LEN+1];
 
     JK_TRACE_ENTER(l);
+
     if (!uw_map || !uri) {
         JK_LOG_NULL_PARAMS(l);
         JK_TRACE_EXIT(l);
@@ -490,14 +490,19 @@
         JK_TRACE_EXIT(l);
         return NULL;
     }
+    for (i = 0; i < strlen(uri); i++) 
+        if (uri[i] == ';')
+            break;
+        else
+            url[i] = uri[i];
+    url[i] = '\0';
+    
     url_rewrite = strstr(uri, JK_PATH_SESSION_IDENTIFIER);
     if (url_rewrite) {
-        size_t len = url_rewrite - uri;
+        size_t len = url_rewrite - url;
         if (len > JK_MAX_URI_LEN)
             len = JK_MAX_URI_LEN;
-        strncpy(buf, uri, len);
-        buf[len] = '\0';
-        url = &buf[0];
+        url[len] = '\0';
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG, "Removing Session path '%s' URI '%s'",
                    url_rewrite, url);



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


Mime
View raw message