Adjust to Varnish-Cache

now empty strands are no longer empty strands, but rather strands with a
single empty element.

b77b709510f1e1ff4792ac9bc9c3836d1a5249ec maybe?
parent c72b1de8
......@@ -389,7 +389,7 @@ vmod_array(VRT_CTX, VCL_STRANDS s)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
AN(s);
if (s->n == 0)
if (s->n == 0 || s->n == 1 && *s->p[0] == '\0' && !is_J(s->p[0]))
return ((const char *)jnil_array + 1);
for (i = 0; i < s->n; i++) {
......@@ -460,7 +460,7 @@ vmod_object(VRT_CTX, VCL_STRANDS s)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
AN(s);
if (s->n == 0)
if (s->n == 0 || s->n == 1 && *s->p[0] == '\0' && !is_J(s->p[0]))
return ((const char *)jnil_object + 1);
if (s->n & 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment