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

2005-09-21 Thread wrowe
wrowe   2005/09/21 06:59:50

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
Fix the JK_NEED test to follow a 1|0 value instead of ifdef
  
  Revision  ChangesPath
  1.155 +2 -2  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.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- mod_jk.c  12 Sep 2005 22:21:31 -  1.154
  +++ mod_jk.c  21 Sep 2005 13:59:50 -  1.155
  @@ -2433,7 +2433,7 @@
   return HTTP_INTERNAL_SERVER_ERROR;
   }
   
  -#ifdef JK_NEED_SET_MUTEX_PERMS
  +#if JK_NEED_SET_MUTEX_PERMS
   rv = unixd_set_global_mutex_perms(jk_log_lock);
   if (rv != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
  
  
  

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



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

2005-09-21 Thread William A. Rowe, Jr.

Ack - there was a lingering #ifdef JK_NEED_... which should have been an
#if JK_NEED_... - this is fixed in cvs, please retry and thanks for the
detailed report!

Bill

Tim Whittington wrote:

Confused me too.

Error message is listed below.

[exec] cl.exe /nologo /MD /W3 /Zi /O2 /I ..\common /I 
C:\j2sdk1.4.2_07\include /I C:\j2sdk1.4.2_07\include
\win32 /I C:/Program Files/Apache Group/Apache2\include /D NDEBUG 
/D WIN32 /D _WINDOWS /Fo.\Release\\ /Fd.\R

elease\mod_jk_src /FD /c ..\common\jk_worker.c
[exec] jk_worker.c
[exec] cl.exe @C:\TEMP\nm7CC.tmp
[exec] mod_jk.c
[exec] mod_jk.c(2437) : warning C4013: 
'unixd_set_global_mutex_perms' undefined; assuming extern returning int

[exec] link.exe @C:\TEMP\nm7CD.tmp
[exec] LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
[exec] NMAKE : fatal error U1077: 'link.exe' : return code '0x450'
[exec] Stop.



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



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

2005-09-21 Thread Tim Whittington

Sorted.

William A. Rowe, Jr. wrote:


Ack - there was a lingering #ifdef JK_NEED_... which should have been an
#if JK_NEED_... - this is fixed in cvs, please retry and thanks for the
detailed report!

Bill

Tim Whittington wrote:


Confused me too.

Error message is listed below.

[exec] cl.exe /nologo /MD /W3 /Zi /O2 /I ..\common /I 
C:\j2sdk1.4.2_07\include /I C:\j2sdk1.4.2_07\include
\win32 /I C:/Program Files/Apache Group/Apache2\include /D 
NDEBUG /D WIN32 /D _WINDOWS /Fo.\Release\\ /Fd.\R

elease\mod_jk_src /FD /c ..\common\jk_worker.c
[exec] jk_worker.c
[exec] cl.exe @C:\TEMP\nm7CC.tmp
[exec] mod_jk.c
[exec] mod_jk.c(2437) : warning C4013: 
'unixd_set_global_mutex_perms' undefined; assuming extern returning int

[exec] link.exe @C:\TEMP\nm7CD.tmp
[exec] LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
[exec] NMAKE : fatal error U1077: 'link.exe' : return code '0x450'
[exec] Stop.




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



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

2005-09-20 Thread Tim Whittington
This breaks the build on Windows using Microsoft Visual C++ Toolkit 2003 
(at least).

It seems #define FOO 0 on WIN32 is still defined according to #ifdef

Changing

#  define JK_NEED_SET_MUTEX_PERMS 0

to

#  undef JK_NEED_SET_MUTEX_PERMS

fixes the problem

tim

[EMAIL PROTECTED] wrote:


wrowe   2005/09/12 15:21:31

 Modified:jk/native/apache-2.0 mod_jk.c
 Log:
   Modify the test introduced in 1.152 for httpd-2.2 compatibility, the
   new symbol isn't available in httpd-2.0 leading to perms issues.
 
   This patch anticipates that the flag will become a 0|1 flag defined

   always before httpd-2.2 ships.
 
 Revision  ChangesPath

 1.154 +16 -2 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.153
 retrieving revision 1.154
 diff -u -r1.153 -r1.154
 --- mod_jk.c   12 Sep 2005 13:26:06 -  1.153
 +++ mod_jk.c   12 Sep 2005 22:21:31 -  1.154
 @@ -68,7 +68,21 @@
  
  #include apr_strings.h
  
 +/* Yes; sorta sucks - with luck we will clean this up before httpd-2.2

 + * ships, leaving AP_NEED_SET_MUTEX_PERMS def'd as 1 or 0 on all platforms.
 + */
  #ifdef AP_NEED_SET_MUTEX_PERMS
 +# define JK_NEED_SET_MUTEX_PERMS AP_NEED_SET_MUTEX_PERMS
 +#else
 +  /* A special case for httpd-2.0 */
 +# if !defined(OS2)  !defined(WIN32)  !defined(BEOS)  !defined(NETWARE)
 +#  define JK_NEED_SET_MUTEX_PERMS 1
 +# else
 +#  define JK_NEED_SET_MUTEX_PERMS 0
 +# endif
 +#endif
 +
 +#if JK_NEED_SET_MUTEX_PERMS
  #include unixd.h  /* for unixd_set_global_mutex_perms */
  #endif
  /*
 @@ -2419,7 +2433,7 @@
  return HTTP_INTERNAL_SERVER_ERROR;
  }
  
 -#ifdef AP_NEED_SET_MUTEX_PERMS

 +#ifdef JK_NEED_SET_MUTEX_PERMS
  rv = unixd_set_global_mutex_perms(jk_log_lock);
  if (rv != APR_SUCCESS) {
  ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
 
 
 


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

 



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

2005-09-20 Thread William A. Rowe, Jr.

Tim Whittington wrote:
This breaks the build on Windows using Microsoft Visual C++ Toolkit 2003 
(at least).

It seems #define FOO 0 on WIN32 is still defined according to #ifdef


Your suggestion is counterintuitive and reflects, perhaps, a compiler
bug.

It would be very helpful if you would post the *precise* error messages
from msvc 7.  Thanks!

Bill

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



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

2005-09-20 Thread Tim Whittington

Confused me too.

Error message is listed below.

[exec] cl.exe /nologo /MD /W3 /Zi /O2 /I ..\common /I 
C:\j2sdk1.4.2_07\include /I C:\j2sdk1.4.2_07\include
\win32 /I C:/Program Files/Apache Group/Apache2\include /D NDEBUG 
/D WIN32 /D _WINDOWS /Fo.\Release\\ /Fd.\R

elease\mod_jk_src /FD /c ..\common\jk_worker.c
[exec] jk_worker.c
[exec] cl.exe @C:\TEMP\nm7CC.tmp
[exec] mod_jk.c
[exec] mod_jk.c(2437) : warning C4013: 
'unixd_set_global_mutex_perms' undefined; assuming extern returning int

[exec] link.exe @C:\TEMP\nm7CD.tmp
[exec] LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
[exec] NMAKE : fatal error U1077: 'link.exe' : return code '0x450'
[exec] Stop.

William A. Rowe, Jr. wrote:


Tim Whittington wrote:

This breaks the build on Windows using Microsoft Visual C++ Toolkit 
2003 (at least).

It seems #define FOO 0 on WIN32 is still defined according to #ifdef



Your suggestion is counterintuitive and reflects, perhaps, a compiler
bug.

It would be very helpful if you would post the *precise* error messages
from msvc 7.  Thanks!

Bill

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



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

2005-09-12 Thread mturk
mturk   2005/09/12 06:26:07

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix #bug 35809. Patch provided by Christophe Dubach .
  
  Revision  ChangesPath
  1.153 +2 -2  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.152
  retrieving revision 1.153
  diff -u -r1.152 -r1.153
  --- mod_jk.c  12 Jul 2005 19:17:42 -  1.152
  +++ mod_jk.c  12 Sep 2005 13:26:06 -  1.153
  @@ -2102,7 +2102,7 @@
   int i;
   for (i = 0; i  sz; i++) {
   const char *name = jk_map_name_at(src, i);
  -if (jk_map_get(src, name, NULL) == NULL) {
  +if (jk_map_get(dst, name, NULL) == NULL) {
   if (!jk_map_put(dst, name,
   apr_pstrdup(p, jk_map_get_string(src, name, 
NULL)),
   NULL)) {
  
  
  

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



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

2005-09-12 Thread wrowe
wrowe   2005/09/12 15:21:31

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
Modify the test introduced in 1.152 for httpd-2.2 compatibility, the
new symbol isn't available in httpd-2.0 leading to perms issues.
  
This patch anticipates that the flag will become a 0|1 flag defined
always before httpd-2.2 ships.
  
  Revision  ChangesPath
  1.154 +16 -2 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.153
  retrieving revision 1.154
  diff -u -r1.153 -r1.154
  --- mod_jk.c  12 Sep 2005 13:26:06 -  1.153
  +++ mod_jk.c  12 Sep 2005 22:21:31 -  1.154
  @@ -68,7 +68,21 @@
   
   #include apr_strings.h
   
  +/* Yes; sorta sucks - with luck we will clean this up before httpd-2.2
  + * ships, leaving AP_NEED_SET_MUTEX_PERMS def'd as 1 or 0 on all platforms.
  + */
   #ifdef AP_NEED_SET_MUTEX_PERMS
  +# define JK_NEED_SET_MUTEX_PERMS AP_NEED_SET_MUTEX_PERMS
  +#else
  +  /* A special case for httpd-2.0 */
  +# if !defined(OS2)  !defined(WIN32)  !defined(BEOS)  !defined(NETWARE)
  +#  define JK_NEED_SET_MUTEX_PERMS 1
  +# else
  +#  define JK_NEED_SET_MUTEX_PERMS 0
  +# endif
  +#endif
  +
  +#if JK_NEED_SET_MUTEX_PERMS
   #include unixd.h  /* for unixd_set_global_mutex_perms */
   #endif
   /*
  @@ -2419,7 +2433,7 @@
   return HTTP_INTERNAL_SERVER_ERROR;
   }
   
  -#ifdef AP_NEED_SET_MUTEX_PERMS
  +#ifdef JK_NEED_SET_MUTEX_PERMS
   rv = unixd_set_global_mutex_perms(jk_log_lock);
   if (rv != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
  
  
  

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



[Fwd: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c]

2005-09-12 Thread William A. Rowe, Jr.

I didn't miss the SVN conversion horizion?

This needs to hit jk before we roll out 1.2.15.  1.152 broke Apache 2.0
builds (while conforming to Apache 2.2) - so this patch is the umbrella
which addresses both flavors.

Bill

 Original Message 
Subject: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
Date: 12 Sep 2005 22:21:31 -
From: [EMAIL PROTECTED]
Reply-To: Tomcat Developers List tomcat-dev@jakarta.apache.org
To: [EMAIL PROTECTED]

wrowe   2005/09/12 15:21:31

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
Modify the test introduced in 1.152 for httpd-2.2 compatibility, the
new symbol isn't available in httpd-2.0 leading to perms issues.

This patch anticipates that the flag will become a 0|1 flag defined
always before httpd-2.2 ships.

  Revision  ChangesPath
  1.154 +16 -2 
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.153
  retrieving revision 1.154
  diff -u -r1.153 -r1.154
  --- mod_jk.c  12 Sep 2005 13:26:06 -  1.153
  +++ mod_jk.c  12 Sep 2005 22:21:31 -  1.154
  @@ -68,7 +68,21 @@

   #include apr_strings.h

  +/* Yes; sorta sucks - with luck we will clean this up before httpd-2.2
  + * ships, leaving AP_NEED_SET_MUTEX_PERMS def'd as 1 or 0 on all 
platforms.

  + */
   #ifdef AP_NEED_SET_MUTEX_PERMS
  +# define JK_NEED_SET_MUTEX_PERMS AP_NEED_SET_MUTEX_PERMS
  +#else
  +  /* A special case for httpd-2.0 */
  +# if !defined(OS2)  !defined(WIN32)  !defined(BEOS)  
!defined(NETWARE)

  +#  define JK_NEED_SET_MUTEX_PERMS 1
  +# else
  +#  define JK_NEED_SET_MUTEX_PERMS 0
  +# endif
  +#endif
  +
  +#if JK_NEED_SET_MUTEX_PERMS
   #include unixd.h  /* for unixd_set_global_mutex_perms */
   #endif
   /*
  @@ -2419,7 +2433,7 @@
   return HTTP_INTERNAL_SERVER_ERROR;
   }

  -#ifdef AP_NEED_SET_MUTEX_PERMS
  +#ifdef JK_NEED_SET_MUTEX_PERMS
   rv = unixd_set_global_mutex_perms(jk_log_lock);
   if (rv != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,




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


.


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



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

2005-07-12 Thread wrowe
wrowe   2005/07/12 12:17:43

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
Use the same mutex check as we use in the unix MPMs.
  
  Revision  ChangesPath
  1.152 +3 -3  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.151
  retrieving revision 1.152
  diff -u -r1.151 -r1.152
  --- mod_jk.c  16 Jun 2005 06:30:45 -  1.151
  +++ mod_jk.c  12 Jul 2005 19:17:42 -  1.152
  @@ -68,7 +68,7 @@
   
   #include apr_strings.h
   
  -#if APR_USE_SYSVSEM_SERIALIZE || APR_USE_FLOCK_SERIALIZE
  +#ifdef AP_NEED_SET_MUTEX_PERMS
   #include unixd.h  /* for unixd_set_global_mutex_perms */
   #endif
   /*
  @@ -2419,7 +2419,7 @@
   return HTTP_INTERNAL_SERVER_ERROR;
   }
   
  -#if APR_USE_SYSVSEM_SERIALIZE || APR_USE_FLOCK_SERIALIZE
  +#ifdef AP_NEED_SET_MUTEX_PERMS
   rv = unixd_set_global_mutex_perms(jk_log_lock);
   if (rv != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
  
  
  

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



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

2005-06-16 Thread mturk
mturk   2005/06/15 23:30:45

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Remove the second invocation for 'ap_get_module_config'.
  Have no idea why it was called twice, because it can not change during
  the request. Also remove the useless r-uri duplication.
  
  Revision  ChangesPath
  1.151 +11 -32jakarta-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.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- mod_jk.c  19 May 2005 06:31:42 -  1.150
  +++ mod_jk.c  16 Jun 2005 06:30:45 -  1.151
  @@ -1755,7 +1755,6 @@
   {
   const char *worker_name;
   jk_server_conf_t *xconf;
  -jk_server_conf_t *conf;
   int rc, dmt = 1;
   
   /* We do DIR_MAGIC_TYPE here to make sure TC gets all requests, even
  @@ -1767,9 +1766,8 @@
(dmt = strcmp(r-handler, DIR_MAGIC_TYPE)))
   return DECLINED;
   
  -xconf =
  -(jk_server_conf_t *) ap_get_module_config(r-server-module_config,
  -  jk_module);
  +xconf = (jk_server_conf_t *) 
ap_get_module_config(r-server-module_config,
  +  jk_module);
   JK_TRACE_ENTER(xconf-log);
   if (apr_table_get(r-subprocess_env, no-jk)) {
   jk_log(xconf-log, JK_LOG_DEBUG,
  @@ -1819,6 +1817,8 @@
  worker_name, worker_env.num_of_workers, r-uri);
   }
   }
  +if (worker_name)
  +apr_table_setn(r-notes, JK_WORKER_ID, worker_name);
   }
   
   if (JK_IS_DEBUG_LEVEL(xconf-log))
  @@ -1826,9 +1826,6 @@
  r-proxyreq=%d,
 r-handler, worker_name, r-proxyreq);
   
  -conf = (jk_server_conf_t *) 
ap_get_module_config(r-server-module_config,
  - jk_module);
  -
   /* If this is a proxy request, we'll notify an error */
   if (r-proxyreq) {
   jk_log(xconf-log, JK_LOG_INFO, Proxy request for worker=%s
  @@ -1838,20 +1835,6 @@
   return HTTP_INTERNAL_SERVER_ERROR;
   }
   
  -if (conf  !worker_name) {
  -/* Direct mapping ( via setHandler ). Try overrides */
  -char *uri = apr_pstrdup(r-pool, r-uri);
  -worker_name = map_uri_to_worker(conf-uw_map, uri, conf-log);
  -if (!worker_name) {
  -/* Since we are here, an explicit (native) mapping has been used 
*/
  -/* Use default worker */
  -worker_name = ajp14;  /* XXX add a directive for default */
  -}
  -if (worker_name) {
  -apr_table_setn(r-notes, JK_WORKER_ID, worker_name);
  -}
  -}
  -
   if (worker_name) {
   jk_worker_t *worker = wc_get_worker_for_name(worker_name, 
xconf-log);
   
  @@ -1887,12 +1870,12 @@
   s.ws_private = private_data;
   s.pool = private_data.p;
   #ifndef NO_GETTIMEOFDAY
  -if (conf-format != NULL) {
  +if (xconf-format != NULL) {
   gettimeofday(tv_begin, NULL);
   }
   #endif
   
  -if (init_ws_service(private_data, s, conf)) {
  +if (init_ws_service(private_data, s, xconf)) {
   jk_endpoint_t *end = NULL;
   
   /* Use per/thread pool ( or context ) to reuse the
  @@ -1940,7 +1923,7 @@
   return HTTP_INTERNAL_SERVER_ERROR;
   }
   #ifndef NO_GETTIMEOFDAY
  -if (conf-format != NULL) {
  +if (xconf-format != NULL) {
   char *duration = NULL;
   long micro, seconds;
   gettimeofday(tv_end, NULL);
  @@ -1952,7 +1935,7 @@
   seconds = tv_end.tv_sec - tv_begin.tv_sec;
   duration = apr_psprintf(r-pool, %.1ld.%.6ld, seconds, 
micro);
   apr_table_setn(r-notes, JK_DURATION, duration);
  -request_log_transaction(r, conf);
  +request_log_transaction(r, xconf);
   }
   #endif
   
  @@ -2485,7 +2468,6 @@
   
   if (conf) {
   const char *worker;
  -char *uri;
   if ((r-handler != NULL)  (!strcmp(r-handler, JK_HANDLER))) {
   /* Somebody already set the handler, probably manual config
* or native configuration, no need for extra overhead
  @@ -2541,8 +2523,7 @@
   }
   }
   
  -uri = apr_pstrdup(r-pool, r-uri);
  -worker = map_uri_to_worker(conf-uw_map, uri, conf-log);
  +worker = map_uri_to_worker(conf-uw_map, r-uri, conf-log);
   
   if (worker) {
   r-handler = apr_pstrdup(r-pool, JK_HANDLER);
  @@ -2666,7 +2647,6 @@
   
  

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

2005-05-19 Thread mturk
mturk   2005/05/18 23:31:42

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix Apache2 ws_write. There is no need to break the write to 4K
  chunks. Since apache does not write directly to wire but rather
  creates output filter buckets this will also lower the number of buckets
  created.
  
  Revision  ChangesPath
  1.150 +28 -20jakarta-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.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- mod_jk.c  18 May 2005 18:21:59 -  1.149
  +++ mod_jk.c  19 May 2005 06:31:42 -  1.150
  @@ -319,10 +319,12 @@
   
   static void JK_METHOD ws_flush(jk_ws_service_t *s)
   {
  +#ifndef AS400
   if (s  s-ws_private) {
   apache_private_data_t *p = s-ws_private;
   ap_rflush(p-r);
   }
  +#endif
   }
   
   /*
  @@ -341,7 +343,7 @@
   #define CHUNK_SIZE 4096
   #endif
   
  -static int JK_METHOD ws_write(jk_ws_service_t *s, const void *b, unsigned l)
  +static int JK_METHOD ws_write(jk_ws_service_t *s, const void *b, unsigned 
int l)
   {
   #ifdef AS400
   int rc;
  @@ -352,9 +354,9 @@
   
   if (l) {
   /* BUFF *bf = p-r-connection-client; */
  -size_t r = 0;
  -long ll = l;
  -char *bb = (char *)b;
  +int r = 0;
  +int ll = l;
  +const char *bb = (const char *)b;
   
   if (!p-response_started) {
   if (JK_IS_DEBUG_LEVEL(main_log))
  @@ -371,7 +373,8 @@
   return JK_TRUE;
   }
   #ifdef AS400
  -rc = ap_change_response_body_xlate(p-r, 65535, 65535); /* 
turn off response body translation */
  +/* turn off response body translation */
  +rc = ap_change_response_body_xlate(p-r, 65535, 65535);
   if (rc) {
   ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT, 0,
NULL,
  @@ -381,19 +384,24 @@
   }
   #endif
   
  -/* Debug - try to get around rwrite */
  -while (ll  0) {
  -size_t toSend = (ll  CHUNK_SIZE) ? CHUNK_SIZE : ll;
  -r = ap_rwrite((const char *)bb, toSend, p-r);
  -jk_log(main_log, JK_LOG_DEBUG,
  -   writing %ld (%ld) out of %ld, toSend, r, ll);
  -ll -= CHUNK_SIZE;
  -bb += CHUNK_SIZE;
  +while (ll  0  !p-r-connection-aborted) {
  +#if 0
  +/* Apache 2 output filter does not write
  + * directly to the wire.
  + */
  +int toSend = (ll  CHUNK_SIZE) ? CHUNK_SIZE : ll;
  +r = ap_rwrite(bb, toSend, p-r);
  +#else
  +r = ap_rwrite(bb, ll, p-r);
  +#endif
  +if (JK_IS_DEBUG_LEVEL(main_log))
  +jk_log(main_log, JK_LOG_DEBUG,
  +   written %d out of %d, r, ll);
   
  -if (toSend != r) {
  +if (r  0)
   return JK_FALSE;
  -}
  -
  +ll -= r;
  +bb += r;
   }
   }
   
  @@ -1870,7 +1878,7 @@
   private_data.response_started = JK_FALSE;
   private_data.read_body_started = JK_FALSE;
   private_data.r = r;
  -
  +
   wc_maintain(xconf-log);
   
   jk_init_ws_service(s);
  @@ -2406,7 +2414,7 @@
   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)) {
  +if (wc_open(init_map, worker_env, conf-log)) {
   ap_add_version_component(pconf, JK_EXPOSED_VERSION);
   }
   }
  @@ -2418,7 +2426,7 @@
   apr_status_t rv;
   jk_server_conf_t *conf;
   server_rec *srv = s;
  -
  +
   /* create the jk log lockfiles in the parent */
   if ((rv = apr_global_mutex_create(jk_log_lock, NULL,
 APR_LOCK_DEFAULT,
  
  
  

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



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

2005-05-18 Thread mturk
mturk   2005/05/18 11:17:23

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Add  JK_OPT_FLUSHPACKETS to default options.
  
  Revision  ChangesPath
  1.84  +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.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- mod_jk.c  18 May 2005 18:04:52 -  1.83
  +++ mod_jk.c  18 May 2005 18:17:23 -  1.84
  @@ -1879,7 +1879,7 @@
   c-format_string = NULL;
   c-format = NULL;
   c-mountcopy = JK_FALSE;
  -c-options = JK_OPT_FWDURIDEFAULT;
  +c-options = JK_OPT_FWDURIDEFAULT | JK_OPT_FLUSHPACKETS;
   
   /*
* By default we will try to gather SSL info.
  
  
  
  1.147 +2 -2  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.146
  retrieving revision 1.147
  diff -u -r1.146 -r1.147
  --- mod_jk.c  18 May 2005 18:04:52 -  1.146
  +++ mod_jk.c  18 May 2005 18:17:23 -  1.147
  @@ -2048,7 +2048,7 @@
   c-format = NULL;
   c-mountcopy = JK_FALSE;
   c-was_initialized = JK_FALSE;
  -c-options = JK_OPT_FWDURIDEFAULT;
  +c-options = JK_OPT_FWDURIDEFAULT | JK_OPT_FLUSHPACKETS;
   
   /*
* By default we will try to gather SSL info.
  
  
  

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



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

2005-05-18 Thread mturk
mturk   2005/05/18 11:19:31

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Brr... Revert latest commit. We agreed not to flush packets by default.
  
  Revision  ChangesPath
  1.85  +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.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- mod_jk.c  18 May 2005 18:17:23 -  1.84
  +++ mod_jk.c  18 May 2005 18:19:31 -  1.85
  @@ -1879,7 +1879,7 @@
   c-format_string = NULL;
   c-format = NULL;
   c-mountcopy = JK_FALSE;
  -c-options = JK_OPT_FWDURIDEFAULT | JK_OPT_FLUSHPACKETS;
  +c-options = JK_OPT_FWDURIDEFAULT;
   
   /*
* By default we will try to gather SSL info.
  
  
  
  1.148 +2 -2  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.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- mod_jk.c  18 May 2005 18:17:23 -  1.147
  +++ mod_jk.c  18 May 2005 18:19:31 -  1.148
  @@ -2048,7 +2048,7 @@
   c-format = NULL;
   c-mountcopy = JK_FALSE;
   c-was_initialized = JK_FALSE;
  -c-options = JK_OPT_FWDURIDEFAULT | JK_OPT_FLUSHPACKETS;
  +c-options = JK_OPT_FWDURIDEFAULT;
   
   /*
* By default we will try to gather SSL info.
  
  
  

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



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

2005-05-18 Thread mturk
mturk   2005/05/18 11:21:59

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Add missing FlushPackets JkOption.
  
  Revision  ChangesPath
  1.149 +4 -1  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.148
  retrieving revision 1.149
  diff -u -r1.148 -r1.149
  --- mod_jk.c  18 May 2005 18:19:31 -  1.148
  +++ mod_jk.c  18 May 2005 18:21:59 -  1.149
  @@ -1525,6 +1525,9 @@
   else if (!strcasecmp(w, ForwardLocalAddress)) {
   opt = JK_OPT_FWDLOCAL;
   }
  +else if (!strcasecmp(w, FlushPackets)) {
  +opt = JK_OPT_FLUSHPACKETS;
  +}
   else
   return apr_pstrcat(cmd-pool, JkOptions: Illegal option ', w,
  ', NULL);
  
  
  

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



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

2005-05-14 Thread mturk
mturk   2005/05/14 03:08:23

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Call endpoint-done after endpoint-service, because reading dummy
  data might block and enpoint is unavailable althought it should.
  
  Revision  ChangesPath
  1.81  +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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- mod_jk.c  7 May 2005 08:15:47 -   1.80
  +++ mod_jk.c  14 May 2005 10:08:23 -  1.81
  @@ -1756,6 +1756,7 @@
   jk_endpoint_t *end = NULL;
   if (worker-get_endpoint(worker, end, l)) {
   rc = end-service(end, s, l, is_error);
  +end-done(end, l);
   
   if (s.content_read  s.content_length ||
   (s.is_chunked  !s.no_more_chunks)) {
  @@ -1773,7 +1774,6 @@
   }
   }
   }
  -end-done(end, l);
   }
   #ifndef NO_GETTIMEOFDAY
   if (conf-format != NULL) {
  @@ -1797,6 +1797,7 @@
   jk_log(l, JK_LOG_ERROR, Could not init service
   for worker=%s,
  worker_name);
  +jk_close_pool(private_data.p);
   JK_TRACE_EXIT(l);
   return is_error;
   }
  
  
  
  1.144 +3 -3  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.143
  retrieving revision 1.144
  diff -u -r1.143 -r1.144
  --- mod_jk.c  7 May 2005 08:15:47 -   1.143
  +++ mod_jk.c  14 May 2005 10:08:23 -  1.144
  @@ -1895,7 +1895,7 @@
   if (worker-get_endpoint(worker, end, xconf-log)) {
   rc = end-service(end, s, xconf-log,
 is_error);
  -
  +end-done(end, xconf-log);
   if (s.content_read  s.content_length ||
   (s.is_chunked  !s.no_more_chunks)) {
   
  @@ -1913,7 +1913,6 @@
   }
   }
   }
  -end-done(end, xconf-log);
   }
   else {/* this means we couldn't get an endpoint 
*/
   jk_log(xconf-log, JK_LOG_ERROR, Could not get endpoint
  @@ -1926,6 +1925,7 @@
   jk_log(xconf-log, JK_LOG_ERROR, Could not init service
   for worker=%s,
  worker_name);
  +jk_close_pool(private_data.p);
   JK_TRACE_EXIT(xconf-log);
   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-2.0 mod_jk.c

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

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Assure singleton call to wc_close.
  
  Revision  ChangesPath
  1.142 +6 -3  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.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- mod_jk.c  28 Apr 2005 11:28:46 -  1.141
  +++ mod_jk.c  30 Apr 2005 06:02:19 -  1.142
  @@ -1996,12 +1996,13 @@
   (jk_server_conf_t *) ap_get_module_config(s-module_config,
 jk_module);
   
  -if (conf) {
  +if (conf  conf-worker_properties) {
   /* On pool cleanup pass NULL for the jk_logger to
  prevent segmentation faults on Windows because
  we can't guarantee what order pools get cleaned
  up between APR implementations. */
  -wc_close(NULL);
  +if (conf-was_initialized)
  +wc_close(NULL);
   if (conf-worker_properties)
   jk_map_free(conf-worker_properties);
   if (conf-uri_to_context)
  @@ -2010,6 +2011,8 @@
   jk_map_free(conf-automount);
   if (conf-uw_map)
   uri_worker_map_free(conf-uw_map, NULL);
  +conf-was_initialized   = JK_FALSE;
  +conf-worker_properties = NULL;
   }
   s = s-next;
   }
  
  
  

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



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

2005-04-28 Thread mturk
mturk   2005/04/28 04:28:46

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Add default 'logs/jk-runtime-status' if JkShmFile was not specified.
  
  Revision  ChangesPath
  1.78  +10 -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.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- mod_jk.c  24 Apr 2005 10:02:16 -  1.77
  +++ mod_jk.c  28 Apr 2005 11:28:45 -  1.78
  @@ -1979,6 +1979,15 @@
   main_log = conf-log;
   }
   }
  +#if !defined(WIN32)  !defined(NETWARE)
  +if (!jk_shm_file) {
  +jk_shm_file = ap_server_root_relative(p, logs/jk-runtime-status);
  +if (jk_shm_file)
  +ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, NULL,
  + No JkShmFile defined in httpd.conf. 
  + Using default %s, jk_shm_file);
  +}
  +#endif
   
   if ((rc = jk_shm_open(jk_shm_file, jk_shm_size, conf-log)) == 0) {
   if (JK_IS_DEBUG_LEVEL(conf-log))
  
  
  
  1.141 +11 -1 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.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- mod_jk.c  24 Apr 2005 10:02:16 -  1.140
  +++ mod_jk.c  28 Apr 2005 11:28:46 -  1.141
  @@ -2329,6 +2329,16 @@
   /* jk_map_t *init_map = NULL; */
   jk_map_t *init_map = conf-worker_properties;
   
  +#if !defined(WIN32)  !defined(NETWARE)
  +if (!jk_shm_file) {
  +jk_shm_file = ap_server_root_relative(pconf, 
logs/jk-runtime-status);
  +if (jk_shm_file)
  +ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO,
  + 0, NULL,
  + No JkShmFile defined in httpd.conf. 
  + Using default %s, jk_shm_file);
  +}
  +#endif
   if ((rc = jk_shm_open(jk_shm_file, jk_shm_size, conf-log)) == 0) {
   if (JK_IS_DEBUG_LEVEL(conf-log))
   jk_log(conf-log, JK_LOG_DEBUG, Initialized shm:%s,
  
  
  

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



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

2005-04-13 Thread mturk
mturk   2005/04/12 23:34:57

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Add APR_USE_FLOCK_SERIALIZE so that FreeBSD can set the
  child lock permissions. Fixex #34423
  
  Revision  ChangesPath
  1.138 +3 -3  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.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- mod_jk.c  11 Apr 2005 07:02:19 -  1.137
  +++ mod_jk.c  13 Apr 2005 06:34:57 -  1.138
  @@ -68,7 +68,7 @@
   
   #include apr_strings.h
   
  -#if APR_USE_SYSVSEM_SERIALIZE
  +#if APR_USE_SYSVSEM_SERIALIZE || APR_USE_FLOCK_SERIALIZE
   #include unixd.h  /* for unixd_set_global_mutex_perms */
   #endif
   /*
  @@ -2401,7 +2401,7 @@
   return HTTP_INTERNAL_SERVER_ERROR;
   }
   
  -#if APR_USE_SYSVSEM_SERIALIZE
  +#if APR_USE_SYSVSEM_SERIALIZE || APR_USE_FLOCK_SERIALIZE
   rv = unixd_set_global_mutex_perms(jk_log_lock);
   if (rv != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
  
  
  

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



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

2005-04-13 Thread mturk
mturk   2005/04/13 01:27:39

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix logging for worker names, so it makes more sense what is happening.
  
  Revision  ChangesPath
  1.139 +5 -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.138
  retrieving revision 1.139
  diff -u -r1.138 -r1.139
  --- mod_jk.c  13 Apr 2005 06:34:57 -  1.138
  +++ mod_jk.c  13 Apr 2005 08:27:39 -  1.139
  @@ -1785,9 +1785,8 @@
   worker_name = worker_env.worker_list[0];
   if (JK_IS_DEBUG_LEVEL(xconf-log))
   jk_log(xconf-log, JK_LOG_DEBUG,
  -   Manual configuration for %s %s %d,
  -   r-uri, worker_env.worker_list[0],
  -   worker_env.num_of_workers);
  +   Single worker (%s) configuration for %s,
  +   worker_name, r-uri);
   }
   else {
   worker_name = map_uri_to_worker(xconf-uw_map, r-uri, 
xconf-log);
  @@ -1795,8 +1794,8 @@
   worker_name = worker_env.worker_list[0];
   if (JK_IS_DEBUG_LEVEL(xconf-log))
   jk_log(xconf-log, JK_LOG_DEBUG,
  -   Manual configuration for %s %d,
  -   r-uri, worker_env.worker_list[0]);
  +   Using first worker (%s) from %d workers for %s,
  +   worker_name, worker_env.num_of_workers, r-uri);
   }
   }
   }
  
  
  

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



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

2005-04-11 Thread mturk
mturk   2005/04/10 23:55:23

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix compile time warnings about no previous prototype..
  
  Revision  ChangesPath
  1.136 +5 -4  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.135
  retrieving revision 1.136
  diff -u -r1.135 -r1.136
  --- mod_jk.c  9 Apr 2005 15:44:35 -   1.135
  +++ mod_jk.c  11 Apr 2005 06:55:23 -  1.136
  @@ -1474,7 +1474,8 @@
*  ForwardDirectories   = Forward all directory requests with no index 
files to Tomcat
*/
   
  -const char *jk_set_options(cmd_parms * cmd, void *dummy, const char *line)
  +static const char *jk_set_options(cmd_parms * cmd, void *dummy,
  +  const char *line)
   {
   int opt = 0;
   int mask = 0;
  @@ -1717,7 +1718,7 @@
   
   /** Util - cleanup endpoint.
*/
  -apr_status_t jk_cleanup_endpoint(void *data)
  +static apr_status_t jk_cleanup_endpoint(void *data)
   {
   jk_endpoint_t *end = (jk_endpoint_t *)data;
   /* printf(XXX jk_cleanup1 %ld\n, data); */
  @@ -1727,7 +1728,7 @@
   
   /** Util - cleanup shmem.
*/
  -apr_status_t jk_cleanup_shmem(void *data)
  +static apr_status_t jk_cleanup_shmem(void *data)
   {
   jk_logger_t *l = 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-2.0 mod_jk.c

2005-04-11 Thread mturk
mturk   2005/04/11 00:02:19

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Remove unused function jk_cleanup_endpoint.
  
  Revision  ChangesPath
  1.137 +1 -11 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.136
  retrieving revision 1.137
  diff -u -r1.136 -r1.137
  --- mod_jk.c  11 Apr 2005 06:55:23 -  1.136
  +++ mod_jk.c  11 Apr 2005 07:02:19 -  1.137
  @@ -1716,16 +1716,6 @@
   /* The JK module handlers
*/
   /* = 
*/
   
  -/** Util - cleanup endpoint.
  - */
  -static apr_status_t jk_cleanup_endpoint(void *data)
  -{
  -jk_endpoint_t *end = (jk_endpoint_t *)data;
  -/* printf(XXX jk_cleanup1 %ld\n, data); */
  -end-done(end, NULL);
  -return 0;
  -}
  -
   /** Util - cleanup shmem.
*/
   static apr_status_t jk_cleanup_shmem(void *data)
  
  
  

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



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

2005-04-09 Thread glenn
glenn   2005/04/09 08:44:35

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  BUG: 34357 Apache 2 JkAutoAlias segfault
  
  In some situations Apache 2 mod_jk could segfault
  when the JkAutoAlias directive is used.
  
  Added an additional null pointer test.
  
  Revision  ChangesPath
  1.135 +3 -2  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.134
  retrieving revision 1.135
  diff -u -r1.134 -r1.135
  --- mod_jk.c  26 Mar 2005 09:37:10 -  1.134
  +++ mod_jk.c  9 Apr 2005 15:44:35 -   1.135
  @@ -2482,7 +2482,8 @@
   /* Special case to make sure that apache can serve a directory
  listing if there are no matches for the DirectoryIndex and
  Tomcat webapps are mapped into apache using JkAutoAlias. */
  -if (r-main != NULL  (conf-alias_dir != NULL) 
  +if (r-main != NULL  r-main-handler != NULL 
  +(conf-alias_dir != NULL) 
   !strcmp(r-main-handler, DIR_MAGIC_TYPE)) {
   
   /* Append the request uri to the JkAutoAlias directory and
  
  
  

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



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

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

  Modified:jk/native/apache-2.0 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.134 +4 -4  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.133
  retrieving revision 1.134
  diff -u -r1.133 -r1.134
  --- mod_jk.c  24 Mar 2005 10:19:19 -  1.133
  +++ mod_jk.c  26 Mar 2005 09:37:10 -  1.134
  @@ -38,7 +38,6 @@
   #include http_main.h
   #include http_log.h
   #include util_script.h
  -
   #include ap_mpm.h
   
   #ifdef AS400
  @@ -1964,12 +1963,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(xconf-log, JK_LOG_INFO, Aborting connection
   for worker=%s,
  worker_name);
   JK_TRACE_EXIT(xconf-log);
  -return OK;
  +return is_error;
   }
   else {
   jk_log(xconf-log, 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-2.0 mod_jk.c

2005-03-18 Thread mturk
mturk   2005/03/18 00:14:42

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix STARTUP logging and use EMERG errors for missing JkShmFile
  
  Revision  ChangesPath
  1.132 +14 -9 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.131
  retrieving revision 1.132
  diff -u -r1.131 -r1.132
  --- mod_jk.c  17 Mar 2005 12:06:03 -  1.131
  +++ mod_jk.c  18 Mar 2005 08:14:42 -  1.132
  @@ -298,7 +298,7 @@
   #ifdef AS400
   int long rv = OK;
   if (rv = ap_change_request_body_xlate(p-r, 65535, 65535)) { 
   /* turn off request body translation */
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT, 0,
NULL,
mod_jk: Error on ap_change_request_body_xlate, 
rc=%d,
rv);
  @@ -368,7 +368,7 @@
   #ifdef AS400
   rc = ap_change_response_body_xlate(p-r, 65535, 65535); /* 
turn off response body translation */
   if (rc) {
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT, 0,
NULL,
mod_jk: Error on 
ap_change_response_body_xlate, rc=%d,
rc);
  @@ -396,7 +396,7 @@
*/
   #ifndef AS400
   if (ap_rflush(p-r) != APR_SUCCESS) {
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT, 0,
NULL, mod_jk: Error flushing);
   return JK_FALSE;
   }
  @@ -2181,7 +2181,7 @@
   status = apr_file_write(p-jklogfp, what, wrote);
   if (status != APR_SUCCESS) {
   apr_strerror(status, error, 254);
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 
0,
  +ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0,
NULL,
mod_jk: jk_log_to_file %s failed: %s,
what, error);
  @@ -2349,11 +2349,16 @@
   jk_log(conf-log, JK_LOG_ERROR, Initializing shm:%s errno=%d,
  jk_shm_name(), rc);
   #if !defined(WIN32)  !defined(NETWARE)
  -if (!jk_shm_file)
  -ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO,
  +if (!jk_shm_file) {
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT,
0, NULL,
No JkShmFile defined in httpd.conf. 
LoadBalancer will not function properly!);
  +ap_log_error(APLOG_MARK, APLOG_EMERG | APLOG_NOERRNO,
  + 0, NULL,
  + No JkShmFile defined in httpd.conf. 
  + LoadBalancer will not function properly!);
  +}
   #endif
   
   /* Set default connection cache size for worker mpm */
  @@ -2374,8 +2379,8 @@
   /* if(map_alloc(init_map)) { */
   if (!jk_map_read_properties(init_map, conf-worker_file, NULL)) {
   if (jk_map_size(init_map) == 0) {
  -ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO,
  - APLOG_EMERG, NULL,
  +ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_CRIT,
  + 0, 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-2.0 mod_jk.c

2005-02-22 Thread mturk
mturk   2005/02/22 06:40:39

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Use log warning if JkShmFile was not defined on non WIN32/NETWARE.
  
  Revision  ChangesPath
  1.73  +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.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- mod_jk.c  21 Feb 2005 18:00:41 -  1.72
  +++ mod_jk.c  22 Feb 2005 14:40:36 -  1.73
  @@ -1985,7 +1985,7 @@
   else
   jk_log(conf-log, JK_LOG_ERROR, Initializing shm:%s errno=%d,
  jk_shm_name(), rc);
  -#if !defined (WIN32) || !defined(NETWARE)
  +#if !defined(WIN32)  !defined(NETWARE)
   if (!jk_shm_file)
   ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, NULL,
No JkShmFile defined in httpd.conf. 
  
  
  
  1.130 +2 -2  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.129
  retrieving revision 1.130
  diff -u -r1.129 -r1.130
  --- mod_jk.c  21 Feb 2005 18:00:41 -  1.129
  +++ mod_jk.c  22 Feb 2005 14:40:37 -  1.130
  @@ -2348,7 +2348,7 @@
   else
   jk_log(conf-log, JK_LOG_ERROR, Initializing shm:%s errno=%d,
  jk_shm_name(), rc);
  -#if !defined (WIN32) || !defined(NETWARE)
  +#if !defined(WIN32)  !defined(NETWARE)
   if (!jk_shm_file)
   ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO,
0, NULL,
  
  
  

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



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

2005-02-21 Thread mturk
mturk   2005/02/21 00:29:17

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Add JkMountFile directive. This enables to dynamically add or remove
  uri mappings without restarting apache. To disable uri mapping add a
  minus '-' sign in front of mapping.
  
  Revision  ChangesPath
  1.71  +52 -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.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- mod_jk.c  17 Feb 2005 15:03:15 -  1.70
  +++ mod_jk.c  21 Feb 2005 08:29:17 -  1.71
  @@ -95,6 +95,7 @@
*/
   jk_map_t *worker_properties;
   char *worker_file;
  +char *mount_file;
   jk_map_t *uri_to_context;
   
   int mountcopy;
  @@ -798,6 +799,38 @@
   }
   
   /*
  + * JkMountFile Directive Handling
  + *
  + * JkMountFile file
  + */
  +
  +static const char *jk_set_mount_file(cmd_parms * cmd,
  + void *dummy, char *mount_file)
  +{
  +server_rec *s = cmd-server;
  +struct stat statbuf;
  +
  +jk_server_conf_t *conf =
  +(jk_server_conf_t *) ap_get_module_config(s-module_config,
  +  jk_module);
  +
  +/* we need an absolut path (ap_server_root_relative does the ap_pstrdup) 
*/
  +conf-mount_file = ap_server_root_relative(cmd-pool, mount_file);
  +
  +#ifdef CHROOTED_APACHE
  +ap_server_strip_chroot(conf-mount_file, 0);
  +#endif
  +
  +if (conf-mount_file == NULL)
  +return JkMountFile file name invalid;
  +
  +if (stat(conf-mount_file, statbuf) == -1)
  +return Can't find the mount file specified;
  +
  +return NULL;
  +}
  +
  +/*
* JkLogFile Directive Handling
*
* JkLogFile file
  @@ -1519,6 +1552,16 @@
the name of a worker file for the Jakarta servlet containers},
   
   /*
  + * JkMountFile specifies a full path to the location of the
  + * uriworker properties file.
  + *
  + * This file defines the different mapping for workers used by apache
  + * to redirect servlet requests.
  + */
  +{JkMountFile, jk_set_mount_file, NULL, RSRC_CONF, TAKE1,
  + the name of a mount file for the Jakarta servlet uri mappings},
  +
  +/*
* JkAutoMount specifies that the list of handled URLs must be
* asked to the servlet engine (autoconf feature)
*/
  @@ -1788,6 +1831,7 @@
   c-worker_properties = NULL;
   jk_map_alloc(c-worker_properties);
   c-worker_file = NULL;
  +c-mount_file = NULL;
   c-log_file = NULL;
   c-log_level = -1;
   c-log = NULL;
  @@ -1883,6 +1927,7 @@
   copy_jk_map(p, overrides-s, base-uri_to_context,
   overrides-uri_to_context);
   copy_jk_map(p, overrides-s, base-automount, overrides-automount);
  +overrides-mount_file = base-mount_file;
   }
   
   if (base-envvars_in_use) {
  @@ -1964,7 +2009,7 @@
   
   /*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, NULL)) {
   
   if (jk_map_size(init_map) == 0) {
   ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  @@ -1984,7 +2029,11 @@
   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 */
  +/* XXX: For each virtual host? */
  +if (conf  conf-mount_file) {
  +conf-uw_map-fname = conf-mount_file;
  +uri_worker_map_load(conf-uw_map, conf-log);
  +}
   return;
   }
   
  
  
  
  1.128 +56 -7 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.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- mod_jk.c  17 Feb 2005 15:03:15 -  1.127
  +++ mod_jk.c  21 Feb 2005 08:29:17 -  1.128
  @@ -130,6 +130,7 @@
*/
   jk_map_t *worker_properties;
   char *worker_file;
  +char *mount_file;
   jk_map_t *uri_to_context;
   
   int mountcopy;
  @@ -844,6 +845,34 @@
   }
   
   /*
  + * JkMountFile Directive Handling
  + *
  + * JkMountFile file
  + */
  +
  +static const char *jk_set_mount_file(cmd_parms * cmd,
  + void *dummy, const char *mount_file)
  +{
  +server_rec *s = cmd-server;
  +struct stat statbuf;
  +
  +jk_server_conf_t *conf =
  +(jk_server_conf_t *) 

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

2005-02-21 Thread mturk
mturk   2005/02/21 10:00:41

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Add apache log warning if shared memory is not defined for
  unix platforms. Although it will work, the dynamic config will be unavailable,
  so inform the user about that fact.
  
  Revision  ChangesPath
  1.72  +7 -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.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- mod_jk.c  21 Feb 2005 08:29:17 -  1.71
  +++ mod_jk.c  21 Feb 2005 18:00:41 -  1.72
  @@ -1985,6 +1985,12 @@
   else
   jk_log(conf-log, JK_LOG_ERROR, Initializing shm:%s errno=%d,
  jk_shm_name(), rc);
  +#if !defined (WIN32) || !defined(NETWARE)
  +if (!jk_shm_file)
  +ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, NULL,
  + No JkShmFile defined in httpd.conf. 
  + LoadBalancer will not function properly!);
  +#endif

   /* SREVILAK -- register cleanup handler to clear resources on restart,
* to make sure log file gets closed in the parent process  */
  
  
  
  1.129 +9 -2  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.128
  retrieving revision 1.129
  diff -u -r1.128 -r1.129
  --- mod_jk.c  21 Feb 2005 08:29:17 -  1.128
  +++ mod_jk.c  21 Feb 2005 18:00:41 -  1.129
  @@ -2348,6 +2348,13 @@
   else
   jk_log(conf-log, JK_LOG_ERROR, Initializing shm:%s errno=%d,
  jk_shm_name(), rc);
  +#if !defined (WIN32) || !defined(NETWARE)
  +if (!jk_shm_file)
  +ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO,
  + 0, NULL,
  + No JkShmFile defined in httpd.conf. 
  + LoadBalancer will not function properly!);
  +#endif
   
   /* Set default connection cache size for worker mpm */
   #if APR_HAS_THREADS
  @@ -2392,7 +2399,7 @@
   apr_status_t rv;
   jk_server_conf_t *conf;
   server_rec *srv = s;
  -
  +
   /* create the jk log lockfiles in the parent */
   if ((rv = apr_global_mutex_create(jk_log_lock, NULL,
 APR_LOCK_DEFAULT,
  
  
  

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



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

2005-02-14 Thread mturk
mturk   2005/02/14 23:30:50

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Add $(ServerRoot) to map properties.
  
  Revision  ChangesPath
  1.68  +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.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- mod_jk.c  14 Feb 2005 10:36:12 -  1.67
  +++ mod_jk.c  15 Feb 2005 07:30:49 -  1.68
  @@ -1817,6 +1817,7 @@
   c-envvars = ap_make_table(p, 0);
   
   c-s = s;
  +jk_map_put(c-worker_properties, ServerRoot, ap_server_root, NULL);
   
   return c;
   }
  @@ -1927,7 +1928,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));
   }
   }
   */
  
  
  
  1.125 +2 -2  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.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- mod_jk.c  13 Feb 2005 12:24:18 -  1.124
  +++ mod_jk.c  15 Feb 2005 07:30:49 -  1.125
  @@ -2026,7 +2026,7 @@
   c-envvars = apr_table_make(p, 0);
   
   c-s = s;
  -
  +jk_map_put(c-worker_properties, ServerRoot, ap_server_root, NULL);
   apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, 
jk_apr_pool_cleanup);
   return c;
   }
  
  
  

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



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

2005-02-13 Thread mturk
mturk   2005/02/13 04:24:18

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Implement new API calls for shm and set vhost uriworker_map
  
  Revision  ChangesPath
  1.124 +13 -12jakarta-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.123
  retrieving revision 1.124
  diff -u -r1.123 -r1.124
  --- mod_jk.c  12 Feb 2005 11:55:33 -  1.123
  +++ mod_jk.c  13 Feb 2005 12:24:18 -  1.124
  @@ -670,7 +670,7 @@
   s-num_headers++;
   }
   }
  -
  +s-uw_map = conf-uw_map;
   return JK_TRUE;
   }
   
  @@ -1731,21 +1731,22 @@
 ( lb is a bit special, it should count as a single worker but
 I'm not sure how ). We also have a manual config directive that
 explicitely give control to us. */
  -worker_name = worker_env.first_worker;
  +worker_name = worker_env.worker_list[0];
   if (JK_IS_DEBUG_LEVEL(xconf-log))
   jk_log(xconf-log, JK_LOG_DEBUG,
  Manual configuration for %s %s %d,
  -   r-uri, worker_env.first_worker,
  +   r-uri, worker_env.worker_list[0],
  worker_env.num_of_workers);
   }
   else {
   worker_name = map_uri_to_worker(xconf-uw_map, r-uri, 
xconf-log);
  -if (worker_name == NULL)
  -worker_name = worker_env.first_worker;
  -if (JK_IS_DEBUG_LEVEL(xconf-log))
  -jk_log(xconf-log, JK_LOG_DEBUG,
  -   Manual configuration for %s %d,
  -   r-uri, worker_env.first_worker);
  +if (worker_name == NULL  worker_env.num_of_workers) {
  +worker_name = worker_env.worker_list[0];
  +if (JK_IS_DEBUG_LEVEL(xconf-log))
  +jk_log(xconf-log, JK_LOG_DEBUG,
  +   Manual configuration for %s %d,
  +   r-uri, worker_env.worker_list[0]);
  +}
   }
   }
   
  @@ -2238,7 +2239,7 @@
   
   JK_TRACE_ENTER(conf-log);
   
  -if ((rc = jk_shm_attach(jk_shm_file)) == 0) {
  +if ((rc = jk_shm_attach(jk_shm_file, conf-log)) == 0) {
   if (JK_IS_DEBUG_LEVEL(conf-log))
   jk_log(conf-log, JK_LOG_DEBUG, Attached shm:%s,
  jk_shm_name());
  @@ -2272,7 +2273,7 @@
   /* jk_map_t *init_map = NULL; */
   jk_map_t *init_map = conf-worker_properties;
   
  -if ((rc = jk_shm_open(jk_shm_file)) == 0) {
  +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);
  
  
  

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



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

2005-02-08 Thread mturk
mturk   2005/02/08 23:39:08

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Move jk_set_worker_def_cache_size to post config hook, so that
  it is set before the jk configuration is parsed.
  
  Revision  ChangesPath
  1.122 +12 -12jakarta-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.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- mod_jk.c  7 Feb 2005 19:07:38 -   1.121
  +++ mod_jk.c  9 Feb 2005 07:39:08 -   1.122
  @@ -2225,7 +2225,6 @@
   static void jk_child_init(apr_pool_t * pconf, server_rec * s)
   {
   jk_server_conf_t *conf;
  -int mpm_threads = 1;
   apr_status_t rv;
   int rc;
   
  @@ -2239,15 +2238,6 @@
   
   JK_TRACE_ENTER(conf-log);
   
  -/* Set default connection cache size for worker mpm */
  -#if APR_HAS_THREADS
  -#ifndef AS400
  -ap_mpm_query(AP_MPMQ_MAX_THREADS, mpm_threads);
  -#endif
  -#endif
  -if (mpm_threads  0)
  -jk_set_worker_def_cache_size(mpm_threads);
  -
   if ((rc = jk_shm_attach(jk_shm_file)) == 0) {
   if (JK_IS_DEBUG_LEVEL(conf-log))
   jk_log(conf-log, JK_LOG_DEBUG, Attached shm:%s,
  @@ -2277,10 +2267,11 @@
   server_rec * s)
   {
   int rc;
  +int mpm_threads = 1;
  +
   /* jk_map_t *init_map = NULL; */
   jk_map_t *init_map = conf-worker_properties;
   
  -;
   if ((rc = jk_shm_open(jk_shm_file)) == 0) {
   if (JK_IS_DEBUG_LEVEL(conf-log))
   jk_log(conf-log, JK_LOG_DEBUG, Initialized shm:%s,
  @@ -2292,6 +2283,15 @@
   jk_log(conf-log, JK_LOG_ERROR, Initializing shm:%s errno=%d,
  jk_shm_name(), rc);
   
  +/* Set default connection cache size for worker mpm */
  +#if APR_HAS_THREADS
  +#ifndef AS400
  +if (ap_mpm_query(AP_MPMQ_MAX_THREADS, mpm_threads) != APR_SUCCESS)
  +mpm_threads = 1;
  +#endif
  +#endif
  + jk_set_worker_def_cache_size(mpm_threads);
  +
   if (!uri_worker_map_alloc((conf-uw_map),
 conf-uri_to_context,
 conf-log)) {
  
  
  

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



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

2005-02-07 Thread mturk
mturk   2005/02/07 11:07:38

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Use new shmem api that uses single instance shared memory.
  
  Revision  ChangesPath
  1.121 +23 -18jakarta-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.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- mod_jk.c  6 Feb 2005 13:30:34 -   1.120
  +++ mod_jk.c  7 Feb 2005 19:07:38 -   1.121
  @@ -190,7 +190,6 @@
   static jk_worker_env_t worker_env;
   static apr_global_mutex_t *jk_log_lock = NULL;
   static char *jk_shm_file = NULL;
  -static jk_shm_t jk_shmem = { 0, NULL, -1, NULL, 0};
   
   static int JK_METHOD ws_start_response(jk_ws_service_t *s,
  int status,
  @@ -1670,10 +1669,11 @@
*/
   apr_status_t jk_cleanup_shmem(void *data)
   {
  -if (jk_shmem.base) {
  -jk_shm_close(jk_shmem);
  -jk_shmem.base = NULL;
  -}
  +jk_logger_t *l = data;
  +jk_shm_close();
  +if (l  JK_IS_DEBUG_LEVEL(l))
  +   jk_log(l, JK_LOG_DEBUG, Shmem cleanup);
  +
   return 0;
   }
   
  @@ -2248,14 +2248,16 @@
   if (mpm_threads  0)
   jk_set_worker_def_cache_size(mpm_threads);
   
  -rc = jk_shm_attach(jk_shm_file, 0, 0, jk_shmem);
  -if (JK_IS_DEBUG_LEVEL(conf-log))
  -jk_log(conf-log, JK_LOG_DEBUG, Attached shm:%s with status %d,
  -   jk_shmem.filename, rc);
  -if (!rc) {
  -apr_pool_cleanup_register(pconf, s, jk_cleanup_shmem,
  +if ((rc = jk_shm_attach(jk_shm_file)) == 0) {
  +if (JK_IS_DEBUG_LEVEL(conf-log))
  +jk_log(conf-log, JK_LOG_DEBUG, Attached shm:%s,
  +   jk_shm_name());
  +apr_pool_cleanup_register(pconf, conf-log, jk_cleanup_shmem,
jk_cleanup_shmem);
   }
  +else
  +jk_log(conf-log, JK_LOG_ERROR, Attachning shm:%s errno=%d,
  +   jk_shm_name(), rc);
   
   if (JK_IS_DEBUG_LEVEL(conf-log))
   jk_log(conf-log, JK_LOG_DEBUG, Initialized %s, 
JK_EXPOSED_VERSION);
  @@ -2278,14 +2280,17 @@
   /* jk_map_t *init_map = NULL; */
   jk_map_t *init_map = conf-worker_properties;
   
  -rc = jk_shm_open(jk_shm_file, 0, 0, jk_shmem);
  -if (JK_IS_DEBUG_LEVEL(conf-log))
  -jk_log(conf-log, JK_LOG_DEBUG, Initialized shm:%s with status %d,
  -   jk_shmem.filename, rc);
  -if (!rc) {
  -apr_pool_cleanup_register(pconf, s, jk_cleanup_shmem,
  +;
  +if ((rc = jk_shm_open(jk_shm_file)) == 0) {
  +if (JK_IS_DEBUG_LEVEL(conf-log))
  +jk_log(conf-log, JK_LOG_DEBUG, Initialized shm:%s,
  +   jk_shm_name(), rc);
  +apr_pool_cleanup_register(pconf, conf-log, jk_cleanup_shmem,
 jk_cleanup_shmem);
   }
  +else
  +jk_log(conf-log, JK_LOG_ERROR, Initializing shm:%s errno=%d,
  +   jk_shm_name(), rc);
   
   if (!uri_worker_map_alloc((conf-uw_map),
 conf-uri_to_context,
  
  
  

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



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

2005-02-06 Thread mturk
mturk   2005/02/06 01:33:15

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Initialize log file before initializing JK, so that we can see error
  messages if config has errors.
  
  Revision  ChangesPath
  1.117 +74 -73jakarta-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.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- mod_jk.c  5 Feb 2005 12:41:17 -   1.116
  +++ mod_jk.c  6 Feb 2005 09:33:15 -   1.117
  @@ -56,7 +56,7 @@
   
   /* deprecated with apr 0.9.3 */
   
  -/* 
  +/*
  The latest Apache 2.0.47 for iSeries didn't export apr_filepath_name_get
  but apr_filename_of_pathname, even if includes seems right and the APR
  in use is 0.9.4
  @@ -104,7 +104,7 @@
   
   /*
* If you are not using SSL, comment out the following line. It will make
  - * apache run faster.  
  + * apache run faster.
*
* Personally, I (DM), think this may be a lie.
*/
  @@ -296,7 +296,7 @@
   if (rv = ap_change_request_body_xlate(p-r, 65535, 65535)) { 
   /* turn off request body translation */
   ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
NULL,
  - mod_jk: Error on ap_change_request_body_xlate, 
rc=%d \n,
  + mod_jk: Error on ap_change_request_body_xlate, 
rc=%d,
rv);
   return JK_FALSE;
   }
  @@ -350,7 +350,7 @@
   if (!p-response_started) {
   if (JK_IS_DEBUG_LEVEL(main_log))
   jk_log(main_log, JK_LOG_DEBUG,
  -   Write without start, starting with defaults\n);
  +   Write without start, starting with defaults);
   if (!s-start_response(s, 200, NULL, NULL, NULL, 0)) {
   return JK_FALSE;
   }
  @@ -366,7 +366,7 @@
   if (rc) {
   ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
NULL,
  - mod_jk: Error on 
ap_change_response_body_xlate, rc=%d \n,
  + mod_jk: Error on 
ap_change_response_body_xlate, rc=%d,
rc);
   return JK_FALSE;
   }
  @@ -377,7 +377,7 @@
   size_t toSend = (ll  CHUNK_SIZE) ? CHUNK_SIZE : ll;
   r = ap_rwrite((const char *)bb, toSend, p-r);
   jk_log(main_log, JK_LOG_DEBUG,
  -   writing %ld (%ld) out of %ld \n, toSend, r, ll);
  +   writing %ld (%ld) out of %ld, toSend, r, ll);
   ll -= CHUNK_SIZE;
   bb += CHUNK_SIZE;
   
  @@ -393,7 +393,7 @@
   #ifndef AS400
   if (ap_rflush(p-r) != APR_SUCCESS) {
   ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0,
  - NULL, mod_jk: Error flushing \n);
  + NULL, mod_jk: Error flushing);
   return JK_FALSE;
   }
   #endif
  @@ -480,7 +480,7 @@
*/
   if (JK_IS_DEBUG_LEVEL(conf-log))
   jk_log(conf-log, JK_LOG_DEBUG,
  -   agsp=%u agsn=%s hostn=%s shostn=%s cbsport=%d sport=%d 
claport=%d\n,
  +   agsp=%u agsn=%s hostn=%s shostn=%s cbsport=%d sport=%d 
claport=%d,
  ap_get_server_port(r),
  ap_get_server_name(r) != NULL ? ap_get_server_name(r) : ,
  r-hostname != NULL ? r-hostname : ,
  @@ -556,7 +556,7 @@
   s-is_ssl = JK_FALSE;
   s-ssl_cert = NULL;
   s-ssl_cert_len = 0;
  -s-ssl_cipher = NULL;   /* required by Servlet 2.3 Api, 
  +s-ssl_cipher = NULL;   /* required by Servlet 2.3 Api,
  allready in original ajp13 */
   s-ssl_session = NULL;
   s-ssl_key_size = -1;   /* required by Servlet 2.3 Api, added in jtc 
*/
  @@ -730,7 +730,7 @@
   else {
   if (worker == NULL)
   return JkMount needs a path when not defined in a location;
  -else 
  +else
   return JkMount can not have a path when defined in a location;
   }
   
  @@ -773,7 +773,7 @@
   else {
   if (worker == NULL)
   return JkUnMount needs a path when not defined in a location;
  -else 
  +else
   return JkUnMount can not have a path when defined in a 
location;
   }
   
  @@ -1244,8 +1244,8 @@
* JkRequestLogFormat format string
*
* %b - Bytes sent, excluding HTTP headers. In CLF format
  - * %B - Bytes sent, excluding HTTP headers. 
  - * %H - The request protocol  

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

2005-02-06 Thread mturk
mturk   2005/02/06 03:21:38

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Initialize shared memory and attach in child process.
  
  Revision  ChangesPath
  1.118 +57 -1 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.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- mod_jk.c  6 Feb 2005 09:33:15 -   1.117
  +++ mod_jk.c  6 Feb 2005 11:21:37 -   1.118
  @@ -95,6 +95,7 @@
   #include jk_uri_worker_map.h
   #include jk_util.h
   #include jk_worker.h
  +#include jk_shm.h
   
   #define JK_WORKER_ID(jakarta.worker)
   #define JK_HANDLER  (jakarta-servlet)
  @@ -188,6 +189,8 @@
   static jk_logger_t *main_log = NULL;
   static jk_worker_env_t worker_env;
   static apr_global_mutex_t *jk_log_lock = NULL;
  +static char *jk_shm_file = NULL;
  +static jk_shm_t jk_shmem = { 0, NULL, -1, NULL, 0};
   
   static int JK_METHOD ws_start_response(jk_ws_service_t *s,
  int status,
  @@ -867,6 +870,23 @@
   }
   
   /*
  + * JkShmFile Directive Handling
  + *
  + * JkShmFile file
  + */
  +
  +static const char *jk_set_shm_file(cmd_parms * cmd,
  +   void *dummy, const char *shm_file)
  +{
  +/* we need an absolute path */
  +jk_shm_file = ap_server_root_relative(cmd-pool, shm_file);
  +if (jk_shm_file == NULL)
  +return JkShmFile file name invalid;
  +
  +return NULL;
  +}
  +
  +/*
* JkLogLevel Directive Handling
*
* JkLogLevel debug/info/error/emerg
  @@ -1557,6 +1577,10 @@
*/
   AP_INIT_TAKE1(JkLogFile, jk_set_log_file, NULL, RSRC_CONF,
 Full path to the Jakarta Tomcat module log file),
  +
  +AP_INIT_TAKE1(JkShmFile, jk_set_shm_file, NULL, RSRC_CONF,
  +  Full path to the Jakarta Tomcat module shared memory 
file),
  +
   AP_INIT_TAKE1(JkLogLevel, jk_set_log_level, NULL, RSRC_CONF,
 The Jakarta Tomcat module log level, can be debug, 
 info, error or emerg),
  @@ -1642,6 +1666,17 @@
   return 0;
   }
   
  +/** Util - cleanup shmem.
  + */
  +apr_status_t jk_cleanup_shmem(void *data)
  +{
  +if (jk_shmem.base) {
  +jk_shm_close(jk_shmem);
  +jk_shmem.base = NULL;
  +}
  +return 0;
  +}
  +
   /** Main service method, called to forward a request to tomcat
*/
   static int jk_handler(request_rec * r)
  @@ -2192,6 +2227,7 @@
   jk_server_conf_t *conf;
   int mpm_threads = 1;
   apr_status_t rv;
  +int rc;
   
   conf = ap_get_module_config(s-module_config, jk_module);
   
  @@ -2211,6 +2247,16 @@
   #endif
   if (mpm_threads  0)
   jk_set_worker_def_cache_size(mpm_threads);
  +
  +rc = jk_shm_attach(jk_shm_file, 0, 0, jk_shmem);
  +if (JK_IS_DEBUG_LEVEL(conf-log))
  +jk_log(conf-log, JK_LOG_DEBUG, Attached shm:%s with status %d,
  +   jk_shm_file ? jk_shm_file : memory, rc);
  +if (!rc) {
  +apr_pool_cleanup_register(pconf, s, jk_cleanup_shmem,
  + jk_cleanup_shmem);
  +}
  +
   if (JK_IS_DEBUG_LEVEL(conf-log))
   jk_log(conf-log, JK_LOG_DEBUG, Initialized %s, 
JK_EXPOSED_VERSION);
   JK_TRACE_EXIT(conf-log);
  @@ -2228,9 +2274,19 @@
   static void init_jk(apr_pool_t * pconf, jk_server_conf_t * conf,
   server_rec * s)
   {
  +int rc;
   /* jk_map_t *init_map = NULL; */
   jk_map_t *init_map = conf-worker_properties;
   
  +rc = jk_shm_open(jk_shm_file, 0, 0, jk_shmem);
  +if (JK_IS_DEBUG_LEVEL(conf-log))
  +jk_log(conf-log, JK_LOG_DEBUG, Initialized shm:%s with status %d,
  +   jk_shm_file ? jk_shm_file : memory, rc);
  +if (!rc) {
  +apr_pool_cleanup_register(pconf, s, jk_cleanup_shmem,
  +  jk_cleanup_shmem);
  +}
  +
   if (!uri_worker_map_alloc((conf-uw_map),
 conf-uri_to_context,
 conf-log)) {
  
  
  

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



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

2005-02-06 Thread mturk
mturk   2005/02/06 03:30:46

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Use shmem name since it can be either true filename or memory.
  
  Revision  ChangesPath
  1.119 +2 -2  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.118
  retrieving revision 1.119
  diff -u -r1.118 -r1.119
  --- mod_jk.c  6 Feb 2005 11:21:37 -   1.118
  +++ mod_jk.c  6 Feb 2005 11:30:46 -   1.119
  @@ -2251,7 +2251,7 @@
   rc = jk_shm_attach(jk_shm_file, 0, 0, jk_shmem);
   if (JK_IS_DEBUG_LEVEL(conf-log))
   jk_log(conf-log, JK_LOG_DEBUG, Attached shm:%s with status %d,
  -   jk_shm_file ? jk_shm_file : memory, rc);
  +   jk_shmem.filename, rc);
   if (!rc) {
   apr_pool_cleanup_register(pconf, s, jk_cleanup_shmem,
jk_cleanup_shmem);
  @@ -2281,7 +2281,7 @@
   rc = jk_shm_open(jk_shm_file, 0, 0, jk_shmem);
   if (JK_IS_DEBUG_LEVEL(conf-log))
   jk_log(conf-log, JK_LOG_DEBUG, Initialized shm:%s with status %d,
  -   jk_shm_file ? jk_shm_file : memory, rc);
  +   jk_shmem.filename, rc);
   if (!rc) {
   apr_pool_cleanup_register(pconf, s, jk_cleanup_shmem,
 jk_cleanup_shmem);
  
  
  

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



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

2005-02-05 Thread mturk
mturk   2005/02/05 04:41:17

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Re-open a global log mutex lock in a child process.
  From APR documentation:
  This function must be called to maintain portability, even
  if the underlying lock mechanism does not require it.
  
  Revision  ChangesPath
  1.116 +8 -1  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.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- mod_jk.c  12 Jan 2005 17:23:11 -  1.115
  +++ mod_jk.c  5 Feb 2005 12:41:17 -   1.116
  @@ -2189,9 +2189,16 @@
   {
   jk_server_conf_t *conf;
   int mpm_threads = 1;
  +apr_status_t rv;
   
   conf = ap_get_module_config(s-module_config, jk_module);
   
  +rv = apr_global_mutex_child_init(jk_log_lock, NULL, pconf);
  +if (rv != APR_SUCCESS) {
  +ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
  + mod_jk: could not init JK log lock in child);
  +}
  +
   JK_TRACE_ENTER(conf-log);
   
   /* Set default connection cache size for worker mpm */
  
  
  

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



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

2005-01-12 Thread glenn
glenn   2005/01/12 09:23:11

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix a bug where a mod_dir sub-request was not being handled.
  apr_filepath_name_get() would return an empty string rather than
  a NULL pointer.
  
  PS: Thanks for the recent work on mod_jk.
  
  Revision  ChangesPath
  1.115 +3 -2  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.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- mod_jk.c  7 Jan 2005 09:55:33 -   1.114
  +++ mod_jk.c  12 Jan 2005 17:23:11 -  1.115
  @@ -2530,7 +2530,8 @@
   
   /* Only if sub-request for a directory, most likely from mod_dir */
   if (r-main  r-main-filename 
  -!apr_filepath_name_get(r-main-filename)) {
  +(!apr_filepath_name_get(r-main-filename) ||
  + !strlen(apr_filepath_name_get(r-main-filename {
   
   /* The filename from the main request will be set to what should
* be picked up, aliases included. Tomcat will need to know about
  
  
  

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



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

2005-01-07 Thread hgomez
hgomez  2005/01/07 01:55:33

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  the iSeries version of Apache 2 didn't support yet MPM ;(
  
  Revision  ChangesPath
  1.114 +6 -1  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.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- mod_jk.c  17 Dec 2004 18:08:52 -  1.113
  +++ mod_jk.c  7 Jan 2005 09:55:33 -   1.114
  @@ -38,7 +38,10 @@
   #include http_main.h
   #include http_log.h
   #include util_script.h
  +
  +#ifndef AS400
   #include ap_mpm.h
  +#endif
   
   #ifdef AS400
   #include ap_charset.h
  @@ -2193,7 +2196,9 @@
   
   /* Set default connection cache size for worker mpm */
   #if APR_HAS_THREADS
  +#ifndef AS400
   ap_mpm_query(AP_MPMQ_MAX_THREADS, mpm_threads);
  +#endif
   #endif
   if (mpm_threads  0)
   jk_set_worker_def_cache_size(mpm_threads);
  
  
  

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



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

2005-01-07 Thread Mladen Turk
[EMAIL PROTECTED] wrote:
  +
  +#ifndef AS400
   #include ap_mpm.h
  +#endif
That's wrong IMO.
Look at the Apache modules:
mod_mem_cache
mod_cgid
mod_cgid
mod_info
mod_status
mod_ssl
They all have '#include ap_mpm.h'
So, I suppose that's something wrong with your
apache build not the way how this file should
be included.
If the file is not present inside apache/include
distribution, then it's apache build error,
that we shoudn't fixed like you did thought.
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

2004-12-22 Thread William A. Rowe, Jr.
Wait - you mean to tell me instead of converting the hostname
once to lower - we are strcasecmp'ing every time?  Outch, that 
hurts.

Bill

At 09:14 PM 12/16/2004, [EMAIL PROTECTED] wrote:
billbarker2004/12/16 19:14:56

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Now that the SC lookup is case-insensitive, don't waste cycles converting 
 the header names to lower case
  
  Revision  ChangesPath
  1.60  +2 -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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- mod_jk.c  13 Dec 2004 09:11:24 -  1.59
  +++ mod_jk.c  17 Dec 2004 03:14:56 -  1.60
  @@ -592,12 +592,8 @@
   char *hname = ap_pstrdup(r-pool, elts[i].key);
   s-headers_values[i] = ap_pstrdup(r-pool, elts[i].val);
   s-headers_names[i] = hname;
  -while (*hname) {
  -*hname = tolower(*hname);
  -hname++;
  -}
   if (need_content_length_header 
  -!strncmp(s-headers_values[i], content-length, 14)) {
  +!strcasecmp(s-headers_values[i], content-length)) {
   need_content_length_header = JK_FALSE;
   }
   }
  
  
  
  1.110 +2 -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.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- mod_jk.c  13 Dec 2004 09:10:31 -  1.109
  +++ mod_jk.c  17 Dec 2004 03:14:56 -  1.110
  @@ -636,12 +636,8 @@
   char *hname = apr_pstrdup(r-pool, elts[i].key);
   s-headers_values[i] = apr_pstrdup(r-pool, elts[i].val);
   s-headers_names[i] = hname;
  -while (*hname) {
  -*hname = tolower(*hname);
  -hname++;
  -}
   if (need_content_length_header 
  -!strncmp(s-headers_values[i], content-length, 14)) {
  +!strcasecmp(s-headers_values[i], content-length)) {
   need_content_length_header = JK_FALSE;
   }
   }
  
  
  

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


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



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

2004-12-22 Thread Bill Barker
- Original Message - 
From: William A. Rowe, Jr. [EMAIL PROTECTED]
To: Tomcat Developers List tomcat-dev@jakarta.apache.org
Sent: Wednesday, December 22, 2004 9:54 PM
Subject: Re: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 
mod_jk.c


Wait - you mean to tell me instead of converting the hostname
once to lower - we are strcasecmp'ing every time?  Outch, that
hurts.
This is nothing to do with the hostname.  It's the header names only (not 
the values).  And it has to be cheaper than converting the name once to 
lower and then again to upper later in the code (which is what the change 
was in response to :).  Choosing a case and sticking to it would probably be 
a nice idea for 1.2.9 however.

Actually, AFAIK the entire need_content_length_header logic is obsolete with 
the current released versions of Tomcat.  If we wanted to drop support for 
old versions, we wouldn't need this particular strcasecmp at all.

Host name parsing is done with the usual per-VirtualHost config.
Bill
At 09:14 PM 12/16/2004, [EMAIL PROTECTED] wrote:
billbarker2004/12/16 19:14:56
 Modified:jk/native/apache-1.3 mod_jk.c
  jk/native/apache-2.0 mod_jk.c
 Log:
 Now that the SC lookup is case-insensitive, don't waste cycles 
converting the header names to lower case

 Revision  ChangesPath
 1.60  +2 -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.59
 retrieving revision 1.60
 diff -u -r1.59 -r1.60
 --- mod_jk.c  13 Dec 2004 09:11:24 -  1.59
 +++ mod_jk.c  17 Dec 2004 03:14:56 -  1.60
 @@ -592,12 +592,8 @@
  char *hname = ap_pstrdup(r-pool, elts[i].key);
  s-headers_values[i] = ap_pstrdup(r-pool, 
elts[i].val);
  s-headers_names[i] = hname;
 -while (*hname) {
 -*hname = tolower(*hname);
 -hname++;
 -}
  if (need_content_length_header 
 -!strncmp(s-headers_values[i], content-length, 
14)) {
 +!strcasecmp(s-headers_values[i], 
content-length)) {
  need_content_length_header = JK_FALSE;
  }
  }


 1.110 +2 -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.109
 retrieving revision 1.110
 diff -u -r1.109 -r1.110
 --- mod_jk.c  13 Dec 2004 09:10:31 -  1.109
 +++ mod_jk.c  17 Dec 2004 03:14:56 -  1.110
 @@ -636,12 +636,8 @@
  char *hname = apr_pstrdup(r-pool, elts[i].key);
  s-headers_values[i] = apr_pstrdup(r-pool, 
elts[i].val);
  s-headers_names[i] = hname;
 -while (*hname) {
 -*hname = tolower(*hname);
 -hname++;
 -}
  if (need_content_length_header 
 -!strncmp(s-headers_values[i], content-length, 
14)) {
 +!strcasecmp(s-headers_values[i], 
content-length)) {
  need_content_length_header = JK_FALSE;
  }
  }


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

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


This message is intended only for the use of the person(s) listed above as 
the intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication 
in error, please notify us immediately by e-mail and then delete all copies of 
this message and any attachments.
In addition you should be aware that ordinary (unencrypted) e-mail sent through 
the Internet is not secure. Do not send confidential or sensitive information, 
such as social security numbers, account numbers, personal identification 
numbers and passwords, to us via ordinary (unencrypted) e-mail.

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

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

2004-12-17 Thread mturk
mturk   2004/12/17 00:28:20

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Query mpm to obtain the real default cache size.
  
  Revision  ChangesPath
  1.111 +13 -5 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.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- mod_jk.c  17 Dec 2004 03:14:56 -  1.110
  +++ mod_jk.c  17 Dec 2004 08:28:20 -  1.111
  @@ -38,6 +38,7 @@
   #include http_main.h
   #include http_log.h
   #include util_script.h
  +#include ap_mpm.h
   
   #ifdef AS400
   #include ap_charset.h
  @@ -1851,9 +1852,9 @@
   JK_TRACE_EXIT(xconf-log);
   return r-status;
   }
  -jk_log(xconf-log, JK_LOG_INFO, Service returned error=%d
  +jk_log(xconf-log, JK_LOG_DEBUG, Service finished
   with status=%d for worker=%s\n,
  -   rc, r-status, worker_name);
  +   r-status, worker_name);
   JK_TRACE_EXIT(xconf-log);
   return OK;  /* NOT r-status, even if it has changed. */
   }
  @@ -2179,9 +2180,18 @@
   static void jk_child_init(apr_pool_t * pconf, server_rec * s)
   {
   jk_server_conf_t *conf;
  +int mpm_threads = 1;
  +
   conf = ap_get_module_config(s-module_config, jk_module);
  +
   JK_TRACE_ENTER(conf-log);
   
  +/* Set default connection cache size for worker mpm */
  +#if APR_HAS_THREADS
  +ap_mpm_query(AP_MPMQ_MAX_THREADS, mpm_threads);
  +#endif
  +if (mpm_threads  0)
  +jk_set_worker_def_cache_size(mpm_threads);
   jk_log(conf-log, JK_LOG_DEBUG, Initialized %s\n, JK_EXPOSED_VERSION);
   JK_TRACE_EXIT(conf-log);
   }
  @@ -2224,9 +2234,7 @@
   worker_env.server_name = (char *)ap_get_server_version();
   if (wc_open(init_map, worker_env, conf-log)) {
   ap_add_version_component(pconf, JK_EXPOSED_VERSION);
  -return;
   }
  -return;
   }
   
   static int jk_post_config(apr_pool_t * pconf,
  
  
  

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



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

2004-12-17 Thread mturk
mturk   2004/12/17 10:08:52

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Remove duplicating uri because map_uri now properly reverts the
  changes made when jsessionid is found.
  
  Revision  ChangesPath
  1.113 +2 -3  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.112
  retrieving revision 1.113
  diff -u -r1.112 -r1.113
  --- mod_jk.c  17 Dec 2004 14:58:37 -  1.112
  +++ mod_jk.c  17 Dec 2004 18:08:52 -  1.113
  @@ -1701,8 +1701,7 @@
  worker_env.num_of_workers);
   }
   else {
  -char *uri = apr_pstrdup(r-pool, r-uri);
  -worker_name = map_uri_to_worker(xconf-uw_map, uri, xconf-log);
  +worker_name = map_uri_to_worker(xconf-uw_map, r-uri, 
xconf-log);
   if (worker_name == NULL)
   worker_name = worker_env.first_worker;
   if (JK_IS_DEBUG_LEVEL(xconf-log))
  
  
  

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



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

2004-12-17 Thread Bill Barker

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 17, 2004 10:08 AM
Subject: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c


 mturk   2004/12/17 10:08:52

   Modified:jk/native/apache-2.0 mod_jk.c
   Log:
   Remove duplicating uri because map_uri now properly reverts the
   changes made when jsessionid is found.


This is a very big -1.  map_uri_to_worker is going to modify the uri that
gets passed in, so it absolutely *must* be duped.



This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication 
in error, please notify us immediately by e-mail and then delete all copies of 
this message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through 
the Internet is not secure. Do not send confidential or sensitive information, 
such as social security numbers, account numbers, personal identification 
numbers and passwords, to us via ordinary (unencrypted) e-mail.


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

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

2004-12-17 Thread Mladen Turk
Bill Barker wrote:
 Remove duplicating uri because map_uri now properly reverts the
 changes made when jsessionid is found.
This is a very big -1.  map_uri_to_worker is going to modify the uri that
gets passed in, so it absolutely *must* be duped.
Yes, but it will revert the changes made.
It's like:
void test(char *str)
{
   char save = str[2];
   str[2] = '\0';
   ...
   str[2] = save;
}
char some_string[] = abcd;
test(some_string);
After the call it will still be like before.
Since the call to 'test(some_string)' is assured to be thread safe,
why dupping that string and then releasing it after the call?
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

2004-12-16 Thread billbarker
billbarker2004/12/16 19:14:56

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Now that the SC lookup is case-insensitive, don't waste cycles converting the 
header names to lower case
  
  Revision  ChangesPath
  1.60  +2 -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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- mod_jk.c  13 Dec 2004 09:11:24 -  1.59
  +++ mod_jk.c  17 Dec 2004 03:14:56 -  1.60
  @@ -592,12 +592,8 @@
   char *hname = ap_pstrdup(r-pool, elts[i].key);
   s-headers_values[i] = ap_pstrdup(r-pool, elts[i].val);
   s-headers_names[i] = hname;
  -while (*hname) {
  -*hname = tolower(*hname);
  -hname++;
  -}
   if (need_content_length_header 
  -!strncmp(s-headers_values[i], content-length, 14)) {
  +!strcasecmp(s-headers_values[i], content-length)) {
   need_content_length_header = JK_FALSE;
   }
   }
  
  
  
  1.110 +2 -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.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- mod_jk.c  13 Dec 2004 09:10:31 -  1.109
  +++ mod_jk.c  17 Dec 2004 03:14:56 -  1.110
  @@ -636,12 +636,8 @@
   char *hname = apr_pstrdup(r-pool, elts[i].key);
   s-headers_values[i] = apr_pstrdup(r-pool, elts[i].val);
   s-headers_names[i] = hname;
  -while (*hname) {
  -*hname = tolower(*hname);
  -hname++;
  -}
   if (need_content_length_header 
  -!strncmp(s-headers_values[i], content-length, 14)) {
  +!strcasecmp(s-headers_values[i], content-length)) {
   need_content_length_header = JK_FALSE;
   }
   }
  
  
  

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



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

2004-12-13 Thread mturk
mturk   2004/12/13 01:10:31

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Add more logging.
  
  Revision  ChangesPath
  1.109 +59 -30jakarta-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.108
  retrieving revision 1.109
  diff -u -r1.108 -r1.109
  --- mod_jk.c  12 Dec 2004 15:14:59 -  1.108
  +++ mod_jk.c  13 Dec 2004 09:10:31 -  1.109
  @@ -1653,7 +1653,6 @@
* if they are directory requests, in case there are no static files
* visible to Apache and/or DirectoryIndex was not used. This is only
* used when JkOptions has ForwardDirectories set. */
  -
   /* Not for me, try next handler */
   if (strcmp(r-handler, JK_HANDLER)
(dmt = strcmp(r-handler, DIR_MAGIC_TYPE)))
  @@ -1662,22 +1661,26 @@
   xconf =
   (jk_server_conf_t *) ap_get_module_config(r-server-module_config,
 jk_module);
  +JK_TRACE_ENTER(xconf-log);
   if (apr_table_get(r-subprocess_env, no-jk)) {
   jk_log(xconf-log, JK_LOG_DEBUG,
  Into handler no-jk env var detected for uri=%s, declined\n,
  r-uri);
   
  +JK_TRACE_EXIT(xconf-log);
   return DECLINED;
   }
   
   /* Was the option to forward directories to Tomcat set? */
  -if (!dmt  !(xconf-options  JK_OPT_FWDDIRS))
  +if (!dmt  !(xconf-options  JK_OPT_FWDDIRS)) {
  +JK_TRACE_EXIT(xconf-log);
   return DECLINED;
  -
  +}
   worker_name = apr_table_get(r-notes, JK_WORKER_ID);
   
   /* Set up r-read_chunked flags for chunked encoding, if present */
   if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) != 
APR_SUCCESS) {
  +JK_TRACE_EXIT(xconf-log);
   return rc;
   }
   
  @@ -1708,15 +1711,19 @@
   }
   }
   
  -jk_log(xconf-log, JK_LOG_DEBUG, Into handler r-proxyreq=%d 
  -   r-handler=%s r-notes=%d worker=%s\n,
  -   r-proxyreq, r-handler, r-notes, worker_name);
  +jk_log(xconf-log, JK_LOG_DEBUG, Into handler %s worker=%s
  +r-proxyreq=%d\n,
  +   r-handler, worker_name, r-proxyreq);
   
   conf = (jk_server_conf_t *) 
ap_get_module_config(r-server-module_config,
jk_module);
   
   /* If this is a proxy request, we'll notify an error */
   if (r-proxyreq) {
  +jk_log(xconf-log, JK_LOG_INFO, Proxy request for worker=%s
  +   is not allowed\n,
  +  worker_name);
  +JK_TRACE_EXIT(xconf-log);
   return HTTP_INTERNAL_SERVER_ERROR;
   }
   
  @@ -1739,6 +1746,10 @@
   
   /* If the remote client has aborted, just ignore the request */
   if (r-connection-aborted) {
  +jk_log(xconf-log, JK_LOG_INFO, Client connection aborted for
  +worker=%s\n,
  +   worker_name);
  +JK_TRACE_EXIT(xconf-log);
   return OK;
   }
   
  @@ -1775,24 +1786,9 @@
  how to deal with load balancing - but it's usefull for JNI
*/
   
  -/* Disable re-use for now since the following code is currently platform 
specific */
  -/* #ifdef REUSE_WORKER
  -apr_pool_t *rpool=r-pool;
  -apr_pool_t *parent_pool= apr_pool_get_parent( rpool );
  -apr_pool_t *tpool= apr_pool_get_parent( parent_pool );
  -
  -apr_pool_userdata_get( (void **)end, jk_thread_endpoint, tpool );
  -if(end==NULL ) {
  -worker-get_endpoint(worker, end, xconf-log);
  -apr_pool_userdata_set( end , jk_thread_endpoint, 
  -   jk_cleanup_endpoint,  tpool );
  -}
  -#else */
   /* worker-get_endpoint might fail if we are out of memory 
so check */
   /* and handle it */
  -if (worker-get_endpoint(worker, end, xconf-log))
  -/* #endif */
  -{
  +if (worker-get_endpoint(worker, end, xconf-log)) {
   int is_recoverable_error = JK_FALSE;
   rc = end-service(end, s, xconf-log,
 is_recoverable_error);
  @@ -1814,15 +1810,22 @@
   }
   }
   }
  -
  -/* #ifndef REUSE_WORKER */
   end-done(end, xconf-log);
  -/* #endif */
   }
  -else/* this means we couldn't get an endpoint */
  -rc = 0; /* just to make sure that we know we've 
failed */
  +else {/* this means we couldn't get an endpoint 
*/
  +jk_log(xconf-log, 

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

2004-12-12 Thread mturk
mturk   2004/12/12 07:14:59

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  The stupid CRLF's are constantly emerging. Remove them.
  
  Revision  ChangesPath
  1.108 +9 -9  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.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- mod_jk.c  7 Dec 2004 13:46:55 -   1.107
  +++ mod_jk.c  12 Dec 2004 15:14:59 -  1.108
  @@ -717,7 +717,7 @@
 jk_module);
   const char *c, *w;
   
  -if (worker != NULL  cmd-path == NULL ) {

  +if (worker != NULL  cmd-path == NULL ) {
   c = context;
   w = worker;
   }
  @@ -726,9 +726,9 @@
   w = context;
   }
   else {
  -if (worker == NULL)

  -return JkMount needs a path when not defined in a location;

  -else 

  +if (worker == NULL)
  +return JkMount needs a path when not defined in a location;
  +else 
   return JkMount can not have a path when defined in a location;
   }
   
  @@ -760,7 +760,7 @@
   char *uri;
   const char *c, *w;
   
  -if (worker != NULL  cmd-path == NULL ) {

  +if (worker != NULL  cmd-path == NULL ) {
   c = context;
   w = worker;
   }
  @@ -769,9 +769,9 @@
   w = context;
   }
   else {
  -if (worker == NULL)

  -return JkUnMount needs a path when not defined in a location;

  -else 

  +if (worker == NULL)
  +return JkUnMount needs a path when not defined in a location;
  +else 
   return JkUnMount can not have a path when defined in a 
location;
   }
   
  
  
  

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



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

2004-12-04 Thread mturk
mturk   2004/12/04 04:11:58

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Use ap_get_server_port instead r-connection-local_addr-port.
  This was the original behavior changed in the CVS without real
  explanation why it was changed.
  
  Revision  ChangesPath
  1.106 +22 -76jakarta-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.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- mod_jk.c  2 Dec 2004 06:50:01 -   1.105
  +++ mod_jk.c  4 Dec 2004 12:11:58 -   1.106
  @@ -470,27 +470,31 @@
   s-remote_host = NULL_FOR_EMPTY(s-remote_host);
   s-remote_addr = NULL_FOR_EMPTY(r-connection-remote_ip);
   
  +/* Dump all connection param so we can trace what's going to
  + * the remote tomcat
  + */
   jk_log(conf-log, JK_LOG_DEBUG,
  -   agsp=%u agsn=%s hostn=%s shostn=%s cbsport=%d sport=%d \n,
  +   agsp=%u agsn=%s hostn=%s shostn=%s cbsport=%d sport=%d 
claport=%d\n,
  ap_get_server_port(r),
  ap_get_server_name(r) != NULL ? ap_get_server_name(r) : ,
  r-hostname != NULL ? r-hostname : ,
  r-server-server_hostname !=
  NULL ? r-server-server_hostname : ,
  -   r-connection-base_server-port, r-server-port);
  +   r-connection-base_server-port, r-server-port,
  +   r-connection-local_addr-port);
   
   /* get server name */
  -/* s-server_name= (char *)(r-hostname ? r-hostname : 
r-server-server_hostname); */
  -/* XXX : à la jk2 */
   s-server_name = (char *)ap_get_server_name(r);
   
   /* get the real port (otherwise redirect failed) */
  -s-server_port = r-connection-local_addr-port;
  -/* XXX : à la jk2 ??? */
  -/* s-server_port  = ap_get_server_port(r); */
  +/* XXX: use apache API for getting server port
  + *
  + * Pre 1.2.7 versions used:
  + * s-server_port = r-connection-local_addr-port;
  + */
  +s-server_port  = ap_get_server_port(r);
   
   s-server_software = (char *)ap_get_server_version();
  -
   s-method = (char *)r-method;
   s-content_length = get_content_length(r);
   s-is_chunked = r-read_chunked;
  @@ -714,7 +718,7 @@
   char *old;
   const char *c, *w;
   
  -if (worker != NULL  cmd-path == NULL ) {
  +if (worker != NULL  cmd-path == NULL ) {

   c = context;
   w = worker;
   }
  @@ -723,9 +727,9 @@
   w = context;
   }
   else {
  -if (worker == NULL)
  -return JkMount needs a path when not defined in a location;
  -else 
  +if (worker == NULL)

  +return JkMount needs a path when not defined in a location;

  +else 

   return JkMount can not have a path when defined in a location;
   }
   
  @@ -757,7 +761,7 @@
   char *old , *uri;
   const char *c, *w;
   
  -if (worker != NULL  cmd-path == NULL ) {
  +if (worker != NULL  cmd-path == NULL ) {

   c = context;
   w = worker;
   }
  @@ -766,9 +770,9 @@
   w = context;
   }
   else {
  -if (worker == NULL)
  -return JkUnMount needs a path when not defined in a location;
  -else 
  +if (worker == NULL)

  +return JkUnMount needs a path when not defined in a location;

  +else 

   return JkUnMount can not have a path when defined in a 
location;
   }
   
  @@ -837,56 +841,6 @@
   }
   
   /*
  - * JkWorker name value
  - * This is an experimental and undocumented extension made in j-t-c/jk.
  - */
  -static const char *jk_worker_property(cmd_parms * cmd,
  -  void *dummy,
  -  const char *name, const char *value)
  -{
  -server_rec *s = cmd-server;
  -char *oldv;
  -
  -jk_server_conf_t *conf =
  -(jk_server_conf_t *) ap_get_module_config(s-module_config,
  -  jk_module);
  -
  -jk_map_t *m = conf-worker_properties;
  -
  -value = jk_map_replace_properties(value, m);
  -
  -oldv = jk_map_get_string(m, name, NULL);
  -
  -if (oldv) {
  -char *tmpv = apr_palloc(cmd-pool,
  -strlen(value) + strlen(oldv) + 3);
  -if (tmpv) {
  -char sep = '*';
  -if (jk_is_path_poperty(name)) {
  -sep = PATH_SEPERATOR;
  -}
  -else if (jk_is_cmd_line_poperty(name)) {
  -sep = ' ';
  -}
  -
  -sprintf(tmpv, %s%c%s, oldv, sep, value);
  -}
  -value = tmpv;
  -}
  -else {
  -value = apr_pstrdup(cmd-pool, value);
  -}
  -
  -if (value) {
  

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

2004-11-30 Thread mturk
mturk   2004/11/30 00:22:47

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Allow JkMount and JkUnMount directives to be defined inside
  Location and Files sections. This allows security to be implemented
  on apache side.
  
  Revision  ChangesPath
  1.54  +45 -13jakarta-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.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- mod_jk.c  30 Nov 2004 07:30:41 -  1.53
  +++ mod_jk.c  30 Nov 2004 08:22:47 -  1.54
  @@ -665,20 +665,37 @@
   static const char *jk_mount_context(cmd_parms * cmd,
   void *dummy,
   char *context,
  -char *worker, char *maybe_cookie)
  +char *worker)
   {
   server_rec *s = cmd-server;
   jk_server_conf_t *conf =
   (jk_server_conf_t *) ap_get_module_config(s-module_config,
 jk_module);
   char *old;
  -if (context[0] != '/')
  -return Mount context should start with /;
  +const char *c, *w;
  +
  +if (worker != NULL  cmd-path == NULL ) {

  +c = context;
  +w = worker;
  +}
  +else if (worker == NULL  cmd-path != NULL) {
  +c = cmd-path;
  +w = context;
  +}
  +else {
  +if (worker == NULL)

  +return JkMount needs a path when not defined in a location;

  +else 

  +return JkMount can not have a path when defined in a location;
  +}
  +
  +if (c[0] != '/')
  +return JkMount context should start with /;
   
   /*
* Add the new worker to the alias map.
*/
  -jk_map_put(conf-uri_to_context, context, worker, (void **)old);
  +jk_map_put(conf-uri_to_context, c, w, (void **)old);
   return NULL;
   }
   
  @@ -691,21 +708,36 @@
   static const char *jk_unmount_context(cmd_parms * cmd,
 void *dummy,
 const char *context,
  -  const char *worker,
  -  const char *maybe_cookie)
  +  const char *worker)
   {
   server_rec *s = cmd-server;
   jk_server_conf_t *conf =
   (jk_server_conf_t *) ap_get_module_config(s-module_config,
 jk_module);
   char *old , *uri;
  -if (context[0] != '/')
  -return Unmount context should start with /;
  -uri = ap_pstrcat(cmd-temp_pool, !, context, NULL);
  +const char *c, *w;
  +
  +if (worker != NULL  cmd-path == NULL ) {

  +c = context;
  +w = worker;
  +}
  +else if (worker == NULL  cmd-path != NULL) {
  +c = cmd-path;
  +w = context;
  +}
  +else {
  +if (worker == NULL)

  +return JkUnMount needs a path when not defined in a location;

  +else 

  +return JkUnMount can not have a path when defined in a 
location;
  +}
  +if (c[0] != '/')
  +return JkUnMount context should start with /;
  +uri = ap_pstrcat(cmd-temp_pool, !, c, NULL);
   /*
* Add the new worker to the alias map.
*/
  -jk_map_put(conf-uri_to_context, uri, worker, (void **)old);
  +jk_map_put(conf-uri_to_context, uri, w, (void **)old);
   return NULL;
   }
   
  @@ -1453,14 +1485,14 @@
* JkMount mounts a url prefix to a worker (the worker need to be
* defined in the worker properties file.
*/
  -{JkMount, jk_mount_context, NULL, RSRC_CONF, TAKE23,
  +{JkMount, jk_mount_context, NULL, RSRC_CONF|ACCESS_CONF, TAKE12,
A mount point from a context to a servlet-engine worker},
   
   /*
* JkUnMount unmounts a url prefix to a worker (the worker need to be
* defined in the worker properties file.
*/
  -{JkUnMount, jk_unmount_context, NULL, RSRC_CONF, TAKE23,
  +{JkUnMount, jk_unmount_context, NULL, RSRC_CONF|ACCESS_CONF, TAKE12,
A no mount point from a context to a servlet-engine worker},
   
/*
  
  
  
  1.103 +47 -14jakarta-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.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- mod_jk.c  30 Nov 2004 07:30:42 -  1.102
  +++ mod_jk.c  30 Nov 2004 08:22:47 -  1.103
  @@ -705,21 +705,37 @@
   static const char 

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

2004-11-30 Thread mturk
mturk   2004/11/30 05:21:57

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix compile time warnings about long and remove unused variables.
  
  Revision  ChangesPath
  1.104 +2 -3  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.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- mod_jk.c  30 Nov 2004 08:22:47 -  1.103
  +++ mod_jk.c  30 Nov 2004 13:21:57 -  1.104
  @@ -1882,7 +1882,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) {
  @@ -1891,7 +1890,7 @@
   }
   micro = tv_end.tv_usec - tv_begin.tv_usec;
   seconds = tv_end.tv_sec - tv_begin.tv_sec;
  -duration = apr_psprintf(r-pool, %.1d.%.6d, seconds, 
micro);
  +duration = apr_psprintf(r-pool, %.1ld.%.6ld, seconds, 
micro);
   apr_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-2.0 mod_jk.c

2004-11-12 Thread mturk
mturk   2004/11/12 00:24:43

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Added JkWorkerProperty directive that enables omiting
  workers.properties file.
  For example: JkWorkerProperty worker.ajp13a.port=8009
  
  Revision  ChangesPath
  1.99  +26 -1 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.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- mod_jk.c  9 Nov 2004 12:17:43 -   1.98
  +++ mod_jk.c  12 Nov 2004 08:24:43 -  1.99
  @@ -1473,6 +1473,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 apr_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
  @@ -1583,6 +1604,10 @@
   AP_INIT_TAKE2(JkEnvVar, jk_add_env_var, NULL, RSRC_CONF,
 Adds a name of environment variable that should be sent 
 to servlet-engine),
  +
  +AP_INIT_RAW_ARGS(JkWorkerProperty, jk_set_worker_property,
  + NULL, RSRC_CONF,
  + Set worker.properties directive),
   
   {NULL}
   };
  
  
  

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



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

2004-11-12 Thread mturk
mturk   2004/11/12 01:02:04

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Add missing include for unixd, and remove unused vars.
  
  Revision  ChangesPath
  1.100 +6 -3  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.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- mod_jk.c  12 Nov 2004 08:24:43 -  1.99
  +++ mod_jk.c  12 Nov 2004 09:02:04 -  1.100
  @@ -66,6 +66,10 @@
   #endif
   
   #include apr_strings.h
  +
  +#if APR_USE_SYSVSEM_SERIALIZE
  +#include unixd.h  /* for unixd_set_global_mutex_perms */
  +#endif
   /*
* Jakarta (jk_) include files
*/
  @@ -335,7 +339,6 @@
   
   if (l) {
   /* BUFF *bf = p-r-connection-client; */
  -size_t w = (size_t) l;
   size_t r = 0;
   long ll = l;
   char *bb = (char *)b;
  @@ -1663,7 +1666,7 @@
   worker_name = apr_table_get(r-notes, JK_WORKER_ID);
   
   /* 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)) != 
APR_SUCCESS) {
   return rc;
   }
   
  
  
  

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



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

2004-07-14 Thread hgomez
hgomez  2004/07/14 05:46:23

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Make use of note, no-jk (a la mod_deflate), to exclude some URL from
  being relayed to tomcat even if URL match a JkMount directive.
  
  For instance you could use :
  
  VirtualHost *:80
 ServerName testxxx.mysys
 DocumentRoot /www/testxxx/htdocs
  
  SetEnvIf Request_URI /home/* no-jk
  
  Alias /home /home/dataxxx/
  
  Directory /home/dataxxx
  Options Indexes MultiViews
  AllowOverride None
  Order allow,deny
  Allow from all
  /Directory
  
  JkMount /* myssys-xxx
  
  /VirtualHost
  
  With such all requests will be relayed to tomcat worker myssys-xxx
  execpt the one containing /home.
  
  Revision  ChangesPath
  1.95  +22 -1 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.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- mod_jk.c  10 Mar 2004 12:13:31 -  1.94
  +++ mod_jk.c  14 Jul 2004 12:46:23 -  1.95
  @@ -1643,6 +1643,12 @@
   
   xconf = (jk_server_conf_t *)ap_get_module_config(r-server-module_config, 
jk_module);
  +if (apr_table_get(r-subprocess_env, no-jk)) {
  +jk_log(xconf-log, JK_LOG_DEBUG, Into handler no-jk env var detected for 
uri=%s, declined\n,
  +   r-uri);
  +
  +return DECLINED;
  +}
   
   /* Was the option to forward directories to Tomcat set? */
   if(!dmt  !(xconf-options  JK_OPT_FWDDIRS))
  @@ -2245,6 +2251,13 @@
   return DECLINED;
   }
   
  +if (apr_table_get(r-subprocess_env, no-jk)) {
  +jk_log(conf-log, JK_LOG_DEBUG, Into translate no-jk env var 
detected for uri=%s, declined\n,
  + r-uri);
  +
  
  + return DECLINED;
  +}
  +
   /* Special case to make sure that apache can serve a directory
  listing if there are no matches for the DirectoryIndex and
  Tomcat webapps are mapped into apache using JkAutoAlias. */
  @@ -2393,6 +2406,14 @@
  Manually mapped, no need to call uri_to_worker\n);
   return DECLINED;
   }
  +
  +if (apr_table_get(r-subprocess_env, no-jk)) {
  +jk_log(conf-log, JK_LOG_DEBUG, Into map_to_storage no-jk env var 
detected for uri=%s, declined\n,
  +r-uri);
  +
  
  +return DECLINED;
  +}
  +
   uri = apr_pstrdup(r-pool, r-uri);
   worker = map_uri_to_worker(conf-uw_map, uri, conf-log);
   
  
  
  

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



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

2004-03-10 Thread hgomez
hgomez  2004/03/10 04:13:31

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix a problem with the latest iSeries Apache 2.0.47
  
  Revision  ChangesPath
  1.94  +10 -2 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.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- mod_jk.c  24 Feb 2004 08:45:50 -  1.93
  +++ mod_jk.c  10 Mar 2004 12:13:31 -  1.94
  @@ -38,6 +38,7 @@
   #include http_main.h
   #include http_log.h
   #include util_script.h
  +
   #ifdef AS400
   #include ap_charset.h
   #include util_charset.h  /* ap_hdrs_from_ascii */
  @@ -50,10 +51,17 @@
   #endif
   
   /* deprecated with apr 0.9.3 */
  +
  +/* 
  +   The latest Apache 2.0.47 for iSeries didn't export apr_filepath_name_get
  +   but apr_filename_of_pathname, even if includes seems right and the APR
  +   in use is 0.9.4
  +*/
  +
   #include apr_version.h
   #if (APR_MAJOR_VERSION == 0)  \
   (APR_MINOR_VERSION = 9)  \
  -(APR_PATCH_VERSION  3) 
  +(APR_PATCH_VERSION  3) || defined(AS400) 
   #define apr_filepath_name_get apr_filename_of_pathname
   #endif
   
  
  
  

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



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

2004-03-10 Thread Mladen Turk
 

 -Original Message-
 From: [EMAIL PROTECTED]
 jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
   +
#ifdef AS400
#include ap_charset.h
#include util_charset.h  /* ap_hdrs_from_ascii */
   @@ -50,10 +51,17 @@
#endif

Is it necessary to conditionally include those two only for AS400?
What would happen if they are included always?

I'm trying to push out all platform dependent defines as much as possible.

MT.


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



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

2004-03-10 Thread jean-frederic clere
Mladen Turk wrote:
 


-Original Message-
From: [EMAIL PROTECTED]
jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
 +
  #ifdef AS400
  #include ap_charset.h
  #include util_charset.h  /* ap_hdrs_from_ascii */
 @@ -50,10 +51,17 @@
  #endif


Is it necessary to conditionally include those two only for AS400?
What would happen if they are included always?
I'm trying to push out all platform dependent defines as much as possible.
Yes, but EBCDIC porting normaly requires additional conversion and the only way 
to get them is via #define (mine are #define OSD_POSIX).

MT.

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




signature.asc
Description: OpenPGP digital signature


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

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

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Initialize the reco status
  
  Revision  ChangesPath
  1.92  +4 -1  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.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- mod_jk.c  2 Feb 2004 17:38:04 -   1.91
  +++ mod_jk.c  11 Feb 2004 09:50:19 -  1.92
  @@ -490,6 +490,9 @@
   s-read = ws_read;
   s-write= ws_write;
   
  +/* Clear RECO status */
  +s-reco_status  = RECO_NONE;
  +
   s-auth_type= NULL_FOR_EMPTY(r-ap_auth_type);
   s-remote_user  = NULL_FOR_EMPTY(r-user);
   
  
  
  

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



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

2004-02-02 Thread mmanders
mmanders2004/02/02 09:38:04

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Updated how we get the server port to work with APR 1.0 as well as previous 
versions.  Patch submitted by Guenter Knauf.
  
  Revision  ChangesPath
  1.91  +2 -5  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.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- mod_jk.c  5 Nov 2003 09:15:41 -   1.90
  +++ mod_jk.c  2 Feb 2004 17:38:04 -   1.91
  @@ -482,8 +482,6 @@
   {
   request_rec *r  = private_data-r;
   
  -apr_port_t port;
  -
   char *ssl_temp  = NULL;
   s-jvm_route= NULL;/* Used for sticky session routing */
   
  @@ -518,8 +516,7 @@
   s-server_name  = (char *)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;
  +s-server_port = r-connection-local_addr-port;
   /* XXX : à la jk2 ???*/
   /* s-server_port  = ap_get_server_port(r); */
   
  
  
  

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



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

2003-11-01 Thread glenn
glenn   2003/11/01 11:20:50

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix a special case to make sure that apache can serve a directory
  listing if there are no matches for the DirectoryIndex and
  Tomcat webapps are mapped into apache using JkAutoAlias.
  
  Revision  ChangesPath
  1.89  +34 -1 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.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- mod_jk.c  4 Oct 2003 11:43:14 -   1.88
  +++ mod_jk.c  1 Nov 2003 19:20:50 -   1.89
  @@ -2278,6 +2278,39 @@
  Manually mapped, no need to call uri_to_worker\n);
   return DECLINED;
   }
  +
  +/* Special case to make sure that apache can serve a directory
  +   listing if there are no matches for the DirectoryIndex and
  +   Tomcat webapps are mapped into apache using JkAutoAlias. */
  +if(r-main != NULL  (conf-alias_dir != NULL) 
  +   !strcmp(r-main-handler,DIR_MAGIC_TYPE)) {
  +
  +/* Append the request uri to the JkAutoAlias directory and
  +   determine if the file exists. */
  +char *clean_uri;
  +apr_finfo_t finfo; 
  +finfo.filetype = APR_NOFILE;
  +clean_uri = apr_pstrdup(r-pool, r-uri);
  +ap_no2slash(clean_uri); 
  +/* Map uri to a context static file */
  +if (strlen(clean_uri)  1) {
  +char *context_path = NULL;
  +
  +context_path = apr_pstrcat(r-pool,conf-alias_dir,
  +  
ap_os_escape_path(r-pool,clean_uri,1),
  +  NULL);
 
  +if( context_path != NULL ) {
  +apr_stat(finfo,context_path,APR_FINFO_TYPE,r-pool);
  +}   
  +}
  +if(finfo.filetype != APR_REG) {
  +jk_log(conf-log, JK_LOG_DEBUG,
  +JkAutoAlias, no DirectoryIndex file for URI %s\n,
  +r-uri);
  + return DECLINED;
  +}
  +}
  +
   uri = apr_pstrdup(r-pool, r-uri);
   worker = map_uri_to_worker(conf-uw_map, uri, conf-log);
   
  
  
  

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



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

2003-10-04 Thread mturk
mturk   2003/10/04 02:26:00

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  apr_filename_of_pathname has been deprecated since apr
  version 0.9.3, and it doesn't exist in version 0.9.4 any more.
  
  Revision  ChangesPath
  1.87  +6 -4  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.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- mod_jk.c  30 Sep 2003 13:41:54 -  1.86
  +++ mod_jk.c  4 Oct 2003 09:26:00 -   1.87
  @@ -91,9 +91,11 @@
   #include util_date.h
   #endif
   
  -/* changed with apr 1.0 */
  +/* deprecated with apr 0.9.3 */
   #include apr_version.h
  -#if (APR_MAJOR_VERSION  1) 
  +#if (APR_MAJOR_VERSION == 0)  \
  +(APR_MINOR_VERSION = 9)  \
  +(APR_PATCH_VERSION  3) 
   #define apr_filepath_name_get apr_filename_of_pathname
   #endif
   
  @@ -2412,7 +2414,7 @@
   
   /* Only if sub-request for a directory, most likely from mod_dir */
   if (r-main  r-main-filename 
  -!*apr_filepath_name_get(r-main-filename)){
  +!apr_filepath_name_get(r-main-filename)){
   
   /* The filename from the main request will be set to what should
* be picked up, aliases included. Tomcat will need to know about
  
  
  

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



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

2003-10-04 Thread mturk
mturk   2003/10/04 04:43:14

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Let the open_log retuns int instead calling exit(1),
  so we can return INTERNL_SERVER_ERROR, instead
  getting into endles child create/exit loop.
  
  Revision  ChangesPath
  1.88  +13 -11jakarta-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.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- mod_jk.c  4 Oct 2003 09:26:00 -   1.87
  +++ mod_jk.c  4 Oct 2003 11:43:14 -   1.88
  @@ -2092,7 +2092,7 @@
   return APR_SUCCESS;
   }
   
  -static void open_jklog(server_rec *s, apr_pool_t *p)
  +static int open_jklog(server_rec *s, apr_pool_t *p)
   {
   jk_server_conf_t *conf;
   const char *fname;
  @@ -2107,13 +2107,13 @@
   
   if (main_log != NULL) {
   conf-log = main_log;
  -return;
  +return 0;
   }
   if (conf-log_file == NULL) {
  -return;
  +return 0;
   }
   if (*(conf-log_file) == '\0') {
  -return;
  +return 0;
   }
   
   if (*conf-log_file == '|') {
  @@ -2121,17 +2121,17 @@
   ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
mod_jk: could not open reliable pipe 
to jk log %s, conf-log_file+1);
  -exit(1);
  +return -1;
   }
   conf-jklogfp = (void *)ap_piped_log_write_fd(pl);
   }
  -else if (*conf-log_file != '\0') {
  +else {
   fname = ap_server_root_relative(p, conf-log_file);
   if (!fname) {
   ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
mod_jk: Invalid JkLog 
path %s, conf-log_file);
  -exit(1);
  +return -1;
   }
   if ((rc = apr_file_open(conf-jklogfp, fname,
   jklog_flags, jklog_mode, p))
  @@ -2139,7 +2139,7 @@
   ap_log_error(APLOG_MARK, APLOG_ERR, rc, s,
mod_jk: could not open JkLog 
file %s, fname);
  -exit(1);
  +return -1;
   }
   apr_file_inherit_set(conf-jklogfp);
   }
  @@ -2154,10 +2154,10 @@
   if (main_log == NULL)
   main_log = conf-log;
   apr_pool_cleanup_register(p, main_log, jklog_cleanup, jklog_cleanup);
  -return;
  +return 0;
   }
   
  -exit(1);
  +return -1;
   }
   
   
  @@ -2248,7 +2248,9 @@
* - open each jk logfile
*/
   for (; s; s = s-next) {
  -open_jklog(s, pconf);
  +if (open_jklog(s, pconf))
  +return HTTP_INTERNAL_SERVER_ERROR;
  +
   }
   
   return OK;
  
  
  

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



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

2003-09-30 Thread hgomez
hgomez  2003/09/30 06:41:54

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Update for APR 1.0 (Apache 2.1)
  
  Provided by Günter Knauf eflash at gmx.net
  
  Revision  ChangesPath
  1.86  +38 -32jakarta-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.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- mod_jk.c  25 Sep 2003 15:22:09 -  1.85
  +++ mod_jk.c  30 Sep 2003 13:41:54 -  1.86
  @@ -67,7 +67,6 @@
* mod_jk: keeps all servlet/jakarta related ramblings together.
*/
   
  -#include apu_compat.h
   #include ap_config.h
   #include apr_lib.h
   #include apr_date.h
  @@ -88,9 +87,16 @@
   
   /* moved to apr since http-2.0.19-dev */
   #if (MODULE_MAGIC_NUMBER_MAJOR  20010523)
  +#define apr_date_parse_http ap_parseHTTPdate
   #include util_date.h
   #endif
   
  +/* changed with apr 1.0 */
  +#include apr_version.h
  +#if (APR_MAJOR_VERSION  1) 
  +#define apr_filepath_name_get apr_filename_of_pathname
  +#endif
  +
   #include apr_strings.h
   /*
* Jakarta (jk_) include files
  @@ -273,7 +279,7 @@
* If the script gave us a Last-Modified header, we can't just
* pass it on blindly because of restrictions on future values.
*/
  -ap_update_mtime(r, ap_parseHTTPdate(header_values[h]));
  +ap_update_mtime(r, apr_date_parse_http(header_values[h]));
   ap_set_last_modified(r);
   } else {
   apr_table_add(r-headers_out, 
  @@ -833,7 +839,7 @@
   }
   value = tmpv;
   } else {
  -value = ap_pstrdup(cmd-pool, value);
  +value = apr_pstrdup(cmd-pool, value);
   }
   
   if(value) {
  @@ -959,8 +965,8 @@
   int *strl;
   apr_array_header_t *format = conf-format;
   
  -strs = ap_palloc(r-pool, sizeof(char *) * (format-nelts));
  -strl = ap_palloc(r-pool, sizeof(int) * (format-nelts));
  +strs = apr_palloc(r-pool, sizeof(char *) * (format-nelts));
  +strl = apr_palloc(r-pool, sizeof(int) * (format-nelts));
   items = (request_log_format_item *) format-elts;
   for (i = 0; i  format-nelts; ++i) {
   strs[i] = process_item(r, items[i]);
  @@ -968,7 +974,7 @@
   for (i = 0; i  format-nelts; ++i) {
   len += strl[i] = strlen(strs[i]);
   }
  -str = ap_palloc(r-pool, len + 1);
  +str = apr_palloc(r-pool, len + 1);
   for (i = 0, s = str; i  format-nelts; ++i) {
   memcpy(s, strs[i], strl[i]);
   s += strl[i];
  @@ -1006,13 +1012,13 @@
   
   static const char *log_worker_name(request_rec *r, char *a)
   {
  -return ap_table_get(r-notes, JK_WORKER_ID);
  +return apr_table_get(r-notes, JK_WORKER_ID);
   }
   
   
   static const char *log_request_duration(request_rec *r, char *a)
   {
  -return ap_table_get(r-notes, JK_DURATION);
  +return apr_table_get(r-notes, JK_DURATION);
   }

   static const char *log_request_line(request_rec *r, char *a)
  @@ -1022,7 +1028,7 @@
* (note the truncation before the protocol string for HTTP/0.9 
requests)
* (note also that r-the_request contains the unmodified request)
*/
  -return (r-parsed_uri.password) ? ap_pstrcat(r-pool, r-method,  ,
  +return (r-parsed_uri.password) ? apr_pstrcat(r-pool, r-method,  ,
apr_uri_unparse(r-pool, r-parsed_uri, 
0),
r-assbackwards ? NULL :  , r-protocol, 
NULL)
   : r-the_request;
  @@ -1065,7 +1071,7 @@
   }
   static const char *log_request_query(request_rec *r, char *a)
   {
  -return (r-args != NULL) ? ap_pstrcat(r-pool, ?, r-args, NULL)
  +return (r-args != NULL) ? apr_pstrcat(r-pool, ?, r-args, NULL)
: ;
   }  
   static const char *log_status(request_rec *r, char *a)
  @@ -1171,7 +1177,7 @@
* This might allocate a few chars extra if there's a backslash
* escape in the format string.
*/
  -it-arg = ap_palloc(p, s - *sa + 1);
  +it-arg = apr_palloc(p, s - *sa + 1);
   
   d = it-arg;
   s = *sa;
  @@ -1232,7 +1238,7 @@
   
   dummy[0] = s[-1];
   dummy[1] = '\0';
  -return ap_pstrcat(p, Unrecognized JkRequestLogFormat directive %,
  +return apr_pstrcat(p, Unrecognized JkRequestLogFormat directive %,
 dummy, NULL);
   }
   it-func = l-func;
  @@ -1243,18 +1249,18 @@
   static apr_array_header_t *parse_request_log_string(apr_pool_t *p, const char *s,
 const char **err)
   {
  -apr_array_header_t *a = 

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

2003-08-29 Thread hgomez
hgomez  2003/08/29 07:10:31

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix typo, apr_pstrdup should be used
  
  Revision  ChangesPath
  1.84  +3 -3  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.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- mod_jk.c  28 Aug 2003 09:48:22 -  1.83
  +++ mod_jk.c  29 Aug 2003 14:10:31 -  1.84
  @@ -1720,7 +1720,7 @@
   
   if(conf  ! worker_name ) {
   /* Direct mapping ( via setHandler ). Try overrides */
  -char *uri = apr_strdup(r-pool, r-uri);
  +char *uri = apr_pstrdup(r-pool, r-uri);
   worker_name = map_uri_to_worker(conf-uw_map, uri, conf-log);
   if( ! worker_name ) {
   /* Since we are here, an explicit (native) mapping has been used */
  @@ -2384,7 +2384,7 @@
  Manually mapped, no need to call uri_to_worker\n);
   return DECLINED;
   }
  -uri = apr_strdup(r-pool, r-uri);
  +uri = apr_pstrdup(r-pool, r-uri);
   worker = map_uri_to_worker(conf-uw_map, uri, conf-log);
   
   if(worker) {
  
  
  

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



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

2003-08-26 Thread billbarker
billbarker2003/08/25 21:28:12

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Changes for Apache2 to support the new contract.
  
  Revision  ChangesPath
  1.82  +11 -5 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.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- mod_jk.c  15 Jul 2003 12:16:05 -  1.81
  +++ mod_jk.c  26 Aug 2003 04:28:12 -  1.82
  @@ -1696,7 +1696,8 @@
Manual configuration for %s %s %d\n,
r-uri, worker_env.first_worker, worker_env.num_of_workers); 
 } else {
  -  worker_name = map_uri_to_worker(xconf-uw_map, r-uri, xconf-log);
  +  char *uri = apr_pstrdup(r-pool, r-uri);
  +  worker_name = map_uri_to_worker(xconf-uw_map, uri, xconf-log);
 if( worker_name == NULL ) 
 worker_name=  worker_env.first_worker;
 jk_log(xconf-log, JK_LOG_DEBUG, 
  @@ -1719,7 +1720,8 @@
   
   if(conf  ! worker_name ) {
   /* Direct mapping ( via setHandler ). Try overrides */
  -worker_name = map_uri_to_worker(conf-uw_map, r-uri, conf-log);
  +char *uri = apr_strdup(r-pool, r-uri);
  +worker_name = map_uri_to_worker(conf-uw_map, uri, conf-log);
   if( ! worker_name ) {
   /* Since we are here, an explicit (native) mapping has been used */
   /* Use default worker */
  @@ -2256,6 +2258,7 @@
   
   if(conf) {
   char *worker;
  +char *uri;
   if( (r-handler != NULL )  
   (! strcmp( r-handler, JK_HANDLER ) )) {
   /* Somebody already set the handler, probably manual config
  @@ -2265,7 +2268,8 @@
  Manually mapped, no need to call uri_to_worker\n);
   return DECLINED;
   }
  -worker = map_uri_to_worker(conf-uw_map, r-uri, conf-log);
  +uri = apr_pstrdup(r-pool, r-uri);
  +worker = map_uri_to_worker(conf-uw_map, uri, conf-log);
   
   if(worker) {
   r-handler=apr_pstrdup(r-pool,JK_HANDLER);
  @@ -2370,6 +2374,7 @@
   
   if(conf) {
   char *worker;
  +char *uri;
   if( (r-handler != NULL ) 
   (! strcmp( r-handler, JK_HANDLER ) )) {
   /* Somebody already set the handler, probably manual config
  @@ -2379,7 +2384,8 @@
  Manually mapped, no need to call uri_to_worker\n);
   return DECLINED;
   }
  -worker = map_uri_to_worker(conf-uw_map, r-uri, conf-log);
  +uri = apr_strdup(r-pool, r-uri);
  +worker = map_uri_to_worker(conf-uw_map, uri, conf-log);
   
   if(worker) {
   r-handler=apr_pstrdup(r-pool,JK_HANDLER);
  
  
  

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



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

2003-07-15 Thread glenn
glenn   2003/07/15 05:16:06

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix double open of mod_jk.log for apache 2
  
  Revision  ChangesPath
  1.81  +2 -1  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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- mod_jk.c  27 Jun 2003 03:10:43 -  1.80
  +++ mod_jk.c  15 Jul 2003 12:16:05 -  1.81
  @@ -2097,6 +2097,7 @@
   
   if (main_log != NULL) {
   conf-log = main_log;
  +return;
   }
   if (conf-log_file == NULL) {
   return;
  
  
  

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



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

2003-07-01 Thread Glenn Nielsen
Thanks for the path bug fix Bill.

I will be happy to work on a mod_jk 4.1.25 release but I won't have time until
next week.
The only two issues I am aware of are:

1. The libtool build problem.
2. The path mapping bug in Apache.
Are both of these considered fixed now in CVS head?

Has the CHANGES file been updated?

Regards,

Glenn

Henri Gomez wrote:
[EMAIL PROTECTED] wrote:

What about a 1.2.5 release soon ?

billbarker2003/06/26 20:10:44

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Port from apache-1.3
Revision  ChangesPath
  1.80  +6 -4  
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.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- mod_jk.c18 Jun 2003 15:48:14 -1.79
  +++ mod_jk.c27 Jun 2003 03:10:43 -1.80
  @@ -2280,16 +2280,18 @@
  return OK;
   } 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(conf-log, 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;
  @@ -2327,7 +2329,7 @@
   finfo.filetype = APR_NOFILE;
   
apr_stat(finfo,context_path,APR_FINFO_TYPE,r-pool);
   if( finfo.filetype == APR_DIR ) {
  -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);
   /* Add code to verify real path 
ap_os_canonical_name */
   if( ret != NULL ) {





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


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


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

2003-07-01 Thread Henri Gomez

Henri Gomez wrote:

[EMAIL PROTECTED] wrote:

What about a 1.2.5 release soon ?

+1



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


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

2003-06-27 Thread Henri Gomez
[EMAIL PROTECTED] wrote:

What about a 1.2.5 release soon ?

billbarker2003/06/26 20:10:44

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Port from apache-1.3
  
  Revision  ChangesPath
  1.80  +6 -4  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.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- mod_jk.c	18 Jun 2003 15:48:14 -	1.79
  +++ mod_jk.c	27 Jun 2003 03:10:43 -	1.80
  @@ -2280,16 +2280,18 @@
   
   return OK;
   } 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(conf-log, 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;
  @@ -2327,7 +2329,7 @@
   finfo.filetype = APR_NOFILE;
   apr_stat(finfo,context_path,APR_FINFO_TYPE,r-pool);
   if( finfo.filetype == APR_DIR ) {
  -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);
   /* Add code to verify real path ap_os_canonical_name */
   if( ret != NULL ) {
  
  


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


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

2003-06-27 Thread Henri Gomez
BTW, we need a fix for this libtool problem.

What about adding libtool in configure.in via a --with-libtool ?

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


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

2003-06-26 Thread billbarker
billbarker2003/06/26 20:10:44

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Port from apache-1.3
  
  Revision  ChangesPath
  1.80  +6 -4  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.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- mod_jk.c  18 Jun 2003 15:48:14 -  1.79
  +++ mod_jk.c  27 Jun 2003 03:10:43 -  1.80
  @@ -2280,16 +2280,18 @@
   
   return OK;
   } 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(conf-log, 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;
  @@ -2327,7 +2329,7 @@
   finfo.filetype = APR_NOFILE;
   apr_stat(finfo,context_path,APR_FINFO_TYPE,r-pool);
   if( finfo.filetype == APR_DIR ) {
  -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);
   /* Add code to verify real path ap_os_canonical_name */
   if( ret != NULL ) {
  
  
  

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



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

2003-06-18 Thread hgomez
hgomez  2003/06/18 06:13:17

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  3rd parm to apr_file_write() should be apr_size_t, not unsigned.
  
  Provided by Jeff Trawick
  
  Revision  ChangesPath
  1.77  +2 -2  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.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- mod_jk.c  16 May 2003 00:36:18 -  1.76
  +++ mod_jk.c  18 Jun 2003 13:13:16 -  1.77
  @@ -2032,7 +2032,7 @@
   (l-level = level || level == JK_LOG_REQUEST_LEVEL) 
   l-logger_private  what) {
   unsigned sz = strlen(what);
  -unsigned wrote = sz;
  +apr_size_t wrote = sz;
   char error[256];
   if(sz) {
   apr_status_t status;
  
  
  

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



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

2003-06-18 Thread hgomez
hgomez  2003/06/18 06:17:18

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix for mod_dir/mod_jk, now the DirectoryIndex directive will be correctly handled 
and forwarded
  
  Revision  ChangesPath
  1.78  +6 -2  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.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- mod_jk.c  18 Jun 2003 13:13:16 -  1.77
  +++ mod_jk.c  18 Jun 2003 13:17:17 -  1.78
  @@ -2271,8 +2271,12 @@
   apr_table_setn(r-notes, JK_WORKER_ID, worker);
   
   /* This could be a sub-request, possibly from mod_dir */
  -if(r-main)
  +/* Also set the HANDLER and uri for subrequest */ 
  +if(r-main) {
  +r-main-handler=apr_pstrdup(r-pool,JK_HANDLER);
  +r-main-uri=apr_pstrdup(r-pool,r-uri);
   apr_table_setn(r-main-notes, JK_WORKER_ID, worker);
  +}
   
   return OK;
   } else if(conf-alias_dir != NULL) {
  
  
  

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



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

2003-06-18 Thread hgomez
hgomez  2003/06/18 08:48:15

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Use the subreq pool
  
  Provided by Jeff Trawick
  
  Revision  ChangesPath
  1.79  +3 -3  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.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- mod_jk.c  18 Jun 2003 13:17:17 -  1.78
  +++ mod_jk.c  18 Jun 2003 15:48:14 -  1.79
  @@ -2273,8 +2273,8 @@
   /* This could be a sub-request, possibly from mod_dir */
   /* Also set the HANDLER and uri for subrequest */ 
   if(r-main) {
  -r-main-handler=apr_pstrdup(r-pool,JK_HANDLER);
  -r-main-uri=apr_pstrdup(r-pool,r-uri);
  +r-main-handler=apr_pstrdup(r-main-pool,JK_HANDLER);
  +r-main-uri=apr_pstrdup(r-main-pool,r-uri);
   apr_table_setn(r-main-notes, JK_WORKER_ID, worker);
   }
   
  
  
  

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



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

2003-04-04 Thread mmanders
mmanders2003/04/04 12:26:21

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Updated to build correctly for NetWare.
  
  Revision  ChangesPath
  1.70  +11 -7 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.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- mod_jk.c  2 Apr 2003 22:48:01 -   1.69
  +++ mod_jk.c  4 Apr 2003 20:26:20 -   1.70
  @@ -510,10 +510,10 @@
s-server_name  = (char *)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; */
  -/* XXX : à la jk2 */
  - s-server_port  = ap_get_server_port(r);
  +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();
   
  @@ -1880,7 +1880,11 @@
   map_free(conf-automount);
   if (conf-uw_map)
   uri_worker_map_free(conf-uw_map, conf-log);
  -jk_close_file_logger(conf-log);
  +/* Since we are now using apache to do logging, this 
  + * cleanup will just cause problems so don't do it
  + *
  + * jk_close_file_logger(conf-log);
  + */
   }
   s = s-next;
   }
  @@ -2023,7 +2027,7 @@
   return overrides;
   }
   
  -static int jk_log_to_file(jk_logger_t *l,
  +static int JK_METHOD jk_log_to_file(jk_logger_t *l,
 int level,
 const char *what)
   {
  
  
  

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



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

2003-04-02 Thread glenn
glenn   2003/04/02 14:48:02

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix possible seg fault when LogLevel is debug
  
  Revision  ChangesPath
  1.69  +5 -5  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.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- mod_jk.c  16 Mar 2003 02:59:44 -  1.68
  +++ mod_jk.c  2 Apr 2003 22:48:01 -   1.69
  @@ -496,10 +496,10 @@
   
   jk_log(conf-log, JK_LOG_DEBUG, 
  agsp=%u agsn=%s hostn=%s shostn=%s cbsport=%d sport=%d \n,
  -   ap_get_server_port( r ),
  -   ap_get_server_name( r ),
  -   r-hostname,
  -   r-server-server_hostname,
  +   ap_get_server_port(r),
  +   ap_get_server_name(r) != NULL ? ap_get_server_name(r) : ,
  +   r-hostname != NULL ? r-hostname : ,
  +   r-server-server_hostname != NULL ? r-server-server_hostname : ,
  r-connection-base_server-port,
  r-server-port
  );
  
  
  

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



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

2003-03-15 Thread glenn
glenn   2003/03/15 18:59:44

  Modified:jk/native CHANGES.txt
   jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  When a client aborted but Apache 2 tried to do a SSI include
  of a JSP or servlet an error was being logged. Updated code
  to do initial check for aborted client to after mod_jk has
  determined that it should handle the request.  Also now
  return OK instead of HTTP_INTERNAL_SERVER_ERROR so that
  an unable to include error isn't logged when a client
  aborted their request.
  
  Fixed a bug in JkRequestLogFormat which could improperly
  format logging of request URI's which included  % escape
  characters.
  
  Revision  ChangesPath
  1.12  +5 -2  jakarta-tomcat-connectors/jk/native/CHANGES.txt
  
  Index: CHANGES.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/CHANGES.txt,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CHANGES.txt   14 Mar 2003 13:36:35 -  1.11
  +++ CHANGES.txt   16 Mar 2003 02:59:43 -  1.12
  @@ -18,7 +18,10 @@
   * Fixed a bug in Apache 2.0 which caused a POST request forwarded to
 Tomcat to fail if it generated SSI directives which were post
 processed by mod_include. [glenn]
  -
  +* Fixed a bug in JkRequestLogFormat when printing the request URI that
  +  could cause a URI with hex escapes sequences to be formatted wrong.
  +  [glenn]
  +  
   Changes with JK 1.2.2:
   * tomcat_trend.pl updated script to support changed logging of 
 aborted requests
  
  
  
  1.36  +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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- mod_jk.c  7 Jan 2003 01:27:11 -   1.35
  +++ mod_jk.c  16 Mar 2003 02:59:43 -  1.36
  @@ -883,7 +883,7 @@
   s += strl[i];
   }
   *s = 0;
  -jk_log(conf-log ? conf-log : main_log,JK_LOG_REQUEST,str);
  +jk_log(conf-log ? conf-log : main_log, JK_LOG_REQUEST, %s, str);
   }
   
   /*
  
  
  
  1.68  +9 -9  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.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- mod_jk.c  14 Mar 2003 13:36:35 -  1.67
  +++ mod_jk.c  16 Mar 2003 02:59:44 -  1.68
  @@ -977,7 +977,7 @@
   }
   *s = 0;
   
  -jk_log(conf-log, JK_LOG_REQUEST, str);
  +jk_log(conf-log, JK_LOG_REQUEST, %s, str);
   }
   
   /*
  @@ -1660,11 +1660,6 @@
   jk_server_conf_t *conf;
   int  rc,dmt=1;
   
  -/* If the remote client has aborted, just return */
  -if (r-connection-aborted) {
  -return HTTP_INTERNAL_SERVER_ERROR;
  -}
  -
   /* We do DIR_MAGIC_TYPE here to make sure TC gets all requests, even
* if they are directory requests, in case there are no static files
* visible to Apache and/or DirectoryIndex was not used. This is only
  @@ -1740,8 +1735,13 @@
   if(worker_name) {
   jk_worker_t *worker = wc_get_worker_for_name(worker_name, xconf-log);
   
  +/* If the remote client has aborted, just ignore the request */
  +if (r-connection-aborted) {
  +return OK;
  +}
  +
   if(worker) {
  - struct timeval tv_begin,tv_end;
  +struct timeval tv_begin,tv_end;
   int rc = JK_FALSE;
   apache_private_data_t private_data;
   jk_ws_service_t s;
  @@ -1845,7 +1845,7 @@
   return OK;/* NOT r-status, even if it has changed. */
   } else if (rc == JK_CLIENT_ERROR) {
   r-connection-aborted = 1;
  -return HTTP_INTERNAL_SERVER_ERROR;
  +return OK;
   } else {
   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-2.0 mod_jk.c

2003-01-06 Thread glenn
glenn   2003/01/06 17:27:11

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Fix bug reported with form based authentication
  
  Revision  ChangesPath
  1.35  +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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- mod_jk.c  2 Jan 2003 12:58:57 -   1.34
  +++ mod_jk.c  7 Jan 2003 01:27:11 -   1.35
  @@ -1611,7 +1611,7 @@
   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_OK ) {
  +if( !r-sent_bodyct  r-status = HTTP_BAD_REQUEST ) {
   return r-status;
   }
   return OK;  /* NOT r-status, even if it has changed. */
  
  
  
  1.65  +2 -2  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.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- mod_jk.c  2 Jan 2003 12:58:57 -   1.64
  +++ mod_jk.c  7 Jan 2003 01:27:11 -   1.65
  @@ -1836,7 +1836,7 @@
   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_OK ) {
  +if( !r-sent_bodyct  r-status = HTTP_BAD_REQUEST ) {
   return r-status;
   }
   return OK;/* NOT r-status, even if it has changed. */
  
  
  

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




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

2003-01-06 Thread Glenn Nielsen
Thanks for reporting this.  I have changed the code so that
if there is no content only status codes = 400 are passed
back through apache.

The original patch was made so that when an error occurred at the
Ajp13Processor layer it could propogated back to the browser correctly
instead of a blank page being displayed.

Please test from a CVS build and let me know if this fixes the problem
for you.

Thanks,

Glenn

Aditya wrote:

On 2 Jan 2003 12:58:58 -, [EMAIL PROTECTED] said:
glenn 2003/01/02 04:58:58

 Modified: jk/native/apache-1.3 mod_jk.c jk/native/apache-2.0
mod_jk.c Log: Make sure http errors are handled by Apache if not
handled by Tomcat

 Revision Changes Path 1.34 +6 -1
jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c



This fix seems to cause container form-based authentication to have
problems - instead of the usual sequence of:

1) GET protected page - 302 to login page

2) GET login page - 200 retrieved

3) POST login page - 302 to protected page

4) GET protected page - 200 retrieved

The *first* time I try to go to the protected page, instead of (4), I get:

HTTP status 400 (invalid direct reference...)

However, if I then try to get the protected page a *second* time, it works fine...

reverting to a verison of mod_jk that does not include the below fix
doesn't evidence this problem...

Adi


--
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-2.0 mod_jk.c

2003-01-02 Thread glenn
glenn   2003/01/02 04:58:58

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Make sure http errors are handled by Apache if not handled by Tomcat
  
  Revision  ChangesPath
  1.34  +6 -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.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- mod_jk.c  16 Dec 2002 08:54:55 -  1.33
  +++ mod_jk.c  2 Jan 2003 12:58:57 -   1.34
  @@ -1609,6 +1609,11 @@
   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_OK ) {
  +return r-status;
  +}
   return OK;  /* NOT r-status, even if it has changed. */
   }
   }
  
  
  
  1.64  +6 -1  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.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- mod_jk.c  30 Dec 2002 04:05:39 -  1.63
  +++ mod_jk.c  2 Jan 2003 12:58:57 -   1.64
  @@ -1834,6 +1834,11 @@
   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_OK ) {
  +return r-status;
  +}
   return OK;/* NOT r-status, even if it has changed. */
   } else
   return HTTP_INTERNAL_SERVER_ERROR;
  
  
  

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




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

2002-12-29 Thread glenn
glenn   2002/12/29 20:05:39

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Port mod_jk apache 1.3 JkAutoAlias to apache 2.0, 1.3 and 2.0 should be in synch now
  
  Revision  ChangesPath
  1.63  +110 -1jakarta-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.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- mod_jk.c  9 Dec 2002 13:19:17 -   1.62
  +++ mod_jk.c  30 Dec 2002 04:05:39 -  1.63
  @@ -71,6 +71,7 @@
   #include ap_config.h
   #include apr_lib.h
   #include apr_date.h
  +#include apr_file_info.h
   #include httpd.h
   #include http_config.h
   #include http_request.h
  @@ -152,6 +153,11 @@
   int was_initialized;
   
   /*
  + * Automatic context path apache alias
  + */
  +char *alias_dir;
  +
  +/*
* Request Logging
*/
   
  @@ -894,6 +900,29 @@
   return NULL;
   }
   
  +
  +/*
  + * JkAutoAlias Directive Handling
  + *
  + * JkAutoAlias application directory
  + */
  +
  +static const char *jk_set_auto_alias(cmd_parms *cmd,
  +void *dummy,
  +char *directory)
  +{
  +server_rec *s = cmd-server;
  +jk_server_conf_t *conf =
  +(jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module);
  +
  +conf-alias_dir = directory;
  +
  +if (conf-alias_dir == NULL)
  +return JkAutoAlias directory invalid;
  +
  +return NULL;
  +}
  +
   /*
*
* Actually logging.
  @@ -1540,6 +1569,14 @@
The Jakarta mod_jk module request log format string),
   
   /*
  + * Automatically Alias webapp context directories into the Apache
  + * document space.
  + */
  +AP_INIT_TAKE1(
  +JkAutoAlias, jk_set_auto_alias, NULL, RSRC_CONF,
  +The Jakarta mod_jk module automatic context apache alias directory),
  +
  +/*
* Apache has multiple SSL modules (for example apache_ssl, stronghold
* IHS ...). Each of these can have a different SSL environment names
* The following properties let the administrator specify the envoiroment
  @@ -1853,6 +1890,9 @@
   c-log_file= NULL;
   c-log_level   = -1;
   c-log = NULL;
  +c-alias_dir   = NULL;
  +c-format_string   = NULL;
  +c-format  = NULL;
   c-mountcopy   = JK_FALSE;
   c-was_initialized = JK_FALSE;
   c-options = JK_OPT_FWDURIDEFAULT;
  @@ -2088,6 +2128,75 @@
   apr_table_setn(r-main-notes, JK_WORKER_ID, worker);
   
   return OK;
  +} else if(conf-alias_dir != NULL) {
  +/* Automatically map uri to a context static file */
  +jk_log(conf-log, JK_LOG_DEBUG,
  +mod_jk::jk_translate, check alias_dir: %s\n,
  +conf-alias_dir);
  +if (strlen(r-uri)  1) {
  +/* Get the context directory name */
  +char *context_dir = NULL;
  +char *context_path = NULL;
  +char *child_dir = NULL;
  +char *index = r-uri;
  +char *suffix = strchr(index+1,'/');
  +if( suffix != NULL ) {
  +int size = suffix - index;
  +context_dir = ap_pstrndup(r-pool,index,size);
  +/* Get the context child directory name */
  +index = index + size + 1;
  +suffix = strchr(index,'/');
  +if( suffix != NULL ) {
  +size = suffix - index;
  +child_dir = ap_pstrndup(r-pool,index,size);
  +} else {
  +child_dir = index;
  +}
  +/* Deny access to WEB-INF and META-INF directories */
  +if( child_dir != NULL ) {
  +jk_log(conf-log, JK_LOG_DEBUG,
  +mod_jk::jk_translate, AutoAlias child_dir: 
%s\n,child_dir);
  +if( !strcasecmp(child_dir,WEB-INF) ||
  +!strcasecmp(child_dir,META-INF) ) {
  +jk_log(conf-log, JK_LOG_DEBUG,
  +mod_jk::jk_translate, AutoAlias HTTP_FORBIDDEN 
for URI: %s\n,
  +r-uri);
  +return HTTP_FORBIDDEN;
  +}
  +}
  +} else {
  +context_dir = 

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

2002-12-09 Thread hgomez
hgomez  2002/12/09 05:19:18

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Make jk works with filters in Apache 2.0, ie mod_deflate and 
  AddOutputFilterByType DEFLATE text/html.
  
  
  Revision  ChangesPath
  1.62  +5 -2  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.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- mod_jk.c  6 Dec 2002 18:54:45 -   1.61
  +++ mod_jk.c  9 Dec 2002 13:19:17 -   1.62
  @@ -240,7 +240,10 @@
   if(!strcasecmp(header_names[h], Content-type)) {
   char *tmp = apr_pstrdup(r-pool, header_values[h]);
   ap_content_type_tolower(tmp);
  -r-content_type = tmp;
  +/* It should be done like this in Apache 2.0 */
  +/* This way, Apache 2.0 will be able to set the output filter */
  +/* and it make jk useable with deflate using AddOutputFilterByType 
DEFLATE text/html */
  +ap_set_content_type(r, tmp);
   } else if(!strcasecmp(header_names[h], Location)) {
   #ifdef AS400 
   /* Fix escapes in Location Header URL*/
  
  
  

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




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

2002-12-06 Thread mmanders
mmanders2002/12/06 10:54:45

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Updated jk_handler to check result of call to worker-get_endpoint and handle a 
failure.  This call can fail if the allocation for the endpoint fails because of low 
memory conditions causing a dereference of NULL when we try and access the endpoint.
  
  Revision  ChangesPath
  1.61  +6 -2  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.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- mod_jk.c  25 Nov 2002 16:01:48 -  1.60
  +++ mod_jk.c  6 Dec 2002 18:54:45 -   1.61
  @@ -1740,7 +1740,9 @@
  jk_cleanup_endpoint,  tpool );
   }
   #else */
  -worker-get_endpoint(worker, end, l);
  +/* worker-get_endpoint might fail if we are out of memory so check */
  +/* and handle it */
  +if (worker-get_endpoint(worker, end, l))
   /* #endif */
   {   
   int is_recoverable_error = JK_FALSE;
  @@ -1767,6 +1769,8 @@
   end-done(end, l); 
   /* #endif */
   }
  +else /* this means we couldn't get an endpoint */
  +rc = 0; /* just to make sure that we know we've failed */
   }
   
   #ifndef NO_GETTIMEOFDAY
  
  
  

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




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

2002-11-25 Thread hgomez
hgomez  2002/11/25 08:01:48

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  typecast to make iSeries compiler happy
  
  Revision  ChangesPath
  1.60  +2 -2  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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- mod_jk.c  22 Nov 2002 14:43:00 -  1.59
  +++ mod_jk.c  25 Nov 2002 16:01:48 -  1.60
  @@ -495,7 +495,7 @@
   /* 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_name  = (char *)ap_get_server_name(r);
   
   /* get the real port (otherwise redirect failed) */
   /* apr_sockaddr_port_get(port,r-connection-local_addr); */
  
  
  

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




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

2002-11-22 Thread jfclere
jfclere 2002/11/22 06:43:01

  Modified:jk/native/apache-1.3 mod_jk.c
   jk/native/apache-2.0 mod_jk.c
  Log:
  Arrange HEAD handling.
  That fixes 14293. Thanks to Martin Kraemer for his help.
  
  Revision  ChangesPath
  1.31  +8 -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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- mod_jk.c  18 Oct 2002 10:23:15 -  1.30
  +++ mod_jk.c  22 Nov 2002 14:43:00 -  1.31
  @@ -354,6 +354,11 @@
   }
   }
   
  +if (p-r-header_only) {
  +ap_bflush(bf);
  +return JK_TRUE;
  +}
  +
   while(len  !p-r-connection-aborted) {
   w = ap_bwrite(p-r-connection-client, buf[r], len);
   if (w  0) {
  @@ -470,12 +475,12 @@
   /* 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_name  = (char *) ap_get_server_name(r);
   
   /* 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_port  = ap_get_server_port(r);
   
   s-server_software = (char *)ap_get_server_version();
   
  
  
  
  1.59  +7 -1  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.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- mod_jk.c  28 Oct 2002 14:38:07 -  1.58
  +++ mod_jk.c  22 Nov 2002 14:43:00 -  1.59
  @@ -364,6 +364,12 @@
   return JK_FALSE;
   }
   }
  +if (p-r-header_only) {
  +#ifndef AS400
  +ap_rflush(p-r);
  +#endif
  +return JK_TRUE;
  +}
   #ifdef AS400
   rc = ap_change_response_body_xlate(p-r, 65535, 65535); /* turn off 
response body translation*/
if(rc){
  
  
  

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




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

2002-10-28 Thread hgomez
hgomez  2002/10/28 06:38:07

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Add JkRequestLogFormat in Apache 2.0.
  
  May be Glenn should take a look if I didn't introduce problems here...
  
  Revision  ChangesPath
  1.58  +408 -1jakarta-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.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- mod_jk.c  18 Oct 2002 10:23:15 -  1.57
  +++ mod_jk.c  28 Oct 2002 14:38:07 -  1.58
   -111,6 +111,7 
   
   #define JK_WORKER_ID(jakarta.worker)
   #define JK_HANDLER  (jakarta-servlet)
  +#define JK_DURATION (jakarta.worker.duration)
   #define JK_MAGIC_TYPE   (application/x-jakarta-servlet)
   #define NULL_FOR_EMPTY(x)   ((x  !strlen(x)) ? NULL : x) 
   
   -151,6 +152,13 
   int was_initialized;
   
   /*
  + * Request Logging
  + */
  +
  +char *format_string;
  +apr_array_header_t *format;
  +
  +/*
* SSL Support
*/
   int  ssl_enable;
   -877,6 +885,378 
   return NULL;
   }
   
  +/*
  + *
  + * Actually logging.
  + */
  +
  +typedef const char *(*item_key_func) (request_rec *, char *);
  + 
  +typedef struct { 
  +item_key_func func;
  +char *arg; 
  +} request_log_format_item;
  +
  +static const char *process_item(request_rec *r,
  +  request_log_format_item *item)
  +{
  +const char *cp;
  +
  +cp = (*item-func) (r,item-arg);
  +return cp ? cp : -;
  +}
  +
  +static int request_log_transaction(request_rec *r,
  +  jk_server_conf_t *conf)
  +{
  +request_log_format_item *items;
  +char *str, *s;
  +int i;
  +int len = 0;
  +const char **strs;
  +int *strl;
  +apr_array_header_t *format = conf-format;
  +
  +strs = ap_palloc(r-pool, sizeof(char *) * (format-nelts));
  +strl = ap_palloc(r-pool, sizeof(int) * (format-nelts));
  +items = (request_log_format_item *) format-elts;
  +for (i = 0; i  format-nelts; ++i) {
  +strs[i] = process_item(r, items[i]);
  +}
  +for (i = 0; i  format-nelts; ++i) {
  +len += strl[i] = strlen(strs[i]);
  +}
  +str = ap_palloc(r-pool, len + 1);
  +for (i = 0, s = str; i  format-nelts; ++i) {
  +memcpy(s, strs[i], strl[i]);
  +s += strl[i];
  +}
  +*s = 0;
  +
  +jk_log(conf-log ? conf-log : main_log, JK_LOG_REQUEST, str);
  +}
  +
  +/*
  + *
  + * Parsing the log format string
  + */
  +
  +static char *format_integer(apr_pool_t *p, int i)
  +{
  +return apr_psprintf(p, %d, i);
  +}
  + 
  +static char *pfmt(apr_pool_t *p, int i)
  +{
  +if (i = 0) {
  +return -;
  +}
  +else {
  +return format_integer(p, i);
  +}
  +}
  +
  +static const char *constant_item(request_rec *dummy, char *stuff)
  +{
  +return stuff;
  +}
  +
  +static const char *log_worker_name(request_rec *r, char *a)
  +{
  +return ap_table_get(r-notes, JK_WORKER_ID);
  +}
  +
  +
  +static const char *log_request_duration(request_rec *r, char *a)
  +{
  +return ap_table_get(r-notes, JK_DURATION);
  +}
  + 
  +static const char *log_request_line(request_rec *r, char *a)
  +{
  +/* NOTE: If the original request contained a password, we
  + * re-write the request line here to contain XX instead:
  + * (note the truncation before the protocol string for HTTP/0.9 
requests)
  + * (note also that r-the_request contains the unmodified request)
  + */
  +return (r-parsed_uri.password) ? ap_pstrcat(r-pool, r-method,  ,
  + apr_uri_unparse(r-pool, r-parsed_uri, 
0),
  + r-assbackwards ? NULL :  , r-protocol, 
NULL)
  +: r-the_request;
  +}
  +
  +/* These next two routines use the canonical name:port so that log
  + * parsers don't need to duplicate all the vhost parsing crud.
  + */
  +static const char *log_virtual_host(request_rec *r, char *a)
  +{
  +return r-server-server_hostname;
  +}
  + 
  +static const char *log_server_port(request_rec *r, char *a)
  +{
  +return apr_psprintf(r-pool, %u,
  +r-server-port ? r-server-port : ap_default_port(r));
  +}
  + 
  +/* This respects the setting of UseCanonicalName so that
  + * the dynamic mass virtual hosting trick works better.
  + */
  +static const char *log_server_name(request_rec *r, char *a)
  +{
  +return ap_get_server_name(r);

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

2002-09-10 Thread jfclere

jfclere 2002/09/10 08:08:13

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  I prefer to get 500 when something goes wrong than getting not found.
  
  Revision  ChangesPath
  1.56  +3 -2  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.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- mod_jk.c  4 Sep 2002 11:31:32 -   1.55
  +++ mod_jk.c  10 Sep 2002 15:08:13 -  1.56
  @@ -1376,7 +1376,8 @@
   
   if(rc) {
   return OK;/* NOT r-status, even if it has changed. */
  -}
  +} else
  +return HTTP_INTERNAL_SERVER_ERROR;
   }
else
return HTTP_INTERNAL_SERVER_ERROR;
  
  
  

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




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

2002-07-23 Thread Bojan Smojver

Quoting [EMAIL PROTECTED]:

 It's jk_translate who decides if a request is to be handled by
 jk ( by mapping it to a uriEnv ).
 
 You can add a test for r-handler==DIR_MAGIC_TYPE, but don't assume
 any uriEnv is set.

Actually, r-handler is always NULL in jk_translate(). At least in mod_jk 1.2.0
(but I'm suspecting that would be the case in mod_jk2 as well, because it's
Apache that determines that). So, adding the test wouldn't do anything.

If DirectoryIndex is not used, by the time jk_handler() is reached with
DIR_MAGIC_TYPE, we're out of mod_dir. If DirectoryIndex is used, then we end up
in jk_handler() much sooner, by an explicit call from within mod_dir. That's, of
course, when a static file exists. In none of the cases is r-handler set while
in jk_translate().

So, for now, I think the only option is to rely on DIR_MAGIC_TYPE test in
jk_handler(). How's that going to work in mod_jk2, I have no idea... Hopefully,
Mark will do a few tests and then we'll know more.

Bojan

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




Re: [VOTE]: Re: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c

2002-07-23 Thread Henri Gomez

Quoting Bojan Smojver [EMAIL PROTECTED]:

 And I answer (to myself :-)
 
 On Tue, 2002-07-23 at 14:47, Bojan Smojver wrote:
  So, the unsolved questions for me are:
  
  1. What is it then that jk_handler() does that makes it actually serve the
  request when DIR_MAGIC_TYPE is included in the test? It must be that its
 mapping
  is 'better' than mapping of jk_translate()...
 
 Nothing special - it just does it ALWAYS. Which means that Tomcat ALWAYS
 gets involved, which is NOT what Bill wanted (sorry Bill) and is
 definitely not what I wanted. In order to fix that and let Apache handle
 the directories it can physically see, and give the rest to Tomcat, we'd
 need to do this at the beginning of jk_handler():
 
 -
 /* Deciding if this request is for us, or should we pass it on */
 if(strcmp(r-handler,JK_HANDLER)){
 if(strcmp(r-handler,DIR_MAGIC_TYPE)) /* Not directory, skip */
 return DECLINED;
 else if(ap_is_directory(r-pool, r-filename)) /* Can stat, skip */
 return DECLINED;
 }
 -
 
 Which would then mean that you MUST have DirectoryIndex in place if you
 have extension mappings and want your physically accessible files served
 by Tomcat. It would also mean that all physically accessible
 directories, without ANY index files mentioned in DirectoryIndex, would
 be served by Apache. Anything else would go to Tomcat for resolution.
 This is not ideal and maybe not even correct, but it is the best I can
 come up with at this point.
 
 Before I make any changes to the CVS, I'd like to know what everyone
 thinks. So, here are the choices:
 
 [ ] Keep it as is and send all DIR_MAGIC_TYPE requests to Tomcat
 [ ] Keep it as is, but only if DIR_MAGIC_TYPE can be turned on/off
 [ ] Remove DIR_MAGIC_TYPE handling altogether
 [ ] Make the change
 [ ] Make the change, but only if DIR_MAGIC_TYPE can be turned on/off
 
  2. Or is it that jk_translate() never even gets involved during that
 request and
  therefore never has the chance to do the mapping?
 
 I answered this one before. The request with DIR_MAGIC_TYPE never
 touches jk_translate().

For someone who have all its tomcat behind a webserver, I'll be to have the
requests sent to Tomcat since my web servers won't have a directory created for
all the webapps available on tomcats farms behind.

Alternativly I don't want to receive index.php or index.pl in Tomcat, and so
want  only the one which match with JkMount (in mod_jk 1.2 way), ie JkMount
*.jsp ajp13.



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




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

2002-07-23 Thread bojan

bojan   2002/07/23 19:38:32

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Refine directory handling a bit more. Make use of the new JkOption,
  ForwardDirectories. When enabled, all unresolved directory requests go
  to Tomcat. This option is disabled by default.
  
  Revision  ChangesPath
  1.53  +21 -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.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- mod_jk.c  22 Jul 2002 21:03:19 -  1.52
  +++ mod_jk.c  24 Jul 2002 02:38:32 -  1.53
  @@ -959,7 +959,8 @@
* -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
  + *  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,
  @@ -1000,6 +1001,9 @@
   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);
   
  @@ -1183,20 +1187,26 @@
   
   /* We do DIR_MAGIC_TYPE here to make sure TC gets all requests, even
* if they are directory requests, in case there are no static files
  - * visible to Apache and/or DirectoryIndex was not used */
  + * visible to Apache and/or DirectoryIndex was not used. This is only
  + * used when JkOptions has ForwardDirectories set. */
   
  -/* not for me, try next handler */
  +/* Not for me, try next handler */
   if(strcmp(r-handler,JK_HANDLER)  strcmp(r-handler,DIR_MAGIC_TYPE))
  -  return DECLINED;
  +return DECLINED;
   
   xconf = (jk_server_conf_t *)ap_get_module_config(r-server-module_config, 
jk_module);
  +
  +/* Was the option to forward directories to Tomcat set? */
  +if(!strcmp(r-handler,DIR_MAGIC_TYPE)  !(xconf-options  JK_OPT_FWDDIRS))
  +return DECLINED;
  +
   worker_name = apr_table_get(r-notes, JK_WORKER_ID);
   xl = xconf-log ? xconf-log : main_log;
   
   /* Set up r-read_chunked flags for chunked encoding, if present */
   if(rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) {
  -return rc;
  +return rc;
   }
   
   if( worker_name == NULL ) {
  @@ -1610,6 +1620,11 @@
   if(worker) {
   r-handler=apr_pstrdup(r-pool,JK_HANDLER);
   apr_table_setn(r-notes, JK_WORKER_ID, worker);
  + 
  +/* This could be a sub-request, possibly from mod_dir */
  +if(r-main)
  +apr_table_setn(r-main-notes, JK_WORKER_ID, worker);
  +
   return OK;
   }
   }
  
  
  

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




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

2002-07-23 Thread bojan

bojan   2002/07/23 21:48:52

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Save a strcmp() call.
  
  Revision  ChangesPath
  1.54  +3 -3  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.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- mod_jk.c  24 Jul 2002 02:38:32 -  1.53
  +++ mod_jk.c  24 Jul 2002 04:48:52 -  1.54
  @@ -1183,7 +1183,7 @@
   jk_server_conf_t *xconf;
   jk_logger_t  *xl;
   jk_server_conf_t *conf;
  -int  rc;
  +int  rc,dmt=1;
   
   /* We do DIR_MAGIC_TYPE here to make sure TC gets all requests, even
* if they are directory requests, in case there are no static files
  @@ -1191,14 +1191,14 @@
* used when JkOptions has ForwardDirectories set. */
   
   /* Not for me, try next handler */
  -if(strcmp(r-handler,JK_HANDLER)  strcmp(r-handler,DIR_MAGIC_TYPE))
  +if(strcmp(r-handler,JK_HANDLER)  (dmt=strcmp(r-handler,DIR_MAGIC_TYPE)))
   return DECLINED;
   
   xconf = (jk_server_conf_t *)ap_get_module_config(r-server-module_config, 
jk_module);
   
   /* Was the option to forward directories to Tomcat set? */
  -if(!strcmp(r-handler,DIR_MAGIC_TYPE)  !(xconf-options  JK_OPT_FWDDIRS))
  +if(!dmt  !(xconf-options  JK_OPT_FWDDIRS))
   return DECLINED;
   
   worker_name = apr_table_get(r-notes, JK_WORKER_ID);
  
  
  

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




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

2002-07-22 Thread bojan

bojan   2002/07/22 14:03:19

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Put back DIR_MAGIC_TYPE in case there is no DirectoryIndex and/or no
  pysical files to stat.
  
  Lose one stat, not really needed. Fix a typo.
  
  Revision  ChangesPath
  1.52  +10 -5 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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- mod_jk.c  22 Jul 2002 02:48:11 -  1.51
  +++ mod_jk.c  22 Jul 2002 21:03:19 -  1.52
  @@ -1181,9 +1181,14 @@
   jk_server_conf_t *conf;
   int  rc;
   
  -if(strcmp(r-handler,JK_HANDLER)) /* not for me, try next handler */
  +/* We do DIR_MAGIC_TYPE here to make sure TC gets all requests, even
  + * if they are directory requests, in case there are no static files
  + * visible to Apache and/or DirectoryIndex was not used */
  +
  +/* not for me, try next handler */
  +if(strcmp(r-handler,JK_HANDLER)  strcmp(r-handler,DIR_MAGIC_TYPE))
 return DECLINED;
  -
  +
   xconf = (jk_server_conf_t *)ap_get_module_config(r-server-module_config, 
jk_module);
   worker_name = apr_table_get(r-notes, JK_WORKER_ID);
  @@ -1622,9 +1627,9 @@
   /* First find just the name of the file, no directory */
   r-filename = (char *)apr_filename_of_pathname(r-uri);
   
  -/* Ony if sub-request for a directory, most likely from mod_dir */
  +/* Only if sub-request for a directory, most likely from mod_dir */
   if (r-main  r-main-filename 
  -ap_is_directory(r-pool, r-main-filename)){
  +!*apr_filename_of_pathname(r-main-filename)){

   /* The filename from the main request will be set to what should
* be picked up, aliases included. Tomcat will need to know about
  @@ -1638,7 +1643,7 @@
  APR_FILEPATH_TRUENAME,
  r-pool)
   != APR_SUCCESS){
  -  return DECLINED;
  +  return DECLINED; /* We should never get here, very bad */
   }
   
   /* Stat the file so that mod_dir knows it's there */
  
  
  

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




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

2002-07-22 Thread Bojan Smojver

Quoting [EMAIL PROTECTED]:

 It's jk_translate who decides if a request is to be handled by
 jk ( by mapping it to a uriEnv ).
 
 You can add a test for r-handler==DIR_MAGIC_TYPE, but don't assume
 any uriEnv is set.

OK, I did that in jk2_handler(), which now seems like the wrong place to do it,
and I also tried to make sure uriEnv is populated, but I don't think I'm picking
it from the correct spot (if it makes any difference at all). I did:

-
ap_get_module_config(r-server-module_config, jk2_module);
-

where I maybe should have done:

-
ap_get_module_config(r-per_dir_config, jk2_module);
-

Honestly, I don't understand neither mod_jk2 (surprise :-) nor Apache2 enough to
make a decision about that. So, I'll leave this up to you guys to correctly
identify.

However, the most confusing part of this whole business is this (I'll ask this
in terms of mod_jk, but it should be similar for mod_jk2):

If jk_translate() is the one mapping requests and also in charge of setting the
value of r-handler (which will later on be used by jk_handler() to recognise
that this as something for Tomcat and eventually serve the request), that would
mean that it must have recognised the requested URI that had
r-handler==DIR_MAGIC_TYPE as the one that should be mapped too. I don't see
anything in the code that would discriminate on the basis of r-handler, except
for manual mappings, which does not include DIR_MAGIC_TYPE.

So, the unsolved questions for me are:

1. What is it then that jk_handler() does that makes it actually serve the
request when DIR_MAGIC_TYPE is included in the test? It must be that its mapping
is 'better' than mapping of jk_translate()...

2. Or is it that jk_translate() never even gets involved during that request and
therefore never has the chance to do the mapping?

Bojan

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




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

2002-07-21 Thread bojan

bojan   2002/07/21 15:34:25

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Instead of mixing URI's with filenames, which was wrong, just use filenames to stat. 
This will also take care of aliases, but be warned - URI will still be passed to 
Tomcat unchanged.
  
  Revision  ChangesPath
  1.50  +25 -14jakarta-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.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- mod_jk.c  21 Jul 2002 06:50:02 -  1.49
  +++ mod_jk.c  21 Jul 2002 22:34:25 -  1.50
  @@ -1618,24 +1618,35 @@
   static int jk_map_to_storage(request_rec *r)
   {
   if (apr_table_get(r-notes, JK_WORKER_ID)) {
  -char *uri_p=r-uri;
   
  -/* This is old code which doesn't seem to work well with mod_dir
  -r-filename = (char *)apr_filename_of_pathname(r-uri); */
  +/* First find just the name of the file, no directory */
  +r-filename = (char *)apr_filename_of_pathname(r-uri);
   
  -/* Absolute paths cannot be merged */
  -while (*uri_p == '/') ++uri_p;
  +/* Ony if valid sub-request, most likely from mod_dir */
  +if (r-main  r-main-filename  *r-main-filename){

  -/* Need absolute path to stat */
  -if (apr_filepath_merge(r-filename, ap_document_root(r), uri_p,
  -   APR_FILEPATH_SECUREROOT | APR_FILEPATH_TRUENAME,
  -   r-pool)
  -!= APR_SUCCESS){
  -  return DECLINED;
  -}
  +/* The filename from the main request will be set to what should
  + * be picked up, aliases included. Tomcat will need to know about
  + * those aliases or things won't work for them. Normal files should
  + * be fine. */
  +
  +/* Need absolute path to stat */
  +if (r-main-filename[strlen(r-main-filename)-1] == '/'){
  +if (apr_filepath_merge(r-filename,
  +   r-main-filename, r-filename,
  +   APR_FILEPATH_SECUREROOT |
  +   APR_FILEPATH_TRUENAME,
  +   r-pool)
  +!= APR_SUCCESS){
  +  return DECLINED;
  +}
  +} else {
  +r-filename = apr_pstrdup(r-pool, r-main-filename);
  +}
   
  -/* Stat the file so that mod_dir knows it's there */
  -apr_stat(r-finfo, r-filename, APR_FINFO_TYPE, r-pool);
  +/* Stat the file so that mod_dir knows it's there */
  +apr_stat(r-finfo, r-filename, APR_FINFO_TYPE, r-pool);
  +}
   
   return OK;
   }
  
  
  

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




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

2002-07-21 Thread bojan

bojan   2002/07/21 19:48:11

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Be a bit more specific about what is a directory.
  
  Revision  ChangesPath
  1.51  +10 -13jakarta-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.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- mod_jk.c  21 Jul 2002 22:34:25 -  1.50
  +++ mod_jk.c  22 Jul 2002 02:48:11 -  1.51
  @@ -1622,8 +1622,9 @@
   /* First find just the name of the file, no directory */
   r-filename = (char *)apr_filename_of_pathname(r-uri);
   
  -/* Ony if valid sub-request, most likely from mod_dir */
  -if (r-main  r-main-filename  *r-main-filename){
  +/* Ony if sub-request for a directory, most likely from mod_dir */
  +if (r-main  r-main-filename 
  +ap_is_directory(r-pool, r-main-filename)){

   /* The filename from the main request will be set to what should
* be picked up, aliases included. Tomcat will need to know about
  @@ -1631,17 +1632,13 @@
* be fine. */
   
   /* Need absolute path to stat */
  -if (r-main-filename[strlen(r-main-filename)-1] == '/'){
  -if (apr_filepath_merge(r-filename,
  -   r-main-filename, r-filename,
  -   APR_FILEPATH_SECUREROOT |
  -   APR_FILEPATH_TRUENAME,
  -   r-pool)
  -!= APR_SUCCESS){
  -  return DECLINED;
  -}
  -} else {
  -r-filename = apr_pstrdup(r-pool, r-main-filename);
  +if (apr_filepath_merge(r-filename,
  +   r-main-filename, r-filename,
  +   APR_FILEPATH_SECUREROOT |
  +   APR_FILEPATH_TRUENAME,
  +   r-pool)
  +!= APR_SUCCESS){
  +  return DECLINED;
   }
   
   /* Stat the file so that mod_dir knows it's there */
  
  
  

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




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

2002-07-16 Thread bojan

bojan   2002/07/16 22:40:35

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix picking up default pages from Apache 2.x
  
  Revision  ChangesPath
  1.47  +3 -2  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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- mod_jk.c  23 Jun 2002 05:40:29 -  1.46
  +++ mod_jk.c  17 Jul 2002 05:40:35 -  1.47
  @@ -1181,7 +1181,8 @@
   jk_server_conf_t *conf;
   int  rc;
   
  -if(strcmp(r-handler,JK_HANDLER))/* not for me, try next handler */
  +/* not for me, try next handler */
  +if(strcmp(r-handler,JK_HANDLER)  strcmp(r-handler,DIR_MAGIC_TYPE))
 return DECLINED;
   
   xconf = (jk_server_conf_t *)ap_get_module_config(r-server-module_config, 
  
  
  

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




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

2002-06-23 Thread mturk

mturk   2002/06/22 22:40:29

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fixing the compile time warning:
  'jk_apr_pool_cleanup' function must return a value
  
  Revision  ChangesPath
  1.46  +2 -1  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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- mod_jk.c  12 Jun 2002 14:31:09 -  1.45
  +++ mod_jk.c  23 Jun 2002 05:40:29 -  1.46
  @@ -1359,6 +1359,7 @@
   }
   s = s-next;
   }
  + return APR_SUCCESS;
   }
   
   /** Create default jk_config. XXX This is mostly server-independent,
  
  
  

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




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

2002-06-12 Thread hgomez

hgomez  2002/06/12 07:31:09

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix the incorrect error reported when a worker is defined
  but didn't exist (reported by Bojan)
  
  Revision  ChangesPath
  1.45  +4 -1  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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mod_jk.c  8 May 2002 00:45:33 -   1.44
  +++ mod_jk.c  12 Jun 2002 14:31:09 -  1.45
  @@ -1324,6 +1324,9 @@
   return OK;/* NOT r-status, even if it has changed. */
   }
   }
  + else
  + return HTTP_INTERNAL_SERVER_ERROR;
  +
   }
   
   return DECLINED;
  
  
  

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




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

2002-06-12 Thread GOMEZ Henri

This should fix the problem reported by Bojan.

What about tagging jtc for jk_1_2_0 release ?

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 4:31 PM
To: [EMAIL PROTECTED]
Subject: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0
mod_jk.c


hgomez  2002/06/12 07:31:09

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Fix the incorrect error reported when a worker is defined
  but didn't exist (reported by Bojan)
  
  Revision  ChangesPath
  1.45  +4 -1  
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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mod_jk.c 8 May 2002 00:45:33 -   1.44
  +++ mod_jk.c 12 Jun 2002 14:31:09 -  1.45
  @@ -1324,6 +1324,9 @@
   return OK;/* NOT r-status, even if it 
has changed. */
   }
   }
  +else
  +return HTTP_INTERNAL_SERVER_ERROR;
  +
   }
   
   return DECLINED;
  
  
  

--
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-2.0 mod_jk.c

2002-04-12 Thread mmanders

mmanders02/04/12 08:55:59

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  Moved cleanup routine to the right place.  At least on NetWare, the module is loaded 
multiple times and the first time, cleanup wasn't happening.  Since it is a pool 
cleanup, I now register the cleanup where the pool is first used.
  
  Revision  ChangesPath
  1.43  +31 -31jakarta-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.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- mod_jk.c  11 Apr 2002 21:52:43 -  1.42
  +++ mod_jk.c  12 Apr 2002 15:55:59 -  1.43
  @@ -60,7 +60,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor [EMAIL PROTECTED]   *
* Henri Gomez [EMAIL PROTECTED]   *
  - * Version: $Revision: 1.42 $   *
  + * Version: $Revision: 1.43 $   *
***/
   
   /*
  @@ -1328,6 +1328,35 @@
   return DECLINED;
   }
   
  +/** Standard apache hook, cleanup jk
  + */
  +static apr_status_t jk_apr_pool_cleanup(void *data)
  +{
  +server_rec *s = data;
  +
  +while (NULL != s)
  +{
  +jk_server_conf_t *conf =
  +(jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module);
  +
  +
  +if (conf)
  +{
  +wc_close(conf-log);
  +if (conf-worker_properties)
  +map_free(conf-worker_properties);
  +if (conf-uri_to_context)
  +map_free(conf-uri_to_context);
  +if (conf-automount)
  +map_free(conf-automount);
  +if (conf-uw_map)
  +uri_worker_map_free(conf-uw_map, conf-log);
  +jk_close_file_logger(conf-log);
  +}
  +s = s-next;
  +}
  +}
  +
   /** Create default jk_config. XXX This is mostly server-independent,
   all servers are using something similar - should go to common.
*/
  @@ -1390,6 +1419,7 @@
   
   c-s = s;
   
  +apr_pool_cleanup_register(p, s, jk_apr_pool_cleanup, jk_apr_pool_cleanup);
   return c;
   }
   
  @@ -1466,35 +1496,6 @@
   return overrides;
   }
   
  -/** Standard apache hook, cleanup jk
  - */
  -static apr_status_t jk_child_exit(void *data)
  -{
  -server_rec *s = data;
  -
  -while (NULL != s)
  -{
  -jk_server_conf_t *conf =
  -(jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module);
  -
  -
  -if (conf)
  -{
  -wc_close(conf-log);
  -if (conf-worker_properties)
  -map_free(conf-worker_properties);
  -if (conf-uri_to_context)
  -map_free(conf-uri_to_context);
  -if (conf-automount)
  -map_free(conf-automount);
  -if (conf-uw_map)
  -uri_worker_map_free(conf-uw_map, conf-log);
  -jk_close_file_logger(conf-log);
  -}
  -s = s-next;
  -}
  -}
  -
   /** Standard apache callback, initialize jk.
*/
   static void jk_child_init(apr_pool_t *pconf, 
  @@ -1503,7 +1504,6 @@
   jk_server_conf_t *conf =
   (jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module);
   
  -apr_pool_cleanup_register(pconf, s, jk_child_exit, jk_child_exit);
   /* init_jk( pconf, conf, s ); */
   }
   
  
  
  

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




  1   2   >