Mladen Turk wrote:



Henri Gomez wrote:

It seems we all agreed on the need to make an ajplib using APR to provide a fully functionnal AJP client lib.

This library will be used by :

- mod_ajp (at least to have some sort of test framework)



Well, it's discussable if we decide to import the mod_proxy code to our
source tree, and roll out our own version of mod_proxy calling it
mod_proxy_on_the_steroids :).


- proxy_ajp (to provide something usefull for mod_proxy
  and inclusion in HTTPD, I still wonder if it will be
  in 2.0 and/or 2.1 ?

Could we discuss now what should be included in such library, structures, functions and others ?



The starting point for lib should be opened apr_socket_t. The way how it's
get opened to a particular backend depends on framework.
For start we can make our own simply directly opening apr_socket (or couple
of them) from command line, something like apr/aprutil test framework?



I start to write some code by extracting part of jk2 and wonder for example about logging.

I'd like to have a pluggable logging function, something which will be by default using stdout/stderr, but which could be overrided to use Apache2 logging functions.



Well, I can extract the apache's logging functions in file that will use
stdout/stderr, so we'll have the same api.
The file will get complied together with test case, so there will be no need
to change something in the core of lib, and we willl not need anything
pluggable :).
The only difference would be:

#ifdef AJP_TEST_CASE
#include "httpd_wrapper.h"
#else
... Include the real apache headers
#endif

Think that other needed ap_xxx api calls can be written in the same way,
finaly having something like 'dummy apache2 API lib' for testing from
command line.
If we need a request_rec struct for example, we'll make our own surrogate
and fill it only with the needed struct elements, etc...

I could start with assumption we have ajp_log(xxxx) function in the lib like this ?


ajp_log(ajp_env_t * env, int loglevel, char * fmt, ...) ?

The idea could be to have :

ajp_env_t * ajp_init()

ajp_env_t * env;

myenv = ajp_init();

ajp_setlogfunc(myenv, myfunc)

or

myenv->logfunc = myfunc;

or

myenv = ajp_init(myfunc)







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



Reply via email to