BUG/MINOR: sample: Set the correct type when a binary is converted to a string

A binary sample data can be converted, implicitly or not, to a string by cutting
the buffer on the first null byte.

I guess this patch should be backported to all stable versions.

(cherry picked from commit 472ad51edeb4bb5ea601d7e296b5d0a0cd1a140a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 5268c1ae82c8e95b83345991bc1fb76082fae69e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/sample.c b/src/sample.c
index 1bc0de9..5bd46f8 100644
--- a/src/sample.c
+++ b/src/sample.c
@@ -620,6 +620,7 @@
 			break;
 		}
 	}
+	smp->data.type = SMP_T_STR;
 	return 1;
 }