Commit 6bec2c83 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix a buglet in handling non-ascii strings in VCL, now that we (I)

have decided what the strategy is going to be for synthetic in
the future.

Fixes	#545
parent 84f098e0
varnishtest "High-bit chars"
server s1 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
sub vcl_deliver {
set resp.http.foo = "";
}
} -start
client c1 {
txreq
rxresp
expect resp.http.foo == ""
} -run
......@@ -229,7 +229,7 @@ EncString(struct vsb *sb, const char *b, const char *e, int mode)
if (isgraph(*b))
VSB_printf(sb, "%c", *b);
else
VSB_printf(sb, "\\%03o", *b);
VSB_printf(sb, "\\%03o", (uint8_t)*b);
break;
}
}
......@@ -241,7 +241,7 @@ EncToken(struct vsb *sb, const struct token *t)
{
assert(t->tok == CSTR);
EncString(sb, t->dec, NULL, 0);
EncString(sb, t->dec, NULL, 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