vcl_error synthetic escape chars

Joe Williams joe at joetify.com
Fri Dec 4 00:23:57 CET 2009


I am attempting to write my own error message in vcl_error and am 
running into an issue with escaping out "{" and "}".

         synthetic {"\{"error":"not_found","reason":"missing"\}

This compiles and works but when I produce the error I get the slashes 
in the response:

root at ubuntu:~# curl http://localhost:6081/test/adsf
\{"error":"not_found","reason":"missing"\}

I searched around and didn't find anything, is it possible to escape out 
the curly braces and keep them from showing up in the response?

-Joe

-- 
Name: Joseph A. Williams
Email: joe at joetify.com
Blog: http://www.joeandmotorboat.com/




More information about the varnish-misc mailing list