[master] c749a196a Dont combine VSB_QUOTE_JSON and VSB_QUOTE_CSTR, just emit the double quotes ourselves.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Mar 1 13:36:08 UTC 2021
commit c749a196a9a7c626b67fc517863edeee4d244984
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 1 13:02:38 2021 +0000
Dont combine VSB_QUOTE_JSON and VSB_QUOTE_CSTR, just emit the
double quotes ourselves.
diff --git a/bin/varnishd/mgt/mgt_param_tweak.c b/bin/varnishd/mgt/mgt_param_tweak.c
index b6d97797b..939b2a150 100644
--- a/bin/varnishd/mgt/mgt_param_tweak.c
+++ b/bin/varnishd/mgt/mgt_param_tweak.c
@@ -377,7 +377,9 @@ tweak_string(struct vsb *vsb, const struct parspec *par, const char *arg)
if (arg == NULL) {
VSB_quote(vsb, *p, -1, 0);
} else if (arg == JSON_FMT) {
- VSB_quote(vsb, *p, -1, VSB_QUOTE_JSON|VSB_QUOTE_CSTR);
+ VSB_putc(vsb, '"');
+ VSB_quote(vsb, *p, -1, VSB_QUOTE_JSON);
+ VSB_putc(vsb, '"');
} else {
REPLACE(*p, arg);
}
More information about the varnish-commit
mailing list