1

我为 esi:include 使用 AttributeModifier 创建的 URL 有问题。当 URL 在页面上呈现时,它会被编码。

WebMarkupContainer esiSrc = new WebMarkupContainer("esiSrc");
String esiUrl = "http://domain.tld/blah/that?param1=abc&param2=123";
esiSrc.add(new AttributeModifier("src", new Model<string>(esiUrl)));
esiSrc.setEscapeModelStrings(false);

add(esiSrc);

HTML: <esi:include wicket:id="esiSrc" ttl="12h" onerror="continue" />

渲染的输出是: <esi:include ttl="12h" onerror="continue" src="http://domain.tld/blah/that/?param1=abc&amp;param2=123" />

有什么建议么?

4

1 回答 1

0

根据https://www.varnish-cache.org/trac/ticket/413您正在寻找错误的解决方案。

于 2014-07-16T16:24:29.590 回答