On Nov 25, 2013, at 11:18 AM, Ron Barber <[email protected]> wrote:
> Hi TS community! > > I am requesting comment/suggestions related to implementation of a feature > that provides custom error responses on a per-remap basis. Essentially, this > is similar to the existing body factory but with support for external objects > (via HTTP) AND definable on a per-remap basis. > > I am thinking of moving forward in one of two directions for the > implementation: > 1. Create a plugin which is independent of the existing body factory that > implements the requirements. > 2. Extend the existing body factory to allow it to fetch external objects > AND use conf_remap (or maybe extend it also) to swap out body factory configs > on a per remap basis. I need to think about this a little more, but I think a combo of both is the way to go; a new API which allows direct control of body factory negotiation. The reason I’m thinking that is because the body factory was intended to support multiple “factories” already (typically based on Accept-Language). The additional API allows you to control this from either existing plugins (e.g. regex_remap could support it), or create a generic “body_factory” plugin. But the plugin would not have to implement a the body factory, just the negotiation portion. I’m on vacation all week this week, so probably can’t look at it for a little while. Anyone else got any clever thoughts on this? Cheers, — Leif
