httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prajakt Deolasee" <>
Subject Writing new module for Apache 2.0
Date Wed, 20 Nov 2002 09:39:32 GMT
Hi All,

I am trying to write a new module for post processing of the response.
I am using Apache 2.0 as a reverse proxy.

I wrote a modeul called mod_xyz. Apache could load the module properly
and the xyz_register_hook method was also called properly. In the "hook"
function I wrote following code,

static void xyz_register_hook(apr_pool_t *p)
	xyz_hook_response_handler(ap_xyz_response_handler, NULL, NULL, APR_HOOK_REALLY_LAST);

and ap_xyz_response_handler function looks like this,

int ap_xyz_response_handler(request_rec *r)
 // Send a message to stderr (apache redirects this to the error log)
  fprintf(stderr,"apache2_mod_tut1: A request was made.\n");

  // We need to flush the stream for messages to appear right away.
  // Performing an fflush() in a production system is not good for
  // performance - don't do this for real.

  // Return DECLINED so that the Apache core will keep looking for
  // other modules to handle this request.  This effectively makes
  // this module completely transparent.
  return DECLINED;

But this function is never called. Can somebody tell me whats wrong with this.


View raw message