[MEDIUM] enable/disable servers from the stats web interface
Based on a patch provided by Judd Montgomery, it is now possible to
enable/disable servers from the stats web interface. This allows to select
several servers in a backend and apply the action to them at the same time.
Currently, there are 2 known limitations :
- The POST data are limited to one packet
(don't alter too many servers at a time).
- Expect: 100-continue is not supported.
(cherry picked from commit 7693948766cb5647ac03b48e782cfee2b1f14491)
diff --git a/include/proto/dumpstats.h b/include/proto/dumpstats.h
index 56d8abb..7038f46 100644
--- a/include/proto/dumpstats.h
+++ b/include/proto/dumpstats.h
@@ -53,6 +53,12 @@
#define STAT_CLI_O_ERR 7 /* dump errors */
#define STAT_CLI_O_TAB 8 /* dump tables */
+/* status codes (strictly 4 chars) used in the URL to display a message */
+#define STAT_STATUS_UNKN "UNKN" /* an unknown error occured, shouldn't happen */
+#define STAT_STATUS_DONE "DONE" /* the action is successful */
+#define STAT_STATUS_NONE "NONE" /* nothing happened (no action chosen or servers state didn't change) */
+#define STAT_STATUS_EXCD "EXCD" /* an error occured becayse the buffer couldn't store all data */
+
int stats_accept(struct session *s);
int stats_sock_parse_request(struct stream_interface *si, char *line);