[MINOR] report haproxy's version by default on the stats page

For people who manage many haproxies, it is sometimes convenient
to be informed of their version. This patch adds this, with the
option to disable this report by specifying "stats hide-version".

Also, the feature may be permanently disabled by setting the
STATS_VERSION_STRING to "" (empty string), or the format can
simply be adjusted.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 43ed8aa..53c900a 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -1089,8 +1089,13 @@
 				Alert("parsing [%s:%d] : out of memory.\n", file, linenum);
 				return -1;
 			}
+		} else if (!strcmp(args[1], "hide-version")) {
+			if (!stats_set_flag(&curproxy->uri_auth, ST_HIDEVER)) {
+				Alert("parsing [%s:%d] : out of memory.\n", file, linenum);
+				return -1;
+			}
 		} else {
-			Alert("parsing [%s:%d] : unknown stats parameter '%s' (expects 'uri', 'realm', 'auth' or 'enable').\n",
+			Alert("parsing [%s:%d] : unknown stats parameter '%s' (expects 'hide-version', 'uri', 'realm', 'auth' or 'enable').\n",
 			      file, linenum, args[0]);
 			return -1;
 		}
diff --git a/src/proto_http.c b/src/proto_http.c
index 3cd97fe..c218e6b 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -3579,7 +3579,7 @@
 			 */
 		chunk_printf(&msg, sizeof(trash),
 			     "<body><h1><a href=\"" PRODUCT_URL "\" style=\"text-decoration: none;\">"
-			     PRODUCT_NAME "</a></h1>\n"
+			     PRODUCT_NAME "%s</a></h1>\n"
 			     "<h2>Statistics Report for pid %d</h2>\n"
 			     "<hr width=\"100%%\" class=\"hr\">\n"
 			     "<h3>&gt; General process information</h3>\n"
@@ -3607,6 +3607,7 @@
 			     "<td align=\"left\" valign=\"top\" nowrap width=\"1%%\">"
 			     "<b>Display option:</b><ul style=\"margin-top: 0.25em;\">"
 			     "",
+			     (s->be->uri_auth->flags&ST_HIDEVER)?"":(STATS_VERSION_STRING),
 			     pid, pid, global.nbproc,
 			     up / 86400, (up % 86400) / 3600,
 			     (up % 3600) / 60, (up % 60),
diff --git a/src/uri_auth.c b/src/uri_auth.c
index f5f90af..8ac618c 100644
--- a/src/uri_auth.c
+++ b/src/uri_auth.c
@@ -127,6 +127,19 @@
 }
 
 /*
+ * Returns a default uri_auth with the <flag> set.
+ * Uses the pointer provided if not NULL and not initialized.
+ */
+struct uri_auth *stats_set_flag(struct uri_auth **root, int flag)
+{
+	struct uri_auth *u;
+	
+	if ((u = stats_check_init_uri_auth(root)) != NULL)
+		u->flags |= flag;
+	return u;
+}
+
+/*
  * Returns a default uri_auth with a <user:passwd> entry added to the list of
  * authorized users. If a matching entry is found, no update will be performed.
  * Uses the pointer provided if not NULL and not initialized.