Commit 0b06c851 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Replay of SVN r5764:

Retire the old ESI code.
parent a48f5ed3
......@@ -27,7 +27,6 @@ varnishd_SOURCES = \
cache_dir_round_robin.c \
cache_esi_parse.c \
cache_esi_deliver.c \
cache_esi.c \
cache_expire.c \
cache_fetch.c \
cache_gzip.c \
......
......@@ -35,8 +35,6 @@
*/
#define VARNISH_CACHE_CHILD 1
#undef OLD_ESI
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/socket.h>
......@@ -94,9 +92,6 @@ struct objhead;
struct objcore;
struct storage;
struct workreq;
#ifdef OLD_ESI
struct esidata;
#endif
struct vrt_backend;
struct cli_proto;
struct ban;
......@@ -444,11 +439,7 @@ struct object {
VTAILQ_HEAD(, storage) store;
#ifdef OLD_ESI
struct esidata *esidata;
#else
struct storage *esidata;
#endif
double last_use;
......@@ -807,16 +798,7 @@ void VCL_Poll(void);
char *VRT_String(struct ws *ws, const char *h, const char *p, va_list ap);
char *VRT_StringList(char *d, unsigned dl, const char *p, va_list ap);
#ifdef OLD_ESI
/* cache_vrt_esi.c */
void ESI_Deliver(struct sess *);
void ESI_Destroy(struct object *);
void ESI_Parse(struct sess *);
#else
void ESI_Deliver(struct sess *);
#endif /* OLD_ESI */
void ESI_Include(struct sess *sp, const char *src, const char *host);
/* cache_vrt_vmod.c */
void VMOD_Init(void);
......
......@@ -587,11 +587,9 @@ cnt_fetch(struct sess *sp)
AZ(sp->wrk->vfp);
/* XXX: precedence, also: do_esi */
#ifndef OLD_ESI
if (sp->wrk->do_esi) {
sp->wrk->vfp = &vfp_esi;
} else
#endif
if (sp->wrk->do_gunzip &&
http_HdrIs(sp->wrk->beresp, H_Content_Encoding, "gzip")) {
http_Unset(sp->wrk->beresp, H_Content_Encoding);
......@@ -677,11 +675,6 @@ cnt_fetch(struct sess *sp)
return (0);
}
#ifdef OLD_ESI
if (sp->wrk->do_esi)
ESI_Parse(sp);
#endif
switch (sp->handling) {
case VCL_RET_RESTART:
HSH_Drop(sp);
......
This diff is collapsed.
......@@ -44,7 +44,7 @@ SVNID("$Id")
/*--------------------------------------------------------------------*/
void
static void
ESI_Include(struct sess *sp, const char *src, const char *host)
{
struct object *obj;
......@@ -120,7 +120,6 @@ ESI_Include(struct sess *sp, const char *src, const char *host)
/*--------------------------------------------------------------------*/
#ifndef OLD_ESI
//#define Debug(fmt, ...) printf(fmt, __VA_ARGS__)
#define Debug(fmt, ...) /**/
......@@ -233,4 +232,3 @@ ESI_Deliver(struct sess *sp)
(void)WRW_Flush(sp->wrk);
}
#endif /* OLD_ESI */
......@@ -42,8 +42,6 @@ SVNID("$Id")
#include "zlib.h"
#include "stevedore.h"
#ifndef OLD_ESI
//#define Debug(fmt, ...) printf(fmt, __VA_ARGS__)
#define Debug(fmt, ...) /**/
......@@ -1098,8 +1096,6 @@ struct vfp vfp_esi = {
.end = vfp_esi_end,
};
#endif /* OLD_ESI */
#if 0
digraph xml {
......
......@@ -693,15 +693,10 @@ HSH_Deref(struct worker *w, struct objcore *oc, struct object **oo)
DSL(0x40, SLT_Debug, 0, "Object %u workspace min free %u",
o->xid, WS_Free(o->ws_o));
#ifdef OLD_ESI
if (o->esidata != NULL)
ESI_Destroy(o);
#else
if (o->esidata != NULL) {
STV_free(o->esidata);
o->esidata = NULL;
}
#endif
if (oc != NULL)
oc_freeobj(oc);
w->stats.n_object--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment