Mailing List Archive

#1017: ESI includes not getting parsed due to faulty comments
#1017: ESI includes not getting parsed due to faulty comments
--------------------------+-------------------------------------------------
Reporter: ddunlop | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: 3.0.1 | Severity: normal
Keywords: esi, parsing |
--------------------------+-------------------------------------------------
When a document has invalid comments in it esi tags are missed.

for example: a comment such as this: <!--- --->

This was not the case prior to 3.0.0

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1017>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1017: ESI includes not getting parsed due to faulty comments [ In reply to ]
#1017: ESI includes not getting parsed due to faulty comments
-------------------------+--------------------------------------------------
Reporter: ddunlop | Type: defect
Status: closed | Priority: normal
Milestone: | Component: varnishd
Version: 3.0.1 | Severity: normal
Resolution: worksforme | Keywords: esi, parsing
-------------------------+--------------------------------------------------
Changes (by phk):

* status: new => closed
* resolution: => worksforme


Comment:

Sorry about not getting to this earlier.

I think Varnish behaves sensibly in this case, it sees the beginning of a
comment, and ignores everything up to the end of a comment.

The definition of a comment in XML is
{{{
Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
}}}
(See: http://www.w3.org/TR/REC-xml/#sec-comments)

Which specifically does not allow for a minus right before the "end of
comment" sequence, (which is what causes the trouble in the example you
show) so the comment never ends and Varnish does not process ESI inside
comments.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1017#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs