You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2014/01/21 00:07:58 UTC
[19/50] git commit: [TS-2489] add back comment
[TS-2489] add back comment
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/586469fc
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/586469fc
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/586469fc
Branch: refs/heads/5.0.x
Commit: 586469fc6389cfda4f3af1bfa47eb4fed099eb69
Parents: 793331a
Author: Yu Qing <zh...@taobao.com>
Authored: Sun Jan 12 00:15:42 2014 -0800
Committer: Kit Chan <ki...@apache.org>
Committed: Sun Jan 12 00:15:42 2014 -0800
----------------------------------------------------------------------
plugins/experimental/esi/lib/EsiProcessor.cc | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/586469fc/plugins/experimental/esi/lib/EsiProcessor.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/lib/EsiProcessor.cc b/plugins/experimental/esi/lib/EsiProcessor.cc
index 3ece0f4..77f13b0 100644
--- a/plugins/experimental/esi/lib/EsiProcessor.cc
+++ b/plugins/experimental/esi/lib/EsiProcessor.cc
@@ -720,6 +720,16 @@ EsiProcessor::_preprocess(DocNodeList &node_list, int &n_prescanned_nodes) {
_debugLog(_debug_tag, "[%s] handled try node successfully", __FUNCTION__);
break;
case DocNode::TYPE_HTML_COMMENT:
+ /**
+ * the html comment <!--esi innertext--> is a container.
+ * the esi processor will remove the starting tag "<!--esi" and the
+ * closure tag "-->", then keep the innertext (the content within it).
+ *
+ * we should call _handleHtmlComment when the node list is parsed
+ * from the content,
+ * but we should NOT call _handleHtmlComment again when the node list
+ * is unpacked from the cache because the node list has been parsed.
+ */
if (!_usePackedNodeList && !_handleHtmlComment(list_iter)) {
_errorLog("[%s] Failed to preprocess try node", __FUNCTION__);
return false;