[master] c4d7754 Correctly quote backslash, even if it is the only thing that needs quoting in the string.
Poul-Henning Kamp
phk at varnish-cache.org
Mon May 16 15:21:25 CEST 2011
commit c4d7754730928c8fe66a206958de5a7b40b9a9ff
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon May 16 13:20:58 2011 +0000
Correctly quote backslash, even if it is the only thing that needs
quoting in the string.
Fixes #900
diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c
index d3f044d..ac0c608 100644
--- a/lib/libvarnish/vsb.c
+++ b/lib/libvarnish/vsb.c
@@ -534,7 +534,7 @@ vsb_quote(struct vsb *s, const char *p, int len, int how)
len = strlen(p);
for (q = p; q < p + len; q++) {
- if (!isgraph(*q) || *q == '"') {
+ if (!isgraph(*q) || *q == '"' || *q == '\\') {
quote++;
break;
}
More information about the varnish-commit
mailing list