adding a double quote into a regsub in vcl_fetch

Paul A. Procacci pprocacci at
Wed Oct 16 01:44:54 CEST 2013

On Tue, Oct 15, 2013 at 07:16:45PM -0400, Stefan Caunter wrote:
> On Tue, Oct 15, 2013 at 7:03 PM, Paul A. Procacci
> <pprocacci at> wrote:
> > Yep,
> >
> > I see that now.  Didn't realize the parser was that picky.
> >
> > "
> >
> > Can you use the above in place of a double quote?
> >
> > I.E:
> >   set beresp.http.Link = regsub(req.url, "^/blah.*", "<>; rel="canonical" ");
> >
> it faithfully prints that out
> Link: <>; rel="canonical"

Instead of the back and forth, how about from the documenation:

"Given that we have never been able to come up with a valid need for any escaped characters apart from that, we decided that %22 for " and %25 for %, was much less suffering than doubling all backslashes in regexp/regsub contexts."


This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. Unless otherwise specified in a written agreement, this e-mail neither constitutes an agreement to conduct transactions by electronic means nor creates any legally binding contract or enforceable agreement.

More information about the varnish-misc mailing list