Bug report
On ddtrace_format_tracestate, the code inject a separator ; without anything after when the zstr propagated_tags is valid but contains nothing.
if (propagated_tags) {
if (str.s) {
smart_str_appendc(&str, ';');
}
for (char *cur = ZSTR_VAL(propagated_tags), *end = cur + ZSTR_LEN(propagated_tags); cur < end; ++cur) {
...
}
}
Like on the following condition, the code should check for both the validity & size of the variable:
if (propagated_tags && ZSTR_LEN(propagated_tags) > 0)
This might cause unexpected behaviours when a php service communicates with other languages (for example with a java application, cf unhandled case on W3C parser from dd-trace-java)
PHP version
7.4
Tracer or profiler version
1.10.0
Installed extensions
No response
Output of phpinfo()
No response
Upgrading from
No response
Bug report
On ddtrace_format_tracestate, the code inject a separator
;without anything after when the zstrpropagated_tagsis valid but contains nothing.Like on the following condition, the code should check for both the validity & size of the variable:
if (propagated_tags && ZSTR_LEN(propagated_tags) > 0)This might cause unexpected behaviours when a php service communicates with other languages (for example with a java application, cf unhandled case on W3C parser from dd-trace-java)
PHP version
7.4
Tracer or profiler version
1.10.0
Installed extensions
No response
Output of
phpinfo()No response
Upgrading from
No response