cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2005-08-07 Thread wrowe
wrowe   2005/08/07 22:14:00

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
This didn't do what the author intended on Win32; without 
declspec(dllimport)
the module was looking at the redirection of this extern, not the redirected
result from loading the ApacheCore.dll module.  The *only* reason this might
have worked is that nothing collided with ApacheCore.dll's preferred base
address, but it is a crash for some users just waiting to happen.
  
  Revision  ChangesPath
  1.87  +5 -1  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- mod_jk.c  4 Jul 2005 15:55:48 -   1.86
  +++ mod_jk.c  8 Aug 2005 05:14:00 -   1.87
  @@ -76,7 +76,11 @@
   #define ADD_SSL_INFO
   
   module MODULE_VAR_EXPORT jk_module;
  +#ifdef WIN32
  +extern __declspec(dllimport) module dir_module;
  +#else
   extern module dir_module;
  +#endif
   
   /*
* Configuration object for the mod_jk module.
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2005-07-04 Thread jfclere
jfclere 2005/07/04 08:55:48

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Fix PR 34474. Note that if the // are in the cookie path the cookie won't
  work. (but that is the same in 2.x and when using ajp-proxy.
  
  Revision  ChangesPath
  1.86  +9 -7  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- mod_jk.c  18 May 2005 18:19:31 -  1.85
  +++ mod_jk.c  4 Jul 2005 15:55:48 -   1.86
  @@ -2111,7 +2111,11 @@
   
   if (conf) {
   jk_logger_t *l = conf-log ? conf-log : main_log;
  -const char *worker = map_uri_to_worker(conf-uw_map, r-uri, l);
  +char *clean_uri = ap_pstrdup(r-pool, r-uri);
  +const char *worker;
  +
  +ap_no2slash(clean_uri);
  +worker = map_uri_to_worker(conf-uw_map, clean_uri, l);
   
   /* Don't know the worker, ForwardDirectories is set, there is a
* previous request for which the handler is JK_HANDLER (as set 
by
  @@ -2119,8 +2123,8 @@
* -- forward to Tomcat, via default worker */
   if (!worker  (conf-options  JK_OPT_FWDDIRS) 
   r-prev  r-prev-handler 
  -!strcmp(r-prev-handler, JK_HANDLER)  r-uri 
  -strlen(r-uri)  r-uri[strlen(r-uri) - 1] == '/') {
  +!strcmp(r-prev-handler, JK_HANDLER)  clean_uri 
  +strlen(clean_uri)  clean_uri[strlen(clean_uri) - 1] == 
'/') {
   
   if (worker_env.num_of_workers) {
   /* Nothing here to do but assign the first worker since 
we
  @@ -2128,7 +2132,7 @@
   worker = worker_env.worker_list[0];
   
   jk_log(l, JK_LOG_DEBUG, Manual configuration for %s %s,
  -   r-uri, worker_env.worker_list[0]);
  +   clean_uri, worker_env.worker_list[0]);
   }
   }
   
  @@ -2137,8 +2141,6 @@
   ap_table_setn(r-notes, JK_WORKER_ID, worker);
   }
   else if (conf-alias_dir != NULL) {
  -char *clean_uri = ap_pstrdup(r-pool, r-uri);
  -ap_no2slash(clean_uri);
   /* Automatically map uri to a context static file */
   jk_log(l, JK_LOG_DEBUG,
  mod_jk::jk_translate, check alias_dir: %s,
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2005-04-30 Thread mturk
mturk   2005/04/29 23:02:49

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Assure singleton call to log_close.
  
  Revision  ChangesPath
  1.79  +3 -2  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- mod_jk.c  28 Apr 2005 11:28:45 -  1.78
  +++ mod_jk.c  30 Apr 2005 06:02:49 -  1.79
  @@ -2270,7 +2270,7 @@
   (jk_server_conf_t *) ap_get_module_config(tmp-module_config,
 jk_module);
   
  -if (NULL != conf) {
  +if (conf) {
   wc_close(conf-log);
   uri_worker_map_free((conf-uw_map), conf-log);
   jk_map_free((conf-uri_to_context));
  @@ -2278,6 +2278,7 @@
   jk_map_free((conf-automount));
   if (conf-log)
   jk_close_file_logger((conf-log));
  +conf-log = NULL;
   }
   tmp = tmp-next;
   }
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2005-03-26 Thread mturk
mturk   2005/03/26 01:37:24

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Do not abort the connection if request is invalid, so that client receives
  apache http error code, instead just dropping connection.
  
  Revision  ChangesPath
  1.76  +4 -3  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- mod_jk.c  18 Mar 2005 08:13:54 -  1.75
  +++ mod_jk.c  26 Mar 2005 09:37:24 -  1.76
  @@ -1793,12 +1793,13 @@
   return OK;  /* NOT r-status, even if it has changed. */
   }
   else if (rc == JK_CLIENT_ERROR) {
  -r-connection-aborted = 1;
  +if (is_error != HTTP_REQUEST_ENTITY_TOO_LARGE)
  +r-connection-aborted = 1;
   jk_log(l, JK_LOG_INFO, Aborting connection
   for worker=%s,
  worker_name);
   JK_TRACE_EXIT(l);
  -return OK;
  +return is_error;
   }
   else {
   jk_log(l, JK_LOG_INFO, Service error=%d
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2005-03-18 Thread mturk
mturk   2005/03/18 00:13:55

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Use EMERG instead ERR for critical errors.
  
  Revision  ChangesPath
  1.75  +3 -3  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- mod_jk.c  17 Mar 2005 12:06:03 -  1.74
  +++ mod_jk.c  18 Mar 2005 08:13:54 -  1.75
  @@ -1987,7 +1987,7 @@
  jk_shm_name(), rc);
   #if !defined(WIN32)  !defined(NETWARE)
   if (!jk_shm_file)
  -ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, NULL,
  +ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO, NULL,
No JkShmFile defined in httpd.conf. 
LoadBalancer will not function properly!);
   #endif
  @@ -2018,7 +2018,7 @@
   if (!jk_map_read_properties(init_map, conf-worker_file, NULL)) {
   
   if (jk_map_size(init_map) == 0) {
  -ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  +ap_log_error(APLOG_MARK, APLOG_EMERG, NULL,
No worker file and no worker options in httpd.conf 

use JkWorkerFile to set workers);
   return;
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2005-02-14 Thread mturk
mturk   2005/02/14 01:45:58

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Add shared memory support.
  
  Revision  ChangesPath
  1.66  +44 -3 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- mod_jk.c  13 Feb 2005 12:23:46 -  1.65
  +++ mod_jk.c  14 Feb 2005 09:45:58 -  1.66
  @@ -57,6 +57,7 @@
   #include jk_service.h
   #include jk_worker.h
   #include jk_uri_worker_map.h
  +#include jk_shm.h
   
   #define JK_WORKER_ID(jakarta.worker)
   #define JK_HANDLER  (jakarta-servlet)
  @@ -170,6 +171,7 @@
   
   static jk_logger_t *main_log = NULL;
   static jk_worker_env_t worker_env;
  +static char *jk_shm_file = NULL;
   
   static int JK_METHOD ws_start_response(jk_ws_service_t *s,
  int status,
  @@ -824,6 +826,32 @@
   }
   
   /*
  + * JkShmFile Directive Handling
  + *
  + * JkShmFile file
  + */
  +
  +static const char *jk_set_shm_file(cmd_parms * cmd,
  +   void *dummy, char *shm_file)
  +{
  +
  +/* we need an absolut path */
  +jk_shm_file = ap_server_root_relative(cmd-pool, shm_file);
  +
  +#ifdef CHROOTED_APACHE
  +ap_server_strip_chroot(jk_shm_file, 0);
  +#endif
  +
  +if (jk_shm_file == shm_file)
  +jk_shm_file = ap_pstrdup(cmd-pool, shm_file);
  +
  +if (jk_shm_file == NULL)
  +return JkShmFile file_name invalid;
  +
  +return NULL;
  +}
  +
  +/*
* JkLogLevel Directive Handling
*
* JkLogLevel debug/info/request/error/emerg
  @@ -1503,6 +1531,8 @@
*/
   {JkLogFile, jk_set_log_file, NULL, RSRC_CONF, TAKE1,
Full path to the Jakarta mod_jk module log file},
  +{JkShmFile, jk_set_shm_file, NULL, RSRC_CONF, TAKE1,
  + Full path to the Jakarta mod_jk module shared memory file},
   {JkLogLevel, jk_set_log_level, NULL, RSRC_CONF, TAKE1,
The Jakarta mod_jk module log level, can be debug, info, request, 
error, or emerg},
   {JkLogStampFormat, jk_set_log_fmt, NULL, RSRC_CONF, TAKE1,
  @@ -1840,6 +1870,7 @@
   
   static void jk_init(server_rec * s, ap_pool * p)
   {
  +int rc;
   jk_server_conf_t *conf =
   (jk_server_conf_t *) ap_get_module_config(s-module_config,
 jk_module);
  @@ -1859,7 +1890,16 @@
   main_log = conf-log;
   }
   }
  -
  +
  +if ((rc = jk_shm_open(jk_shm_file, conf-log)) == 0) {
  +if (JK_IS_DEBUG_LEVEL(conf-log))
  +jk_log(conf-log, JK_LOG_DEBUG, Initialized shm:%s,
  +   jk_shm_name(), rc);
  +}
  +else
  +jk_log(conf-log, JK_LOG_ERROR, Initializing shm:%s errno=%d,
  +   jk_shm_name(), rc);
  + 
   /* SREVILAK -- register cleanup handler to clear resources on restart,
* to make sure log file gets closed in the parent process  */
   ap_register_cleanup(p, s, jk_server_cleanup, ap_null_cleanup);
  @@ -1875,7 +1915,7 @@
   }
   */
   
  -/* Create mapping from uri's to workers, and start up all the workers */
  + /* Create mapping from uri's to workers, and start up all the workers */
   if (!uri_worker_map_alloc
   ((conf-uw_map), conf-uri_to_context, conf-log)) {
   jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, Memory error);
  @@ -2102,6 +2142,7 @@
   static void jk_server_cleanup(void *data)
   {
   jk_generic_cleanup((server_rec *) data);
  +jk_shm_close();
   }
   
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2005-02-14 Thread mturk
mturk   2005/02/14 02:36:12

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Process service return values the same way as on Apache2.
  
  Revision  ChangesPath
  1.67  +23 -6 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- mod_jk.c  14 Feb 2005 09:45:58 -  1.66
  +++ mod_jk.c  14 Feb 2005 10:36:12 -  1.67
  @@ -57,6 +57,7 @@
   #include jk_service.h
   #include jk_worker.h
   #include jk_uri_worker_map.h
  +#include jk_ajp13.h
   #include jk_shm.h
   
   #define JK_WORKER_ID(jakarta.worker)
  @@ -1708,7 +1709,7 @@
   }
   jk_close_pool(private_data.p);
   
  -if (rc) {
  +if (rc  0) {
   /* If tomcat returned no body and the status is not OK,
  let apache handle the error code */
   if (!r-sent_bodyct  r-status = HTTP_BAD_REQUEST) {
  @@ -1718,12 +1719,28 @@
   JK_TRACE_EXIT(l);
   return r-status;
   }
  -jk_log(l, JK_LOG_INFO, Service returned error=%d
  -with status=%d for worker=%s,
  -   rc, r-status, worker_name);
  +if (JK_IS_DEBUG_LEVEL(l))
  +jk_log(l, JK_LOG_DEBUG, Service finished
  +with status=%d for worker=%s,
  +   r-status, worker_name); 
   JK_TRACE_EXIT(l);
   return OK;  /* NOT r-status, even if it has changed. */
   }
  +else if (rc == JK_CLIENT_ERROR) {
  +r-connection-aborted = 1;
  +jk_log(l, JK_LOG_INFO, Aborting connection
  +for worker=%s,
  +   worker_name);
  +JK_TRACE_EXIT(l);
  +return OK;
  +}
  +else {
  +jk_log(l, JK_LOG_INFO, Service error=%d
  +for worker=%s,
  +   rc, worker_name);
  +JK_TRACE_EXIT(l);
  +return HTTP_INTERNAL_SERVER_ERROR;
  +}
   }
   else {
   jk_log(l, JK_LOG_ERROR, Could not init service
  @@ -1910,7 +1927,7 @@
   for (i = 0; i  jk_map_size(conf-automount); i++)
   {
   char *name = jk_map_name_at(conf-automount, i);
  - jk_log(conf-log, JK_LOG_DEBUG, worker = %s and 
virtualhost = %s, name, map_get_string(conf-automount, name, NULL));
  +jk_log(conf-log, JK_LOG_DEBUG, worker = %s and virtualhost = 
%s, name, map_get_string(conf-automount, name, NULL));
   }
   }
   */
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2005-02-13 Thread mturk
mturk   2005/02/13 04:23:46

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Implement new API calls for shm and set vhost uriworker_map
  
  Revision  ChangesPath
  1.65  +10 -8 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- mod_jk.c  12 Feb 2005 11:55:33 -  1.64
  +++ mod_jk.c  13 Feb 2005 12:23:46 -  1.65
  @@ -618,7 +618,7 @@
   s-num_headers++;
   }
   }
  -
  +s-uw_map = conf-uw_map;
   return JK_TRUE;
   }
   
  @@ -1936,13 +1936,15 @@
   r-prev  r-prev-handler 
   !strcmp(r-prev-handler, JK_HANDLER)  r-uri 
   strlen(r-uri)  r-uri[strlen(r-uri) - 1] == '/') {
  +
  +if (worker_env.num_of_workers) {
  +/* Nothing here to do but assign the first worker since 
we
  + * already tried mapping and it didn't work out */
  +worker = worker_env.worker_list[0];
   
  -/* Nothing here to do but assign the first worker since we
  - * already tried mapping and it didn't work out */
  -worker = worker_env.first_worker;
  -
  -jk_log(l, JK_LOG_DEBUG, Manual configuration for %s %s,
  -   r-uri, worker_env.first_worker);
  +jk_log(l, JK_LOG_DEBUG, Manual configuration for %s %s,
  +   r-uri, worker_env.worker_list[0]);
  +}
   }
   
   if (worker) {
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2004-12-17 Thread mturk
mturk   2004/12/17 10:16:39

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Remove duplicating uri because map_uri now properly reverts the
  changes made when jsessionid is found.
  
  Revision  ChangesPath
  1.61  +3 -4  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- mod_jk.c  17 Dec 2004 03:14:56 -  1.60
  +++ mod_jk.c  17 Dec 2004 18:16:39 -  1.61
  @@ -1926,8 +1926,7 @@
   
   if (conf) {
   jk_logger_t *l = conf-log ? conf-log : main_log;
  -char *uri = ap_pstrdup(r-pool, r-uri);
  -char *worker = map_uri_to_worker(conf-uw_map, uri, l);
  +char *worker = map_uri_to_worker(conf-uw_map, r-uri, l);
   
   /* Don't know the worker, ForwardDirectories is set, there is a
* previous request for which the handler is JK_HANDLER (as set 
by
  @@ -1950,7 +1949,7 @@
   ap_table_setn(r-notes, JK_WORKER_ID, worker);
   }
   else if (conf-alias_dir != NULL) {
  -char *clean_uri = uri;
  +char *clean_uri = ap_pstrdup(r-pool, r-uri);
   ap_no2slash(clean_uri);
   /* Automatically map uri to a context static file */
   jk_log(l, JK_LOG_DEBUG,
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2004-12-13 Thread mturk
mturk   2004/12/13 01:11:24

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Add more logging.
  
  Revision  ChangesPath
  1.59  +27 -3 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- mod_jk.c  7 Dec 2004 14:02:51 -   1.58
  +++ mod_jk.c  13 Dec 2004 09:11:24 -  1.59
  @@ -1599,8 +1599,11 @@
 module_config,
 jk_module);
   jk_logger_t *l = conf-log ? conf-log : main_log;
  +jk_worker_t *worker;
   
  -jk_worker_t *worker = wc_get_worker_for_name(worker_name, l);
  +JK_TRACE_ENTER(l);
  +
  +worker = wc_get_worker_for_name(worker_name, l);
   
   if (worker) {
   #ifndef NO_GETTIMEOFDAY
  @@ -1670,17 +1673,38 @@
   }
   #endif
   }
  -
  +else {
  +jk_log(l, JK_LOG_ERROR, Could not init service
  +for worker=%s\n,
  +   worker_name);
  +JK_TRACE_EXIT(l);
  +return HTTP_INTERNAL_SERVER_ERROR;
  +}
   jk_close_pool(private_data.p);
   
   if (rc) {
   /* If tomcat returned no body and the status is not OK,
  let apache handle the error code */
   if (!r-sent_bodyct  r-status = HTTP_BAD_REQUEST) {
  +jk_log(l, JK_LOG_INFO, No body with status=%d
  +for worker=%s\n,
  +   r-status, worker_name);
  +JK_TRACE_EXIT(l);
   return r-status;
   }
  +jk_log(l, JK_LOG_INFO, Service returned error=%d
  +with status=%d for worker=%s\n,
  +   rc, r-status, worker_name);
  +JK_TRACE_EXIT(l);
   return OK;  /* NOT r-status, even if it has changed. */
   }
  +}
  +else {
  +jk_log(l, JK_LOG_ERROR, Could not init service
  +for worker=%s\n,
  +   worker_name);
  +JK_TRACE_EXIT(l);
  +return HTTP_INTERNAL_SERVER_ERROR;
   }
   }
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2004-12-07 Thread mturk
mturk   2004/12/07 06:02:51

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Fix compile time warnings.
  
  Revision  ChangesPath
  1.58  +2 -3  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- mod_jk.c  7 Dec 2004 13:46:55 -   1.57
  +++ mod_jk.c  7 Dec 2004 14:02:51 -   1.58
  @@ -1589,7 +1589,7 @@
   }
   
   /* Set up r-read_chunked flags for chunked encoding, if present */
  -if (rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) {
  +if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK))) {
   return rc;
   }
   
  @@ -1655,7 +1655,6 @@
   #ifndef NO_GETTIMEOFDAY
   if (conf-format != NULL) {
   char *duration = NULL;
  -char *status = NULL;
   long micro, seconds;
   gettimeofday(tv_end, NULL);
   if (tv_end.tv_usec  tv_begin.tv_usec) {
  @@ -1665,7 +1664,7 @@
   micro = tv_end.tv_usec - tv_begin.tv_usec;
   seconds = tv_end.tv_sec - tv_begin.tv_sec;
   duration =
  -ap_psprintf(r-pool, %.1d.%.6d, seconds, micro);
  +ap_psprintf(r-pool, %.1ld.%.6ld, seconds, micro);
   ap_table_setn(r-notes, JK_DURATION, duration);
   request_log_transaction(r, conf);
   }
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2004-12-04 Thread mturk
mturk   2004/12/04 04:13:59

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Info about JkWorkerProperty -- no functional changes.
  
  Revision  ChangesPath
  1.56  +2 -2  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- mod_jk.c  2 Dec 2004 06:50:01 -   1.55
  +++ mod_jk.c  4 Dec 2004 12:13:59 -   1.56
  @@ -1568,7 +1568,7 @@
Adds a name of environment variable that should be sent to 
servlet-engine},
   
   {JkWorkerProperty, jk_set_worker_property, NULL, RSRC_CONF, RAW_ARGS,
  - Set worker.properties directive},
  + Set workers.properties formated directive},
   
   {NULL}
   };
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2004-11-12 Thread mturk
mturk   2004/11/12 00:42:47

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Added JkWorkerProperty directive that enables omiting
  workers.properties file (same as for Apache2).
  For example: JkWorkerProperty worker.ajp13a.port=8009
  
  Revision  ChangesPath
  1.51  +44 -11jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- mod_jk.c  9 Nov 2004 12:17:42 -   1.50
  +++ mod_jk.c  12 Nov 2004 08:42:47 -  1.51
  @@ -1383,6 +1383,27 @@
   return NULL;
   }
   
  +/*
  + * JkWorkerProperty Directive Handling
  + *
  + * JkWorkerProperty name=value
  + */
  +
  +static const char *jk_set_worker_property(cmd_parms * cmd,
  +  void *dummy,
  +  const char *line)
  +{
  +server_rec *s = cmd-server;
  +jk_server_conf_t *conf =
  +(jk_server_conf_t *) ap_get_module_config(s-module_config,
  +  jk_module);
  +
  +if (jk_map_read_property(conf-worker_properties, line) == JK_FALSE)
  +return ap_pstrcat(cmd-temp_pool, Invalid JkWorkerProperty , line);
  +
  +return NULL;
  +}
  +
   static const command_rec jk_cmds[] = {
   /*
* JkWorkersFile specifies a full path to the location of the worker 
  @@ -1480,6 +1501,9 @@
   {JkEnvVar, jk_add_env_var, NULL, RSRC_CONF, TAKE2,
Adds a name of environment variable that should be sent to 
servlet-engine},
   
  +{JkWorkerProperty, jk_set_worker_property, NULL, RSRC_CONF, RAW_ARGS,
  + Set worker.properties directive},
  +
   {NULL}
   };
   
  @@ -1515,7 +1539,9 @@
   jk_worker_t *worker = wc_get_worker_for_name(worker_name, l);
   
   if (worker) {
  +#ifndef NO_GETTIMEOFDAY
   struct timeval tv_begin, tv_end;
  +#endif
   int rc = JK_FALSE;
   apache_private_data_t private_data;
   jk_ws_service_t s;
  @@ -1773,21 +1799,28 @@
   
   /*if(map_alloc(init_map)) { */
   
  -if (jk_map_read_properties(init_map, conf-worker_file)) {
  +if (!jk_map_read_properties(init_map, conf-worker_file)) {
   
  +if (jk_map_size(init_map) == 0) {
  +ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  + No worker file and no worker options in httpd.conf 
\n
  + use JkWorkerFile to set workers\n);
  +return;
  +} 
  +
  +}
   #if MODULE_MAGIC_NUMBER = 19980527
   /* Tell apache we're here */
  -ap_add_version_component(JK_EXPOSED_VERSION);
  +ap_add_version_component(JK_EXPOSED_VERSION);
   #endif
   
  -/* we add the URI-WORKER MAP since workers using AJP14 will feed it 
*/
  -worker_env.uri_to_worker = conf-uw_map;
  -worker_env.virtual = *;   /* for now */
  -worker_env.server_name = (char *)ap_get_server_version();
  -if (wc_open(init_map, worker_env, conf-log)) {
  -/* we don't need this any more so free it */
  -return;
  -}
  +/* we add the URI-WORKER MAP since workers using AJP14 will feed it */
  +worker_env.uri_to_worker = conf-uw_map;
  +worker_env.virtual = *;   /* for now */
  +worker_env.server_name = (char *)ap_get_server_version();
  +if (wc_open(init_map, worker_env, conf-log)) {
  +/* we don't need this any more so free it */
  +return;
   }
   
   ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2004-02-11 Thread hgomez
hgomez  2004/02/11 01:50:39

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Initialise the reco status
  
  Revision  ChangesPath
  1.46  +4 -1  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- mod_jk.c  21 Nov 2003 06:51:45 -  1.45
  +++ mod_jk.c  11 Feb 2004 09:50:38 -  1.46
  @@ -467,6 +467,9 @@
   s-read = ws_read;
   s-write= ws_write;
   
  +/* Clear RECO status */
  +s-reco_status  = RECO_NONE;
  +
   s-auth_type= NULL_FOR_EMPTY(r-connection-ap_auth_type);
   s-remote_user  = NULL_FOR_EMPTY(r-connection-user);
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2003-11-20 Thread billbarker
billbarker2003/11/20 22:51:45

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Fix logging file descriptor leak.
  
  Submitted By: Steve Revilak [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.45  +30 -2 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mod_jk.c  5 Nov 2003 09:15:41 -   1.44
  +++ mod_jk.c  21 Nov 2003 06:51:45 -  1.45
  @@ -224,6 +224,10 @@
   static int JK_METHOD ws_write(jk_ws_service_t *s,
 const void *b,
 unsigned l);
  +/* srevilak - new function prototypes */
  +static void jk_server_cleanup(void *data);
  +static void jk_generic_cleanup(server_rec *s);
  +
   
   
   /* == */
  @@ -1765,6 +1769,10 @@
   main_log = conf-log;
   }
   }
  +
  +/* SREVILAK -- register cleanup handler to clear resources on restart,
  + * to make sure log file gets closed in the parent process  */
  +ap_register_cleanup(p, s, jk_server_cleanup, ap_null_cleanup);
   
   /*
   { int i;
  @@ -1970,7 +1978,25 @@
   
   static void exit_handler (server_rec *s, ap_pool *p)
   {
  - server_rec *tmp = s;
  +/* srevilak - refactor cleanup body to jk_generic_cleanup() */
  +jk_generic_cleanup(s);
  +}
  + 
  +
  +/** srevilak -- registered as a cleanup handler in jk_init */
  +static void jk_server_cleanup(void *data) 
  +{
  +jk_generic_cleanup((server_rec *) data);
  +}
  +
  +
  +/** BEGIN SREVILAK 
  + * body taken from exit_handler()
  + */
  +static void jk_generic_cleanup(server_rec *s) 
  +{
  +
  +server_rec *tmp = s;
   
/* loop through all available servers to clean up all configuration
 * records we've created
  @@ -1993,6 +2019,8 @@
   tmp = tmp-next;
   }
   }
  +/** END SREVILAK **/
  +
   
   static const handler_rec jk_handlers[] =
   {
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2003-09-25 Thread hgomez
hgomez  2003/09/25 08:22:09

  Modified:jk/native/common jk_ajp14_worker.h jk_worker.c
jk_ajp_common.h jk_ajp14_worker.c jk_ajp_common.c
jk_ajp13.h jk_ajp13.c jk_msg_buff.c
jk_worker_list.h jk_service.h jk_md5.c
jk_ajp13_worker.c jk_context.h jk_ajp14.h jk_util.h
jk_context.c jk_ajp14.c jk_util.c
   jk/native/apache-2.0 mod_jk.c
   jk/native/apache-1.3 mod_jk.c
  Log:
  New code to handle HANG tomcats.
  
  Basically add PING/PONG in ajp protocol which will
  require Tomcat 3.3.2, 4.1.28, 5.0.13
  
  Revision  ChangesPath
  1.8   +2 -2  jakarta-tomcat-connectors/jk/native/common/jk_ajp14_worker.h
  
  Index: jk_ajp14_worker.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp14_worker.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- jk_ajp14_worker.h 21 Jun 2002 15:28:56 -  1.7
  +++ jk_ajp14_worker.h 25 Sep 2003 15:22:07 -  1.8
  @@ -57,7 +57,7 @@
   
   /***
* Description: ajpv14 worker header file  *
  - * Author:  Henri Gomez [EMAIL PROTECTED]   *
  + * Author:  Henri Gomez [EMAIL PROTECTED]*
* Version: $Revision$   *
***/
   
  
  
  
  1.12  +2 -2  jakarta-tomcat-connectors/jk/native/common/jk_worker.c
  
  Index: jk_worker.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_worker.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- jk_worker.c   4 Dec 2001 19:44:23 -   1.11
  +++ jk_worker.c   25 Sep 2003 15:22:08 -  1.12
  @@ -59,8 +59,8 @@
   /***
* Description: Workers controller *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
  - * Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision$   *
  + * Author:  Henri Gomez [EMAIL PROTECTED]*
  + * Version: $Revision$  *
***/
   
   #define _PLACE_WORKER_LIST_HERE
  
  
  
  1.19  +13 -4 jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.h
  
  Index: jk_ajp_common.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.h,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- jk_ajp_common.h   14 Mar 2003 13:36:35 -  1.18
  +++ jk_ajp_common.h   25 Sep 2003 15:22:08 -  1.19
  @@ -58,8 +58,8 @@
   /***
* Description: common stuff for bi-directional protocol ajp13/ajp14.  *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
  - * Author:  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision$   *
  + * Author:  Henri Gomez [EMAIL PROTECTED]*
  + * Version: $Revision$  *
***/
   
   #ifndef JK_AJP_COMMON_H
  @@ -229,7 +229,9 @@
   #define AJP_HEADER_SZ_LEN (2)
   #define CHUNK_BUFFER_PAD  (12)
   #define AJP_DEF_CACHE_TIMEOUT (15)
  -
  +#define AJP_DEF_CONNECT_TIMEOUT   (0)/* NO CONNECTION TIMEOUT = NO 
PING/PONG */
  +#define AJP_DEF_REPLY_TIMEOUT (0)/* NO REPLY TIMEOUT
  */
  +#define AJP_DEF_PREPOST_TIMEOUT   (0)/* NO PREPOST TIMEOUT = NO 
PING/PONG*/
   
   struct jk_res_data {
   int status;
  @@ -298,6 +300,13 @@
   * Handle Cache Timeouts
   */
   unsigned cache_timeout;
  +
  + /*
  + * Handle Connection/Reply Timeouts
  + */
  + unsigned connect_timeout;   /* connect ping/pong delay in ms (0 means 
disabled) */
  + unsigned reply_timeout; /* reply timeout delay in ms (0 means disabled)
 */
  + unsigned prepost_timeout;   /* before sending a request ping/pong timeout 
delay 

cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2003-08-26 Thread billbarker
billbarker2003/08/25 21:32:59

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Apache 1.3 support for new contract.
  
  Revision  ChangesPath
  1.42  +4 -3  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- mod_jk.c  7 Aug 2003 22:12:35 -   1.41
  +++ mod_jk.c  26 Aug 2003 04:32:59 -  1.42
  @@ -1819,7 +1819,8 @@
   
   if(conf) {
   jk_logger_t *l = conf-log ? conf-log : main_log;
  -char *worker = map_uri_to_worker(conf-uw_map, r-uri, l);
  +char *uri = ap_pstrdup(r-pool, r-uri);
  +char *worker = map_uri_to_worker(conf-uw_map, uri, l);
   
   /* Don't know the worker, ForwardDirectories is set, there is a
* previous request for which the handler is JK_HANDLER (as set by
  @@ -1841,7 +1842,7 @@
   r-handler = ap_pstrdup(r-pool, JK_HANDLER);
   ap_table_setn(r-notes, JK_WORKER_ID, worker);
   } else if(conf-alias_dir != NULL) {
  -char *clean_uri = ap_pstrdup(r-pool, r-uri);
  +char *clean_uri = uri;
   ap_no2slash(clean_uri);
   /* Automatically map uri to a context static file */
   jk_log(l, JK_LOG_DEBUG,
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2003-08-07 Thread mmanders
mmanders2003/08/07 15:12:35

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Added cleanup of automount member of config structure in exit_handler.
  
  Revision  ChangesPath
  1.41  +2 -1  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- mod_jk.c  2 Jul 2003 07:09:09 -   1.40
  +++ mod_jk.c  7 Aug 2003 22:12:35 -   1.41
  @@ -1985,6 +1985,7 @@
   uri_worker_map_free((conf-uw_map), conf-log);
   map_free((conf-uri_to_context));
   map_free((conf-worker_properties));
  +map_free((conf-automount));
   if (conf-log)
   jk_close_file_logger((conf-log));
   }
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2003-07-02 Thread hgomez
hgomez  2003/07/02 00:09:10

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Add the forgotten vars ;-)
  
  Revision  ChangesPath
  1.40  +2 -1  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- mod_jk.c  27 Jun 2003 03:06:43 -  1.39
  +++ mod_jk.c  2 Jul 2003 07:09:09 -   1.40
  @@ -1542,6 +1542,7 @@
   jk_worker_t *worker = wc_get_worker_for_name(worker_name, l);
   
   if(worker) {
  +struct timeval tv_begin,tv_end;
   int rc = JK_FALSE;
   apache_private_data_t private_data;
   jk_ws_service_t s;
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2003-06-26 Thread billbarker
billbarker2003/06/26 20:06:43

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Clean up AutoConfig to better handle //.
  
  Revision  ChangesPath
  1.39  +6 -4  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- mod_jk.c  11 Jun 2003 16:53:06 -  1.38
  +++ mod_jk.c  27 Jun 2003 03:06:43 -  1.39
  @@ -1840,15 +1840,17 @@
   r-handler = ap_pstrdup(r-pool, JK_HANDLER);
   ap_table_setn(r-notes, JK_WORKER_ID, worker);
   } else if(conf-alias_dir != NULL) {
  +char *clean_uri = ap_pstrdup(r-pool, r-uri);
  +ap_no2slash(clean_uri);
   /* Automatically map uri to a context static file */
   jk_log(l, JK_LOG_DEBUG,
   mod_jk::jk_translate, check alias_dir: %s\n,conf-alias_dir);
  -if (strlen(r-uri)  1) {
  +if (strlen(clean_uri)  1) {
   /* Get the context directory name */
   char *context_dir = NULL;
   char *context_path = NULL;
   char *child_dir = NULL;
  -char *index = r-uri;
  +char *index = clean_uri;
   char *suffix = strchr(index+1,'/');
   if( suffix != NULL ) {
   int size = suffix - index;
  @@ -1885,7 +1887,7 @@
   if( context_path != NULL ) {
   DIR *dir = ap_popendir(r-pool,context_path);
   if( dir != NULL ) {
  -char *escurl = ap_os_escape_path(r-pool, r-uri, 1);
  +char *escurl = ap_os_escape_path(r-pool, clean_uri, 1);
   char *ret = 
ap_pstrcat(r-pool,conf-alias_dir,escurl,NULL);
   ap_pclosedir(r-pool,dir);
   /* Add code to verify real path ap_os_canonical_name */
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2003-06-11 Thread mturk
mturk   2003/06/11 09:53:07

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Remove the unreferenced declarations to suppress compiler warnings.
  
  Revision  ChangesPath
  1.38  +1 -3  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- mod_jk.c  8 May 2003 13:29:47 -   1.37
  +++ mod_jk.c  11 Jun 2003 16:53:06 -  1.38
  @@ -1128,7 +1128,6 @@
   const char **sa)
   {
   const char *s = *sa;
  -int i;
   struct log_item_list *l;
   
   if (*s != '%') {
  @@ -1543,7 +1542,6 @@
   jk_worker_t *worker = wc_get_worker_for_name(worker_name, l);
   
   if(worker) {
  -struct timeval tv_begin,tv_end;
   int rc = JK_FALSE;
   apache_private_data_t private_data;
   jk_ws_service_t s;
  
  
  

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



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-12-16 Thread hgomez
hgomez  2002/12/16 00:54:56

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Fix ifdef/idef
  
  Revision  ChangesPath
  1.33  +4 -4  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- mod_jk.c  11 Dec 2002 10:40:38 -  1.32
  +++ mod_jk.c  16 Dec 2002 08:54:55 -  1.33
  @@ -735,7 +735,7 @@
   /* we need an absolut path */
   conf-worker_file = ap_server_root_relative(cmd-pool,worker_file);
   
  -#idef CHROOTED_APACHE
  +#ifdef CHROOTED_APACHE
   ap_server_strip_chroot(conf-worker_file,0);
   #endif
   
  @@ -768,7 +768,7 @@
   /* we need an absolut path */
   conf-log_file = ap_server_root_relative(cmd-pool,log_file);
   
  -#idef CHROOTED_APACHE
  +#ifdef CHROOTED_APACHE
   ap_server_strip_chroot(conf-log_file,0);
   #endif
   
  @@ -1752,7 +1752,7 @@
   /* Open up log file */
   if(conf-log_file  conf-log_level = 0) {
   if(!jk_open_file_logger((conf-log), conf-log_file, conf-log_level)) {
  -#idef CHROOTED_APACHE
  +#ifdef CHROOTED_APACHE
   conf-log = main_log;
   #else
   conf-log = NULL;
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-12-11 Thread hgomez
hgomez  2002/12/11 02:40:38

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Allow log file use in chrooted (for now only OpenBSD) environement.
  
  You'll have to define CHROOTED_APACHE (or later will use the define
  added by OpenBSD if any)
  provided by Kurt Miller.
  
  Revision  ChangesPath
  1.32  +15 -1 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mod_jk.c  22 Nov 2002 14:43:00 -  1.31
  +++ mod_jk.c  11 Dec 2002 10:40:38 -  1.32
  @@ -734,6 +734,11 @@
   
   /* we need an absolut path */
   conf-worker_file = ap_server_root_relative(cmd-pool,worker_file);
  +
  +#idef CHROOTED_APACHE
  +ap_server_strip_chroot(conf-worker_file,0);
  +#endif
  +
   if (conf-worker_file == worker_file)
   conf-worker_file = ap_pstrdup(cmd-pool,worker_file);

  @@ -762,6 +767,11 @@
   
   /* we need an absolut path */
   conf-log_file = ap_server_root_relative(cmd-pool,log_file);
  +
  +#idef CHROOTED_APACHE
  +ap_server_strip_chroot(conf-log_file,0);
  +#endif
  +
   if ( conf-log_file == log_file)
   conf-log_file = ap_pstrdup(cmd-pool,log_file);

  @@ -1742,7 +1752,11 @@
   /* Open up log file */
   if(conf-log_file  conf-log_level = 0) {
   if(!jk_open_file_logger((conf-log), conf-log_file, conf-log_level)) {
  +#idef CHROOTED_APACHE
  +conf-log = main_log;
  +#else
   conf-log = NULL;
  +#endif
   } else {
   main_log = conf-log;
   }
  
  
  

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




Re: cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-12-11 Thread Henri Gomez
[EMAIL PROTECTED] wrote:

hgomez  2002/12/11 02:40:38

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Allow log file use in chrooted (for now only OpenBSD) environement.

  

  You'll have to define CHROOTED_APACHE (or later will use the define

  added by OpenBSD if any)

  provided by Kurt Miller.
  

if OpenBSD (and other chrooted Apache) have a specific define, I'll
use it instead of CHROOTED_APACHE.

Regards



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




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-10-18 Thread hgomez
hgomez  2002/10/18 03:23:16

  Modified:jk/native/apache-2.0 mod_jk.c
   jk/native/apache-1.3 mod_jk.c
  Log:
  make sure that servername/serverport  will works with VirtualHost with or 
  without UseCanonicalName.
  
  Providd by [EMAIL PROTECTED], and validated by Mladen which
  does it the same way in jk2...
  
  Revision  ChangesPath
  1.57  +8 -6  jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mod_jk.c  10 Sep 2002 15:08:13 -  1.56
  +++ mod_jk.c  18 Oct 2002 10:23:15 -  1.57
  @@ -479,13 +479,15 @@
   );
   
   /* get server name */
  -s-server_name= (char *)(r-hostname ? r-hostname :
  - r-server-server_hostname);
  -
  +/* s-server_name= (char *)(r-hostname ? r-hostname : 
r-server-server_hostname); */
  +/* XXX : à la jk2 */
  + s-server_name  = ap_get_server_name(r);
   
   /* get the real port (otherwise redirect failed) */
  -apr_sockaddr_port_get(port,r-connection-local_addr);
  -s-server_port = port;
  +/* apr_sockaddr_port_get(port,r-connection-local_addr); */
  +/* s-server_port = port; */
  +/* XXX : à la jk2 */
  + s-server_port  = ap_get_server_port(r);
   
   s-server_software = (char *)ap_get_server_version();
   
  
  
  
  1.30  +11 -3 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- mod_jk.c  30 Jul 2002 02:13:04 -  1.29
  +++ mod_jk.c  18 Oct 2002 10:23:15 -  1.30
  @@ -466,9 +466,17 @@
   s-remote_host  = NULL_FOR_EMPTY(s-remote_host);
   
   s-remote_addr  = NULL_FOR_EMPTY(r-connection-remote_ip);
  -s-server_name  = (char *)(r-hostname ? r-hostname : 
r-server-server_hostname);
  +
  +/* get server name */
  +/* s-server_name  = (char *)(r-hostname ? r-hostname : 
r-server-server_hostname); */
  +/* XXX : à la jk2 */
  + s-server_name  = ap_get_server_name(r);
   
  -s-server_port = htons( r-connection-local_addr.sin_port );
  +/* get the real port (otherwise redirect failed) */
  +/* s-server_port = htons( r-connection-local_addr.sin_port ); */
  +/* XXX : à la jk2 */
  + s-server_port  = ap_get_server_port(r);
  +
   s-server_software = (char *)ap_get_server_version();
   
   s-method = (char *)r-method;
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-07-29 Thread bojan

bojan   2002/07/29 19:13:05

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Introduce a working ForwardDirectories implementation into mod_jk 1.2.0 for
  Apache 1.3.x.
  
  Major changes:
- mod_jk requires mod_dir
- jk_fixups() function introduced
- jk_translate() knows how to handle ForwardDirectories
- jk_server_conf_t has a new field
  
  Revision  ChangesPath
  1.29  +94 -20jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- mod_jk.c  24 Jul 2002 11:38:13 -  1.28
  +++ mod_jk.c  30 Jul 2002 02:13:04 -  1.29
  @@ -114,6 +114,7 @@
   #define ADD_SSL_INFO
   
   module MODULE_VAR_EXPORT jk_module;
  +extern module dir_module;
   
   /*
* Configuration object for the mod_jk module.
  @@ -130,6 +131,7 @@
   /*
* Worker stuff
*/
  +jk_map_t *worker_properties;
   char *worker_file;
   jk_map_t *uri_to_context;
   
  @@ -200,6 +202,10 @@
   };
   typedef struct apache_private_data apache_private_data_t;
   
  +typedef struct dir_config_struct {
  +array_header *index_names;
  +} dir_config_rec;
  +
   static jk_logger_t   *main_log = NULL;
   static jk_worker_env_tworker_env;
   
  @@ -1501,7 +1507,6 @@
   return HTTP_INTERNAL_SERVER_ERROR;
   }
   
  -
   /* Set up r-read_chunked flags for chunked encoding, if present */
   if(rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) {
return rc;
  @@ -1597,6 +1602,8 @@
   jk_server_conf_t *c =
   (jk_server_conf_t *) ap_pcalloc(p, sizeof(jk_server_conf_t));
   
  +c-worker_properties = NULL;
  +map_alloc(c-worker_properties);
   c-worker_file   = NULL;
   c-log_file  = NULL;
   c-log_level = -1;
  @@ -1715,9 +1722,9 @@
   
   static void jk_init(server_rec *s, ap_pool *p)
   {
  -jk_map_t *init_map = NULL;
   jk_server_conf_t *conf =
   (jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module);
  +jk_map_t *init_map = conf-worker_properties;
   
   /* Open up log file */
   if(conf-log_file  conf-log_level = 0) {
  @@ -1744,24 +1751,23 @@
   jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, Memory error);
   }
   
  -if(map_alloc(init_map)) {
  -if(map_read_properties(init_map, conf-worker_file)) {
  -
  +/*if(map_alloc(init_map)) {*/
  +
  +if(map_read_properties(init_map, conf-worker_file)) {
  +
   #if MODULE_MAGIC_NUMBER = 19980527
  -/* Tell apache we're here */
  -ap_add_version_component(JK_EXPOSED_VERSION);
  +/* Tell apache we're here */
  +ap_add_version_component(JK_EXPOSED_VERSION);
   #endif
   
  - /* we add the URI-WORKER MAP since workers using AJP14 will 
feed it */
  -worker_env.uri_to_worker = conf-uw_map;
  -worker_env.virtual   = *; /* for now */
  -worker_env.server_name   = (char *)ap_get_server_version();
  -if(wc_open(init_map, worker_env, conf-log)) {
  -/* we don't need this any more so free it */
  -map_free(init_map);
  -return;
  -}
  -}
  +/* we add the URI-WORKER MAP since workers using AJP14 will feed it */
  +worker_env.uri_to_worker = conf-uw_map;
  +worker_env.virtual   = *; /* for now */
  +worker_env.server_name   = (char *)ap_get_server_version();
  +if(wc_open(init_map, worker_env, conf-log)) {
  +/* we don't need this any more so free it */
  +return;
  +}
   }
   
   ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  @@ -1777,12 +1783,29 @@
   {
   if(!r-proxyreq) {
   jk_server_conf_t *conf =
  -(jk_server_conf_t *)ap_get_module_config(r-server-module_config, 
jk_module);
  +(jk_server_conf_t *)ap_get_module_config(r-server-module_config,
  + jk_module);
   
   if(conf) {
   jk_logger_t *l = conf-log ? conf-log : main_log;
   char *worker = map_uri_to_worker(conf-uw_map, r-uri, l);
   
  +/* Don't know the worker, ForwardDirectories is set, there is a
  + * previous request for which the handler is JK_HANDLER (as set by
  + * jk_fixups) and the request is for a directory:
  + * -- forward to Tomcat, via default worker */
  +if(!worker  (conf-options  JK_OPT_FWDDIRS) 
  +   r-prev  !strcmp(r-prev-handler,JK_HANDLER) 
  +   r-uri[strlen(r-uri)-1] == '/'){
  +
  +/* Nothing 

Re: cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-07-29 Thread Bojan Smojver

Since there were no complaints within 24 hours, I went ahead and committed the
patch. This should bring mod_jk 1.2.0 for Apache 1.3.x in line with mod_jk 1.2.0
for Apache 2.0.x. In other words, ForwardDirectories is not a no-op any more.

I have tested the patch and it does work in my environment. Please test and let
me know if anything is broken or just plain unacceptable.

Bojan

Quoting [EMAIL PROTECTED]:

 bojan   2002/07/29 19:13:05
 
   Modified:jk/native/apache-1.3 mod_jk.c
   Log:
   Introduce a working ForwardDirectories implementation into mod_jk
 1.2.0 for
   Apache 1.3.x.
   
   Major changes:
 - mod_jk requires mod_dir
 - jk_fixups() function introduced
 - jk_translate() knows how to handle ForwardDirectories
 - jk_server_conf_t has a new field

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




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-07-24 Thread bojan

bojan   2002/07/24 04:38:13

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Introduce ForwardDirectories option into mod_jk for Apache 1.3.x, for
  compatibility with Apache 2.x version. Does nothing for now.
  
  Revision  ChangesPath
  1.28  +5 -1  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_jk.c  12 Jun 2002 15:51:48 -  1.27
  +++ mod_jk.c  24 Jul 2002 11:38:13 -  1.28
  @@ -1299,6 +1299,7 @@
*  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
  + *  ForwardDirectories   = Forward all directory requests with no index files 
to Tomcat
*/
   
   const char *jk_set_options(cmd_parms *cmd,
  @@ -1338,6 +1339,9 @@
   else if (!strcasecmp(w, ForwardURIEscaped)) {
   opt = JK_OPT_FWDURIESCAPED;
   mask = JK_OPT_FWDURIMASK;
  +}
  +else if (!strcasecmp(w, ForwardDirectories)) {
  +opt = JK_OPT_FWDDIRS;
   }
   else
   return ap_pstrcat(cmd-pool, JkOptions: Illegal option ', w, ', 
NULL);
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-06-12 Thread mmanders

mmanders2002/06/12 08:51:48

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Added check for NO_GETTIMEOFDAY since gettimeofday isn't supported on all platforms.
  
  Revision  ChangesPath
  1.27  +5 -1  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- mod_jk.c  21 Apr 2002 22:57:11 -  1.26
  +++ mod_jk.c  12 Jun 2002 15:51:48 -  1.27
  @@ -1526,9 +1526,11 @@
   
   s.ws_private = private_data;
   s.pool = private_data.p;
  +#ifndef NO_GETTIMEOFDAY
   if(conf-format != NULL) {
   gettimeofday(tv_begin, NULL);
   }
  +#endif
   
   if(init_ws_service(private_data, s, conf)) {
   jk_endpoint_t *end = NULL;
  @@ -1553,6 +1555,7 @@
   }
   end-done(end, l);
   }
  +#ifndef NO_GETTIMEOFDAY
   if(conf-format != NULL) {
   char *duration = NULL;
   char *status = NULL;
  @@ -1568,6 +1571,7 @@
   ap_table_setn(r-notes, JK_DURATION, duration);
   request_log_transaction(r,conf);
   }
  +#endif
   }
   
   jk_close_pool(private_data.p);
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-04-02 Thread costin

costin  02/04/02 11:10:43

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Port the change from apache2 - don't exit on jk error.
  
  Revision  ChangesPath
  1.24  +5 -4  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- mod_jk.c  4 Dec 2001 19:51:01 -   1.23
  +++ mod_jk.c  2 Apr 2002 19:10:42 -   1.24
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   *
*  Dan Milstein [EMAIL PROTECTED]*
*  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.23 $   *
  + * Version: $Revision: 1.24 $   *
***/
   
   /*
  @@ -1305,9 +1305,9 @@
   #endif
   
/* we add the URI-WORKER MAP since workers using AJP14 will 
feed it */
  - worker_env.uri_to_worker = conf-uw_map;
  +worker_env.uri_to_worker = conf-uw_map;
   worker_env.virtual   = *; /* for now */
  - worker_env.server_name   = (char *)ap_get_server_version();
  +worker_env.server_name   = (char *)ap_get_server_version();
   if(wc_open(init_map, worker_env, conf-log)) {
   /* we don't need this any more so free it */
   map_free(init_map);
  @@ -1316,7 +1316,8 @@
   }
   }
   
  -jk_error_exit(APLOG_MARK, APLOG_EMERG, s, p, Error while opening the workers);
  +aplog_error(APLOG_MARK, APLOG_ERR, NULL,
  +Error while opening the workers, jk will not work\n);
   }
   
   /*
  
  
  

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




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-04-02 Thread bojan

bojan   02/04/02 16:49:19

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Use ap_log_error, rather then old aplog_error
  
  Revision  ChangesPath
  1.25  +3 -3  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_jk.c  2 Apr 2002 19:10:42 -   1.24
  +++ mod_jk.c  3 Apr 2002 00:49:19 -   1.25
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   *
*  Dan Milstein [EMAIL PROTECTED]*
*  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.24 $   *
  + * Version: $Revision: 1.25 $   *
***/
   
   /*
  @@ -1316,8 +1316,8 @@
   }
   }
   
  -aplog_error(APLOG_MARK, APLOG_ERR, NULL,
  -Error while opening the workers, jk will not work\n);
  +ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  + Error while opening the workers, jk will not work\n);
   }
   
   /*
  
  
  

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




RE: cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2002-04-02 Thread Peter Sawyer \(IMAP\)



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 3 April 2002 10:49 AM
To: [EMAIL PROTECTED]
Subject: cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3
mod_jk.c


bojan   02/04/02 16:49:19

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Use ap_log_error, rather then old aplog_error

  Revision  ChangesPath
  1.25  +3 -3
jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c

  Index: mod_jk.c
  ===
  RCS file:
/home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_jk.c  2 Apr 2002 19:10:42 -   1.24
  +++ mod_jk.c  3 Apr 2002 00:49:19 -   1.25
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]
*
*  Dan Milstein [EMAIL PROTECTED]
*
*  Henri Gomez [EMAIL PROTECTED]
*
  - * Version: $Revision: 1.24 $
*
  + * Version: $Revision: 1.25 $
*

***/

   /*
  @@ -1316,8 +1316,8 @@
   }
   }

  -aplog_error(APLOG_MARK, APLOG_ERR, NULL,
  -Error while opening the workers, jk will not work\n);
  +ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  + Error while opening the workers, jk will not work\n);
   }

   /*




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



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




cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2001-11-20 Thread costin

costin  01/11/20 16:09:22

  Modified:jk/native/apache-2.0 mod_jk.c
   jk/native/common jk_global.h
   jk/native/apache-1.3 mod_jk.c
  Log:
  Moved the duplicated declaration in jk_global.
  
  Revision  ChangesPath
  1.37  +4 -13 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- mod_jk.c  2001/11/16 22:55:34 1.36
  +++ mod_jk.c  2001/11/21 00:09:21 1.37
  @@ -60,13 +60,12 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.36 $   *
  + * Version: $Revision: 1.37 $   *
***/
   
   /*
* mod_jk: keeps all servlet/jakarta related ramblings together.
*/
  -
   #include apu_compat.h
   #include ap_config.h
   #include apr_lib.h
  @@ -89,14 +88,6 @@
   /*
* Jakarta (jk_) include files
*/
  -#ifdef NETWARE
  -#define _SYS_TYPES_H_
  -#define _NETDB_H_INCLUDED
  -#define _IN_
  -#define _INET_
  -#define _SYS_TIMEVAL_H_
  -#define _SYS_SOCKET_H_
  -#endif
   #include jk_global.h
   #include jk_util.h
   #include jk_map.h
  @@ -253,7 +244,7 @@
   
   /* this NOP function was removed in apache 2.0 alpha14 */
   /* ap_send_http_header(r); */
  -p-response_started = JK_TRUE;
  +  p-response_started = JK_TRUE;
   
   return JK_TRUE;
   }
  @@ -1284,7 +1275,7 @@
   #endif
   {   
   int is_recoverable_error = JK_FALSE;
  -rc = end-service(end, s, xl, is_recoverable_error);
  +rc = end-service(end, s, xl, is_recoverable_error);
   
   if (s.content_read  s.content_length ||
   (s.is_chunked  ! s.no_more_chunks)) {
  @@ -1578,7 +1569,7 @@
   /* bypass the directory_walk and file_walk for non-file requests */
   static int jk_map_to_storage(request_rec *r)
   {
  -if (apr_table_get(r-notes, JK_WORKER_ID)) {
  +if (apr_table_get(r-notes, JK_WORKER_ID) != NULL ) {
   r-filename = (char *)apr_filename_of_pathname(r-uri);
   return OK;
   }
  
  
  
  1.13  +10 -1 jakarta-tomcat-connectors/jk/native/common/jk_global.h
  
  Index: jk_global.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_global.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- jk_global.h   2001/10/31 14:03:22 1.12
  +++ jk_global.h   2001/11/21 00:09:21 1.13
  @@ -59,11 +59,20 @@
* Description: Global definitions and include files that should exist *
*  anywhere   *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.12 $   *
  + * Version: $Revision: 1.13 $   *
***/
   
   #ifndef JK_GLOBAL_H
   #define JK_GLOBAL_H
  +
  +#ifdef NETWARE
  +#define _SYS_TYPES_H_
  +#define _NETDB_H_INCLUDED
  +#define _IN_
  +#define _INET_
  +#define _SYS_TIMEVAL_H_
  +#define _SYS_SOCKET_H_
  +#endif
   
   #include jk_version.h
   
  
  
  
  1.21  +1 -9  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_jk.c  2001/10/31 14:03:22 1.20
  +++ mod_jk.c  2001/11/21 00:09:22 1.21
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   *
*  Dan Milstein [EMAIL PROTECTED]*
*  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.20 $   *
  + * Version: $Revision: 1.21 $   *
***/
   
   /*
  @@ -83,14 +83,6 @@
   /*
* Jakarta (jk_) include files
*/
  -#ifdef NETWARE
  -#define _SYS_TYPES_H_
  -#define _NETDB_H_INCLUDED
  -#define _IN_
  -#define _INET_
  -#define _SYS_TIMEVAL_H_
  -#define _SYS_SOCKET_H_
  

cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2001-09-14 Thread hgomez

hgomez  01/09/14 15:31:36

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Complete the support of chunk encoding and
  add the required content-length which is
  now required by recent ajp13 present in JT
  and which will soon be ported to JTC for
  at least TC 4.0 use (candidate here ?)
  
  Revision  ChangesPath
  1.16  +57 -36jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- mod_jk.c  2001/09/14 17:45:14 1.15
  +++ mod_jk.c  2001/09/14 22:31:36 1.16
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   *
*  Dan Milstein [EMAIL PROTECTED]*
*  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.15 $   *
  + * Version: $Revision: 1.16 $   *
***/
   
   /*
  @@ -118,15 +118,22 @@
* Configuration object for the mod_jk module.
*/
   typedef struct {
  -char *log_file;
  -int  log_level;
  +
  +/*
  + * Log stuff
  + */
  +char*log_file;
  +int log_level;
   jk_logger_t *log;
   
  -char *worker_file;
  -int  mountcopy;
  +/*
  + * Worker stuff
  + */
  +char *worker_file;
   jk_map_t *uri_to_context;
   
  - char * secret_key;
  +int  mountcopy;
  + char *secret_key;
   jk_map_t *automount;
   
   jk_uri_worker_map_t *uw_map;
  @@ -440,35 +447,16 @@
   s-remote_host  = NULL_FOR_EMPTY(s-remote_host);
   
   s-remote_addr  = NULL_FOR_EMPTY(r-connection-remote_ip);
  -/* Wrong:s-server_name  = (char *)ap_get_server_name( r ); */
  -s-server_name= (char *)(r-hostname ? r-hostname : 
r-server-server_hostname);
  -
  -s-server_port= htons( r-connection-local_addr.sin_port );
  -/* Wrong: s-server_port  = r-server-port; */
  -
  +s-server_name  = (char *)(r-hostname ? r-hostname : 
r-server-server_hostname);
   
  -/*Winners:  htons( r-connection-local_addr.sin_port )
  -  (r-hostname ? r-hostname : 
  - r-server-server_hostname),
  -*/
  -/* printf( Port %u %u %u %s %s %s %d %d \n, 
  -ap_get_server_port( r ), 
  -htons( r-connection-local_addr.sin_port ),
  -ntohs( r-connection-local_addr.sin_port ),
  -ap_get_server_name( r ),
  -(r-hostname ? r-hostname : r-server-server_hostname),
  -r-hostname,
  -r-connection-base_server-port,
  -r-server-port
  -);
  -*/
  +s-server_port = htons( r-connection-local_addr.sin_port );
   s-server_software = (char *)ap_get_server_version();
   
  -s-method   = (char *)r-method;
  +s-method = (char *)r-method;
   s-content_length = get_content_length(r);
  -s-is_chunked   = r-read_chunked;
  +s-is_chunked = r-read_chunked;
   s-no_more_chunks = 0;
  -s-query_string = r-args;
  +s-query_string   = r-args;
   
   if (conf-options  JK_OPT_FWDUNPARSED) {
   /*
  @@ -515,10 +503,12 @@
   s-ssl_cipher   = (char *)ap_table_get(r-subprocess_env, 
conf-cipher_indicator);
   s-ssl_session  = (char *)ap_table_get(r-subprocess_env, 
conf-session_indicator);
   
  - /* Servlet 2.3 API */
  -ssl_temp = (char *)ap_table_get(r-subprocess_env, 
conf-key_size_indicator);
  - if (ssl_temp) 
  - s-ssl_key_size = atoi(ssl_temp);
  +if (conf-options  JK_OPT_FWDKEYSIZE) {
  + /* Servlet 2.3 API */
  +ssl_temp = (char *)ap_table_get(r-subprocess_env, 
conf-key_size_indicator);
  + if (ssl_temp) 
  + s-ssl_key_size = atoi(ssl_temp);
  +}
   }
   }
   
  @@ -547,13 +537,17 @@
   s-headers_values   = NULL;
   s-num_headers  = 0;
   if(r-headers_in  ap_table_elts(r-headers_in)) {
  +int need_content_length_header = (!s-is_chunked  s-content_length == 0) 
? JK_TRUE : JK_FALSE;
   array_header *t = ap_table_elts(r-headers_in);
   if(t  t-nelts) {
   int i;
   table_entry *elts = (table_entry *)t-elts;
   s-num_headers = t-nelts;
  -s-headers_names  = ap_palloc(r-pool, sizeof(char *) * t-nelts);
  -s-headers_values = ap_palloc(r-pool, sizeof(char *) * t-nelts);
  +/* 

RE: cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2001-09-14 Thread Schreibman, David

Hi,

Shouldn't content-length be Content-Length? Or are the headers already
forced to lowercase elsewhere?  Or how about a case insensitive comparison
to be nice 

-David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 14, 2001 3:32 PM
To: [EMAIL PROTECTED]
Subject: cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3
mod_jk.c


hgomez  01/09/14 15:31:36

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Complete the support of chunk encoding and
  add the required content-length which is
  now required by recent ajp13 present in JT
  and which will soon be ported to JTC for
  at least TC 4.0 use (candidate here ?)
  
  Revision  ChangesPath
  1.16  +57 -36
jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file:
/home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- mod_jk.c  2001/09/14 17:45:14 1.15
  +++ mod_jk.c  2001/09/14 22:31:36 1.16
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]
*
*  Dan Milstein [EMAIL PROTECTED]
*
*  Henri Gomez [EMAIL PROTECTED]
*
  - * Version: $Revision: 1.15 $
*
  + * Version: $Revision: 1.16 $
*
 
***/
   
   /*
  @@ -118,15 +118,22 @@
* Configuration object for the mod_jk module.
*/
   typedef struct {
  -char *log_file;
  -int  log_level;
  +
  +/*
  + * Log stuff
  + */
  +char*log_file;
  +int log_level;
   jk_logger_t *log;
   
  -char *worker_file;
  -int  mountcopy;
  +/*
  + * Worker stuff
  + */
  +char *worker_file;
   jk_map_t *uri_to_context;
   
  - char * secret_key;
  +int  mountcopy;
  + char *secret_key;
   jk_map_t *automount;
   
   jk_uri_worker_map_t *uw_map;
  @@ -440,35 +447,16 @@
   s-remote_host  = NULL_FOR_EMPTY(s-remote_host);
   
   s-remote_addr  = NULL_FOR_EMPTY(r-connection-remote_ip);
  -/* Wrong:s-server_name  = (char *)ap_get_server_name( r ); */
  -s-server_name= (char *)(r-hostname ? r-hostname :
r-server-server_hostname);
  -
  -s-server_port= htons( r-connection-local_addr.sin_port );
  -/* Wrong: s-server_port  = r-server-port; */
  -
  +s-server_name  = (char *)(r-hostname ? r-hostname :
r-server-server_hostname);
   
  -/*Winners:  htons( r-connection-local_addr.sin_port )
  -  (r-hostname ? r-hostname : 
  - r-server-server_hostname),
  -*/
  -/* printf( Port %u %u %u %s %s %s %d %d \n, 
  -ap_get_server_port( r ), 
  -htons( r-connection-local_addr.sin_port ),
  -ntohs( r-connection-local_addr.sin_port ),
  -ap_get_server_name( r ),
  -(r-hostname ? r-hostname : r-server-server_hostname),
  -r-hostname,
  -r-connection-base_server-port,
  -r-server-port
  -);
  -*/
  +s-server_port = htons( r-connection-local_addr.sin_port );
   s-server_software = (char *)ap_get_server_version();
   
  -s-method   = (char *)r-method;
  +s-method = (char *)r-method;
   s-content_length = get_content_length(r);
  -s-is_chunked   = r-read_chunked;
  +s-is_chunked = r-read_chunked;
   s-no_more_chunks = 0;
  -s-query_string = r-args;
  +s-query_string   = r-args;
   
   if (conf-options  JK_OPT_FWDUNPARSED) {
   /*
  @@ -515,10 +503,12 @@
   s-ssl_cipher   = (char *)ap_table_get(r-subprocess_env,
conf-cipher_indicator);
   s-ssl_session  = (char *)ap_table_get(r-subprocess_env,
conf-session_indicator);
   
  - /* Servlet 2.3 API */
  -ssl_temp = (char *)ap_table_get(r-subprocess_env,
conf-key_size_indicator);
  - if (ssl_temp) 
  - s-ssl_key_size = atoi(ssl_temp);
  +if (conf-options  JK_OPT_FWDKEYSIZE) {
  + /* Servlet 2.3 API */
  +ssl_temp = (char *)ap_table_get(r-subprocess_env,
conf-key_size_indicator);
  + if (ssl_temp) 
  + s-ssl_key_size = atoi(ssl_temp);
  +}
   }
   }
   
  @@ -547,13 +537,17 @@
   s-headers_values   = NULL;
   s-num_headers  = 0;
   if(r-headers_in  ap_table_elts(r-headers_in)) {
  +int need_content_length_header = (!s-is_chunked 
s-content_length == 0) ? JK_TRUE : JK_FALSE;
   array_header *t = ap_table_elts(r-headers_in);
   if(t  t-nelts) {
   int i;
   table_entry *elts = (table_entry *)t-elts

cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2001-08-06 Thread jfclere

jfclere 01/08/06 08:43:30

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Arrange jk_set_log_file: otherwise we need an absolut path for the file
  name!
  
  Revision  ChangesPath
  1.11  +9 -2  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- mod_jk.c  2001/08/03 14:42:45 1.10
  +++ mod_jk.c  2001/08/06 15:43:30 1.11
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   *
*  Dan Milstein [EMAIL PROTECTED]*
*  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.10 $   *
  + * Version: $Revision: 1.11 $   *
***/
   
   /*
  @@ -667,7 +667,14 @@
   jk_server_conf_t *conf =
   (jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module);
   
  -conf-log_file = log_file;
  +if ( log_file[0] != '/' ) {
  +/* we need an absolut path */
  +conf-log_file = ap_server_root_relative(cmd-pool,log_file);
  +} else
  +conf-log_file = ap_pstrdup(cmd-pool,log_file);
  + 
  +if (conf-log_file == NULL)
  +return JkLogFile file_name invalid;
   
   return NULL;
   }
  
  
  



cvs commit: jakarta-tomcat-connectors/jk/native/apache-1.3 mod_jk.c

2001-07-02 Thread hgomez

hgomez  01/07/02 14:18:48

  Modified:jk/native/apache-1.3 mod_jk.c
  Log:
  Added a default virtual host, '*'
  
  Revision  ChangesPath
  1.9   +2 -1  jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_jk.c  2001/06/18 14:37:18 1.8
  +++ mod_jk.c  2001/07/02 21:18:45 1.9
  @@ -61,7 +61,7 @@
* Author:  Gal Shachor [EMAIL PROTECTED]   *
*  Dan Milstein [EMAIL PROTECTED]*
*  Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.8 $   *
  + * Version: $Revision: 1.9 $   *
***/
   
   /*
  @@ -1149,6 +1149,7 @@
   
/* we add the URI-WORKER MAP since workers using AJP14 will 
feed it */
worker_env.uri_to_worker = conf-uw_map;
  +worker_env.virtual   = *; /* for now */
worker_env.server_name   = (char *)ap_get_server_version();
   if(wc_open(init_map, worker_env, conf-log)) {
   /* we don't need this any more so free it */