[MAJOR] merged the 'setbe' actions to switch the backend on a regex

Sin Yu's patch to permit to change the proxy from a regex was merged
with little changes :
  - req_cap/rsp_cap are not reassigned to the new proxy, they stay
    attached to the frontend

  - the actions have been renamed "reqsetbe" and "reqisetbe" for
    "set BackEnd".

  - the buffer is not reset after the switch, instead, the headers are
    parsed again by the backend

  - in Sin's patch, it was theorically possible to switch multiple times,
    but the switching track was lost, making it impossible to apply
    server responsesin the reverse order. Now switching is limited to
    1 action (separation between frontend and backend) but the filters
    remain.

Now it will be extremely easy to add other switching conditions, such
as host matching, URI matching, etc...

There's still a hard work to be done on the logs and stats.
This commit is contained in:
Willy Tarreau
2006-12-17 23:15:24 +01:00
parent ddb358d932
commit a496b6042b
3 changed files with 95 additions and 2 deletions

View File

@@ -38,6 +38,7 @@
#define ACT_DENY 3 /* deny the request */
#define ACT_PASS 4 /* pass this header without allowing or denying the request */
#define ACT_TARPIT 5 /* tarpit the connection matching this request */
#define ACT_SETBE 6 /* switch the backend */
struct hdr_exp {
struct hdr_exp *next;