On Tue, Oct 15, 2013 at 7:44 PM, Paul A. Procacci
<[email protected]> wrote:
> 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
>> <[email protected]> wrote:
>> > Yep,
>> >
>> > I see that now.  Didn't realize the parser was that picky.
>> >
>> > &quot;
>> >
>> > Can you use the above in place of a double quote?
>> >
>> > I.E:
>> >   set beresp.http.Link = regsub(req.url, "^/blah.*", 
>> > "<http://example.com/blah>; rel=&quot;canonical&quot; ");
>> >
>>
>> it faithfully prints that out
>>
>> Link: <http://example.com/blah>; rel=&quot;canonical&quot;
>
> Instead of the back and forth, how about from the documenation:
> (https://www.varnish-cache.org/trac/wiki/VCLSyntaxStrings)
>
> "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."
>

ah, from that page, the long string syntax works, i.e. {" payload
including "double quotes" "}

set beresp.http.Link = regsub(req.url, "^/blah.*",
{"<http://example.com/blah>; rel="canonical""});

thanks for getting me there

S

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to