Issac Goldstand wrote:
Implemented it in C:

  if (f->r->status==HTTP_NOT_FOUND) // If this is so, we need to revamp the
request_rec
  {
   f->r->status=HTTP_OK; // Spoof HTTP_OK
   f->r->status_line="200 OK";

APR_BRIGADE_INSERT_TAIL(ctx->bb,apr_bucket_eos_create(f->c->bucket_alloc));
// Add an EOS to the new bb
   ap_pass_brigade(f->next,ctx->bb); // and pass the new bb to the next
filter
   return APR_SUCCESS;
  }

Not sure how to translate that to mod_perl's API (the first half is easy and
understandable in C, I think, though...)
It works exactly the same, just add $ before 'f' :) Though you don't say where in the filter chain do you insert it and how do you configure it (i.e. what filter type).

This was *my* solution - I'm not sure if it's the "best way to do it"...
I'm sure that as I delve deeper into Apache 2, I'll find better solutions...
Hence my suggestion to ask at the httpd-dev list.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to