hgomez 01/05/18 09:46:23 Modified: jk/src/native/common jk_global.h jk_map.c jk_service.h jk_uri_worker_map.c jk_worker_list.h Log: Misc cleanup and ajp14 preparation Revision Changes Path 1.2 +3 -1 jakarta-tomcat-connectors/jk/src/native/common/jk_global.h Index: jk_global.h =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_global.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_global.h 2001/05/14 09:34:29 1.1 +++ jk_global.h 2001/05/18 16:46:16 1.2 @@ -57,11 +57,13 @@ * Description: Global definitions and include files that should exist * * anywhere * * Author: Gal Shachor <[EMAIL PROTECTED]> * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***************************************************************************/ #ifndef JK_GLOBAL_H #define JK_GLOBAL_H + +#define JK_EXPOSED_VERSION ("mod_jk/1.1a1") #include <stdio.h> #include <stdlib.h> 1.2 +3 -2 jakarta-tomcat-connectors/jk/src/native/common/jk_map.c Index: jk_map.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_map.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_map.c 2001/05/14 09:35:53 1.1 +++ jk_map.c 2001/05/18 16:46:17 1.2 @@ -56,7 +56,7 @@ /*************************************************************************** * Description: General purpose map object * * Author: Gal Shachor <[EMAIL PROTECTED]> * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***************************************************************************/ #include "jk_global.h" @@ -465,4 +465,5 @@ } return rc; -} \ No newline at end of file +} + 1.2 +12 -12 jakarta-tomcat-connectors/jk/src/native/common/jk_service.h Index: jk_service.h =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_service.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_service.h 2001/05/14 09:40:55 1.1 +++ jk_service.h 2001/05/18 16:46:18 1.2 @@ -59,7 +59,7 @@ * JVM connection point * * Author: Gal Shachor <[EMAIL PROTECTED]> * * Dan Milstein <[EMAIL PROTECTED]> - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***************************************************************************/ #ifndef JK_SERVICE_H @@ -92,7 +92,7 @@ * As with all the core jk classes, this is essentially an abstract base * class which is implemented/extended by classes which are specific to a * particular web server. By using an abstract base class in this manner, - * workers can be written for different protocols (e.g. ajp12, ajp13) + * workers can be written for different protocols (e.g. ajp12, ajp13, ajp14) * without the workers having to worry about which web server they are * talking to. * @@ -231,7 +231,7 @@ * The endpoint 'class', which represents one end of a connection to the * servlet engine. Basically, supports nothing other than forwarding the * request to the servlet engine. Endpoints can be persistent (as with - * ajp13, where a single connection is reused many times), or can last for a + * ajp13/ajp14, where a single connection is reused many times), or can last for a * single request (as with ajp12, where a new connection is created for * every request). * @@ -255,14 +255,14 @@ * imagine that you are seeing the internal vtables of your favorite OO * language. Whatever works for you. * - * See jk_ajp13_worker.c and jk_ajp12_worker.c for examples. + * See jk_ajp13_worker.c/jk_ajp14_worker.c and jk_ajp12_worker.c for examples. */ struct jk_endpoint { /* * A 'this' pointer which is used by the subclasses of this class to * point to data/functions which are specific to a given protocol - * (e.g. ajp12 or ajp13). + * (e.g. ajp12 or ajp13 or ajp14). */ void *endpoint_private; @@ -279,7 +279,7 @@ /* * Called when this particular endpoint has finished processing a * request. For some protocols (e.g. ajp12), this frees the memory - * associated with the endpoint. For others (e.g. ajp13), this can + * associated with the endpoint. For others (e.g. ajp13/ajp14), this can * return the endpoint to a cache of already opened endpoints. * * Note that the first argument is *not* a 'this' pointer, but is @@ -297,10 +297,10 @@ * This can mean communicating with a particular servlet engine instance, * using a particular protocol. A single web server instance may have * multiple workers communicating with a single servlet engine (it could be - * using ajp12 for some requests and ajp13 for others). Or, a single web + * using ajp12 for some requests and ajp13/ajp14 for others). Or, a single web * server instance could have multiple workers communicating with different * servlet engines using the same protocol (it could be load balancing - * among many engines, using ajp13 for all communication). + * among many engines, using ajp13/ajp14 for all communication). * * There is also a load balancing worker (jk_lb_worker.c), which itself * manages a group of workers. @@ -327,14 +327,14 @@ * imagine that you are seeing the internal vtables of your favorite OO * language. Whatever works for you. * - * See jk_ajp13_worker.c and jk_ajp12_worker.c for examples. + * See jk_ajp14_worker.c, jk_ajp13_worker.c and jk_ajp12_worker.c for examples. */ struct jk_worker { /* * A 'this' pointer which is used by the subclasses of this class to * point to data/functions which are specific to a given protocol - * (e.g. ajp12 or ajp13). + * (e.g. ajp12 or ajp13 or ajp14). */ void *worker_private; @@ -348,7 +348,7 @@ * of configuration options (or 'properties'), check to see if it the * options are. This will always be called before the init() method. * The init/validate distinction is a bit hazy to me. - * See jk_ajp13_worker.c and jk_worker.c->wc_create_worker() + * See jk_ajp13_worker.c/jk_ajp14_worker.c and jk_worker.c->wc_create_worker() */ int (JK_METHOD *validate)(jk_worker_t *w, jk_map_t *props, @@ -387,7 +387,7 @@ * different types of workers. The set of all these functions is created * at startup from the list in jk_worker_list.h, and then the correct one * is chosen in jk_worker.c->wc_create_worker(). See jk_worker.c and - * jk_ajp13_worker.c for examples. + * jk_ajp13_worker.c/jk_ajp14_worker.c for examples. * * This allows new workers to be written without modifing the plugin code * for the various web servers (since the only link is through 1.2 +8 -7 jakarta-tomcat-connectors/jk/src/native/common/jk_uri_worker_map.c Index: jk_uri_worker_map.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_uri_worker_map.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_uri_worker_map.c 2001/05/14 09:41:56 1.1 +++ jk_uri_worker_map.c 2001/05/18 16:46:19 1.2 @@ -65,7 +65,7 @@ * servlet container. * * * * Author: Gal Shachor <[EMAIL PROTECTED]> * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***************************************************************************/ #include "jk_pool.h" @@ -111,7 +111,8 @@ * fumble and return the jsp content. * * To solve that we will check for path info following the suffix, we - * will also check that the end of the uri is not .suffix. + * will also check that the end of the uri is not ".suffix.", + * ".suffix/", or ".suffix ". */ static int check_security_fraud(jk_uri_worker_map_t *uw_map, const char *uri, @@ -129,9 +130,9 @@ if('.' != *(suffix_start - 1)) { continue; } else { - char *after_suffix = suffix_start + strlen(uw_map->maps[i].suffix) + 1; + char *after_suffix = suffix_start + strlen(uw_map->maps[i].suffix); - if((('.' == *after_suffix) || ('/' == *after_suffix)) && + if((('.' == *after_suffix) || ('/' == *after_suffix) || (' ' == *after_suffix)) && (0 == strncmp(uw_map->maps[i].context, uri, uw_map->maps[i].ctxt_len))) { /* * Security violation !!! @@ -356,7 +357,7 @@ uri = clean_uri; } - jk_log(l, JK_LOG_DEBUG, "Attempting to map URI %s\n", uri); + jk_log(l, JK_LOG_DEBUG, "Attempting to map URI '%s'\n", uri); for(i = 0 ; i < uw_map->size ; i++) { if(uw_map->maps[i].ctxt_len < longest_match) { @@ -370,7 +371,7 @@ if(strlen(uri) == uw_map->maps[i].ctxt_len) { jk_log(l, JK_LOG_DEBUG, - "jk_uri_worker_map_t::map_uri_to_worker, Found an exact match %s ->%s\n", + "jk_uri_worker_map_t::map_uri_to_worker, Found an exact match %s -> %s\n", uw_map->maps[i].worker_name, uw_map->maps[i].context ); return uw_map->maps[i].worker_name; @@ -431,7 +432,7 @@ if(fraud >= 0) { jk_log(l, JK_LOG_EMERG, - "In jk_uri_worker_map_t::map_uri_to_worker, found a security fraud in [%s]\n", + "In jk_uri_worker_map_t::map_uri_to_worker, found a security fraud in '%s'\n", uri); return uw_map->maps[fraud].worker_name; } 1.2 +6 -7 jakarta-tomcat-connectors/jk/src/native/common/jk_worker_list.h Index: jk_worker_list.h =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/native/common/jk_worker_list.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_worker_list.h 2001/05/14 09:44:44 1.1 +++ jk_worker_list.h 2001/05/18 16:46:19 1.2 @@ -56,7 +56,7 @@ /*************************************************************************** * Description: Worker list * * Author: Gal Shachor <[EMAIL PROTECTED]> * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***************************************************************************/ /* @@ -79,7 +79,7 @@ #include "jk_ajp12_worker.h" #include "jk_ajp13_worker.h" - /* #include "jk_ajp23_worker.h" */ + #include "jk_ajp14_worker.h" #ifndef HPUX11GCC #include "jk_jni_worker.h" #endif @@ -102,12 +102,10 @@ * AJPv13 worker, fast bi-directional worker. */ { JK_AJP13_WORKER_NAME, ajp13_worker_factory}, - /* - * Sample commented out (and deprecated) factory. + * AJPv14 worker, next generation fast bi-directional worker. */ - /*{ JK_AJP23_WORKER_NAME, ajp23_worker_factory},*/ - + { JK_AJP14_WORKER_NAME, ajp14_worker_factory}, /* * In process JNI based worker. Requires the server to be * multithreaded and to use native threads. @@ -127,4 +125,5 @@ { NULL, NULL} }; #endif /* _JK_WORKER_LIST_H */ -#endif /* _PLACE_WORKER_LIST_HERE */ \ No newline at end of file +#endif /* _PLACE_WORKER_LIST_HERE */ +