Which hooks to use in perlbal?

Brad Fitzpatrick brad at danga.com
Tue May 30 16:49:37 UTC 2006


Unfortunately, perlbal doesn't really have great hooks for this sort of
use.

- Brad

On Mon, 29 May 2006, Elliot F wrote:

> Hello all,
>
> I could use a nudge in the right direction in regards to a perlbal
> plugin I'm writing.  I am attempting to use perlbal as a general-purpose
> application web server, in lieu of using apache+mod_perl.
>
> The problem is that I don't know what hook I should use when writing my
> plugin.  I need to have access POST data, but it seems the only time a
> plugin can have access to any POST data is when 'proxy_read_request' is
> used, but the 'proxy_read_request' isn't called when there is no POST
> data.  Or am I crazy?
>
> Summary of my problem:
> When hooked against start_proxy_request, $obj->{read_buf} is empty
> When hooked against proxy_read_request, $obj->{read_buf} is not empty,
> but if there is no data POSTed, proxy_read_request is not triggered.
>
> Should I make a subref and register the same subref with multiple hooks
> (if I want to catch both POST and non-post traffic)?  Or is there some
> amazingly simple thing that I'm overlooking?
>
> Thanks,
>
> Elliot
>
>


More information about the perlbal mailing list