MINOR: pattern: Each pattern sets the expected input type
This is used later for increasing the compability with incoming
sample types. When multiple compatible types are supported, one
is arbitrarily used (eg: UINT).
diff --git a/src/proto_http.c b/src/proto_http.c
index 900f747..41561c5 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -8746,12 +8746,15 @@
pattern->val.i = meth;
if (meth == HTTP_METH_OTHER) {
pattern->ptr.str = strdup(*text);
+ pattern->expect_type = SMP_T_CSTR;
if (!pattern->ptr.str) {
memprintf(err, "out of memory while loading pattern");
return 0;
}
pattern->len = len;
}
+ else
+ pattern->expect_type = SMP_T_UINT;
return 1;
}