BUG/MINOR: http-act: Use the good message to test strict rewritting mode

Since the strict rewritting mode was introduced, actions manipulating headers
(set/add/replace) always rely on the request message to test if the
HTTP_MSGF_SOFT_RW flag is set or not. But, of course, we must only rely on the
request for http-request rules. For http-response rules, we must use the
response message.

This patch must be backported if the strict rewritting is backported too.
diff --git a/src/http_act.c b/src/http_act.c
index 1632130..e1d9c96 100644
--- a/src/http_act.c
+++ b/src/http_act.c
@@ -1142,7 +1142,8 @@
 static enum act_return http_action_set_header(struct act_rule *rule, struct proxy *px,
 					      struct session *sess, struct stream *s, int flags)
 {
-	struct htx *htx = htxbuf((rule->from == ACT_F_HTTP_REQ) ? &s->req.buf : &s->res.buf);
+	struct http_msg *msg = ((rule->from == ACT_F_HTTP_REQ) ? &s->txn->req : &s->txn->rsp);
+	struct htx *htx = htxbuf(&msg->chn->buf);
 	enum act_return ret = ACT_RET_CONT;
 	struct buffer *replace;
 	struct http_hdr_ctx ctx;
@@ -1186,7 +1187,7 @@
 	if (objt_server(s->target))
 		_HA_ATOMIC_ADD(&__objt_server(s->target)->counters.failed_rewrites, 1);
 
-	if (!(s->txn->req.flags & HTTP_MSGF_SOFT_RW))
+	if (!(msg->flags & HTTP_MSGF_SOFT_RW))
 		ret = ACT_RET_ERR;
 	goto leave;
 }
@@ -1261,7 +1262,8 @@
 static enum act_return http_action_replace_header(struct act_rule *rule, struct proxy *px,
 						  struct session *sess, struct stream *s, int flags)
 {
-	struct htx *htx = htxbuf((rule->from == ACT_F_HTTP_REQ) ? &s->req.buf : &s->res.buf);
+	struct http_msg *msg = ((rule->from == ACT_F_HTTP_REQ) ? &s->txn->req : &s->txn->rsp);
+	struct htx *htx = htxbuf(&msg->chn->buf);
 	enum act_return ret = ACT_RET_CONT;
 	struct buffer *replace;
 	int r;
@@ -1295,7 +1297,7 @@
 	if (objt_server(s->target))
 		_HA_ATOMIC_ADD(&__objt_server(s->target)->counters.failed_rewrites, 1);
 
-	if (!(s->txn->req.flags & HTTP_MSGF_SOFT_RW))
+	if (!(msg->flags & HTTP_MSGF_SOFT_RW))
 		ret = ACT_RET_ERR;
 	goto leave;
 }