Re: sending arbitrary errors to client

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 22 Dec 2009 06:24:21 +0100


On Mon, Dec 21, 2009 at 04:12:01PM -0800, Joe Williams wrote:
>
> Willy,
>
> Has this been added to the dev releases of 1.4?

just on the todo list, and 1.4 is not finished BTW. The dev has slowed down because of the difficulties I encountered with a few prerequisite adaptations for later keep-alive support.

By the way, if you're interested in implementing the feature yourself, it's not that hard. Basically you have to copy the redirect rules. Or even better, we could extend the redirect rules so that the "return" rules appear in the same list and their ordering is respected. That way we could have :

      redirect XXX if YYY
      return file XXX if YYY
      redirect XXX if YYY

and have everything processed as expected.

The code to load the file already exists since it's used by "errorfile". We could in fact make the "return" statement be a redirect rule with a status 200. Then we would support at least 'file XXX' or 'content "string"' for small data.

Regards,
Willy Received on 2009/12/22 06:24

This archive was generated by hypermail 2.2.0 : 2009/12/22 06:30 CET