BUG/MINOR: http-htx: Don't return error if authority is updated without changes

When an Host header is updated, the autority part, if any, is also updated to
keep the both syncrhonized. But, when the update is performed while there is no
change, a failure is reported while, in reality, no update is necessary. This
bug was introduced by the commit d7b7a1ce5 ("MEDIUM: http-htx: Keep the Host
header and the request start-line synchronized").

This commit was pushed in the 2.1. But on this version, the bug is hidden
because rewrite errors are silently ignored. And because it happens when there
is no change, if the rewrite fails, noone notices it. But since the 2.2, rewrite
errors are now fatals by default. So when the bug is hit, a 500 error is
returned to the client. Without this fix, a workaround is to disable the strict
rewriting mode (see the "strict-mode" HTTP rule).

The following HTTP rule is a good way to reproduce the bug if a request with an
authority is received. In HTT2, it is pretty common.

    acl host_header_exists req.hdr(host) -m found
    http-request set-header host %[req.hdr(host)] if host_header_exists

This patch must be backported to 2.1 and everywhere the commit d7b7a1ce5 is
backported. It should fix the issue #494.
diff --git a/src/http_htx.c b/src/http_htx.c
index f2f0a0c..f6e2243 100644
--- a/src/http_htx.c
+++ b/src/http_htx.c
@@ -584,9 +584,13 @@
 
 	uri = htx_sl_req_uri(sl);
 	authority = http_get_authority(uri, 1);
-	if (!authority.len || isteq(host, authority))
+	if (!authority.len)
 		return 0;
 
+	/* Don't update the uri if there is no change */
+	if (isteq(host, authority))
+		return 1;
+
 	/* Start by copying old method and version */
 	chunk_memcat(temp, HTX_SL_REQ_MPTR(sl), HTX_SL_REQ_MLEN(sl)); /* meth */
 	meth = ist2(temp->area, HTX_SL_REQ_MLEN(sl));