r5719 - trunk/varnish-cache/bin/varnishd
phk at varnish-cache.org
phk at varnish-cache.org
Wed Jan 12 14:41:18 CET 2011
Author: phk
Date: 2011-01-12 14:41:16 +0100 (Wed, 12 Jan 2011)
New Revision: 5719
Modified:
trunk/varnish-cache/bin/varnishd/cache_esi_parse.c
Log:
Make the "not-xml" case work (e00000)
Modified: trunk/varnish-cache/bin/varnishd/cache_esi_parse.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_esi_parse.c 2011-01-12 13:37:11 UTC (rev 5718)
+++ trunk/varnish-cache/bin/varnishd/cache_esi_parse.c 2011-01-12 13:41:16 UTC (rev 5719)
@@ -241,6 +241,8 @@
else
vep->state = VEP_NOTXML;
}
+ } else if (vep->state == VEP_NOTXML) {
+ p = e;
} else if (vep->state == VEP_NEXTTAG) {
/*
* Hunt for start of next tag
@@ -406,13 +408,17 @@
CHECK_OBJ_NOTNULL(vep, VEP_MAGIC);
vsb_finish(vep->vsb);
- printf("ESI <%s>\n", vsb_data(vep->vsb));
+ if (vep->state != VEP_NOTXML) {
+ printf("ESI <%s>\n", vsb_data(vep->vsb));
- /* XXX: This is a huge waste of storage... */
- sp->obj->esidata = STV_alloc(sp, vsb_len(vep->vsb));
- AN(sp->obj->esidata);
- memcpy(sp->obj->esidata->ptr, vsb_data(vep->vsb), vsb_len(vep->vsb));
- sp->obj->esidata->len = vsb_len(vep->vsb);
+ /* XXX: This is a huge waste of storage... */
+ sp->obj->esidata = STV_alloc(sp, vsb_len(vep->vsb));
+ AN(sp->obj->esidata);
+ memcpy(sp->obj->esidata->ptr,
+ vsb_data(vep->vsb), vsb_len(vep->vsb));
+ sp->obj->esidata->len = vsb_len(vep->vsb);
+ }
+ vsb_delete(vep->vsb);
st = sp->wrk->storage;
sp->wrk->storage = NULL;
More information about the varnish-commit
mailing list