BUILD: fix declaration inside a scope block
diff --git a/src/proto_http.c b/src/proto_http.c
index af53dda..52efdf8 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -3956,13 +3956,13 @@
 
 	struct hdr_ctx ctx;
 
-	ctx.idx = 0;
-
 	char *hdr_name = be->server_id_hdr_name;
 	int hdr_name_len = be->server_id_hdr_len;
 
 	char *hdr_val;
 
+	ctx.idx = 0;
+
 	while (http_find_header2(hdr_name, hdr_name_len, msg->sol, &txn->hdr_idx, &ctx)) {
 		/* remove any existing values from the header */
 	        http_remove_header2(msg, buf, &txn->hdr_idx, &ctx);