From des at projects.linpro.no Tue May 1 17:48:56 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 1 May 2007 19:48:56 +0200 (CEST) Subject: r1370 - trunk/varnish-cache/include Message-ID: <20070501174856.A96891EC3B9@projects.linpro.no> Author: des Date: 2007-05-01 19:48:56 +0200 (Tue, 01 May 2007) New Revision: 1370 Modified: trunk/varnish-cache/include/shmlog.h Log: Add protective #ifdef. Modified: trunk/varnish-cache/include/shmlog.h =================================================================== --- trunk/varnish-cache/include/shmlog.h 2007-04-26 10:39:19 UTC (rev 1369) +++ trunk/varnish-cache/include/shmlog.h 2007-05-01 17:48:56 UTC (rev 1370) @@ -33,6 +33,9 @@ * NB: THIS IS NOT A PUBLIC API TO VARNISH! */ +#ifndef SHMLOG_H_INCLUDED +#define SHMLOG_H_INCLUDED + #define SHMLOG_FILENAME "/tmp/_.vsl" #include @@ -82,3 +85,5 @@ #undef SLTM SLT_WRAPMARKER = 255 }; + +#endif From des at projects.linpro.no Tue May 1 17:55:13 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 1 May 2007 19:55:13 +0200 (CEST) Subject: r1371 - trunk/varnish-cache/bin/varnishd Message-ID: <20070501175513.8E1D11EC6CB@projects.linpro.no> Author: des Date: 2007-05-01 19:55:13 +0200 (Tue, 01 May 2007) New Revision: 1371 Modified: trunk/varnish-cache/bin/varnishd/cache_http.c Log: Improve the readability and debuggability of our tag conversion tricks. Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-01 17:48:56 UTC (rev 1370) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-01 17:55:13 UTC (rev 1371) @@ -77,7 +77,7 @@ }; static enum shmlogtag -T(struct http *hp, enum httptag t) +http2shmlog(struct http *hp, enum httptag t) { CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); @@ -86,9 +86,13 @@ return (logmtx[hp->logtag][t]); } -#define WSLH(wx, ax, bx, cx, dx) \ - WSLR(wx, T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e); +static void +WSLH(struct worker *w, enum httptag t, unsigned xid, struct http *hp, int hdr) +{ + WSLR(w, http2shmlog(hp, t), xid, hp->hd[hdr].b, hp->hd[hdr].e); +} + /*--------------------------------------------------------------------*/ void @@ -372,7 +376,7 @@ hp->nhd++; } else { VSL_stats->losthdr++; - WSLR(w, T(hp, HTTP_T_LostHeader), fd, p, q); + WSLR(w, http2shmlog(hp, HTTP_T_LostHeader), fd, p, q); } } assert(hp->t <= hp->v); @@ -803,7 +807,7 @@ CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); if (to->nhd >= HTTP_HDR_MAX) { VSL_stats->losthdr++; - WSL(w, T(to, HTTP_T_LostHeader), fd, "%s", hdr); + WSL(w, http2shmlog(to, HTTP_T_LostHeader), fd, "%s", hdr); return; } http_seth(w, fd, to, to->nhd++, HTTP_T_Header, hdr); @@ -823,7 +827,7 @@ n = vsnprintf(to->f, l, fmt, ap); if (n + 1 > l || to->nhd >= HTTP_HDR_MAX) { VSL_stats->losthdr++; - WSL(w, T(to, HTTP_T_LostHeader), fd, "%s", to->f); + WSL(w, http2shmlog(to, HTTP_T_LostHeader), fd, "%s", to->f); } else { assert(to->f < to->e); to->hd[to->nhd].b = to->f; From des at projects.linpro.no Tue May 1 17:55:31 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 1 May 2007 19:55:31 +0200 (CEST) Subject: r1372 - in trunk/varnish-cache: bin/varnishhist bin/varnishlog bin/varnishncsa include lib/libvarnishapi Message-ID: <20070501175531.D4A371EC6DB@projects.linpro.no> Author: des Date: 2007-05-01 19:55:31 +0200 (Tue, 01 May 2007) New Revision: 1372 Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishncsa/varnishncsa.c trunk/varnish-cache/include/varnishapi.h trunk/varnish-cache/lib/libvarnishapi/shmlog.c Log: Two minor logging fixes: - change the type of vsl_handler()'s tag argument from unsigned int to enum shmlogtag to allow gcc to check switch statements and gdb to show its value by name rather than by number. - fix the "missing newline after VCL_call" bug in varnishlog (#95) Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2007-05-01 17:55:13 UTC (rev 1371) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2007-05-01 17:55:31 UTC (rev 1372) @@ -112,7 +112,7 @@ } static int -h_hist(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) +h_hist(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { double b; int i, j; Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-01 17:55:13 UTC (rev 1371) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-01 17:55:31 UTC (rev 1372) @@ -94,7 +94,7 @@ } static int -h_order(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) +h_order(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { (void)priv; @@ -114,7 +114,7 @@ switch (tag) { case SLT_VCL_call: flg[fd] |= F_INVCL; - vsb_printf(ob[fd], "%5d %-12s %c %.*s", + vsb_printf(ob[fd], "%5d %-12s %c %.*s\n", fd, VSL_tags[tag], ((spec & VSL_S_CLIENT) ? 'c' : \ (spec & VSL_S_BACKEND) ? 'b' : '-'), Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-01 17:55:13 UTC (rev 1371) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-01 17:55:31 UTC (rev 1372) @@ -164,7 +164,7 @@ } static int -h_ncsa(void *priv, unsigned tag, unsigned fd, +h_ncsa(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { const char *end, *next; Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2007-05-01 17:55:13 UTC (rev 1371) +++ trunk/varnish-cache/include/varnishapi.h 2007-05-01 17:55:31 UTC (rev 1372) @@ -32,6 +32,8 @@ #ifndef VARNISHAPI_H_INCLUDED #define VARNISHAPI_H_INCLUDED +#include "shmlog.h" + #define V_DEAD __attribute__ ((noreturn)) /* base64.c */ @@ -39,7 +41,7 @@ int base64_decode(char *d, unsigned dlen, const char *s); /* shmlog.c */ -typedef int vsl_handler(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr); +typedef int vsl_handler(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr); #define VSL_S_CLIENT (1 << 0) #define VSL_S_BACKEND (1 << 1) #define VSL_ARGS "bCcdI:i:r:X:x:" Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2007-05-01 17:55:13 UTC (rev 1371) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2007-05-01 17:55:31 UTC (rev 1372) @@ -326,7 +326,7 @@ /*--------------------------------------------------------------------*/ int -VSL_H_Print(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) +VSL_H_Print(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { FILE *fo = priv; From des at projects.linpro.no Tue May 1 18:21:53 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 1 May 2007 20:21:53 +0200 (CEST) Subject: r1373 - trunk/varnish-cache/bin/varnishd Message-ID: <20070501182153.523F41EC6CB@projects.linpro.no> Author: des Date: 2007-05-01 20:21:53 +0200 (Tue, 01 May 2007) New Revision: 1373 Modified: trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/varnishd.1 Log: Add and document a ping_interval parameter which controls the interval at which the parent pings the child. Also document pipe_timeout, which was left out of the man page by accident. Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2007-05-01 17:55:31 UTC (rev 1372) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2007-05-01 18:21:53 UTC (rev 1373) @@ -111,6 +111,9 @@ /* HTTP proto behaviour */ unsigned backend_http11; unsigned client_http11; + + /* Ping interval */ + unsigned ping_interval; }; extern volatile struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2007-05-01 17:55:31 UTC (rev 1372) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2007-05-01 18:21:53 UTC (rev 1373) @@ -214,13 +214,15 @@ ev_listen = e; AZ(ev_poker); - e = ev_new(); - XXXAN(e); - e->timeout = 3.0; - e->callback = child_poker; - e->name = "child poker"; - AZ(ev_add(mgt_evb, e)); - ev_poker = e; + if (params->ping_interval > 0) { + e = ev_new(); + XXXAN(e); + e->timeout = params->ping_interval; + e->callback = child_poker; + e->name = "child poker"; + AZ(ev_add(mgt_evb, e)); + ev_poker = e; + } mgt_cli_start_child(heritage.fds[0], heritage.fds[3]); AZ(close(heritage.fds[1])); Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-01 17:55:31 UTC (rev 1372) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-01 18:21:53 UTC (rev 1373) @@ -407,6 +407,15 @@ /*--------------------------------------------------------------------*/ +static void +tweak_ping_interval(struct cli *cli, struct parspec *par, const char *arg) +{ + (void)par; + tweak_generic_uint(cli, ¶ms->ping_interval, arg, 0, UINT_MAX); +} + +/*--------------------------------------------------------------------*/ + /* * Make sure to end all lines with either a space or newline of the * formatting will go haywire. @@ -566,6 +575,12 @@ "backend response." EXPERIMENTAL, "off", "bool" }, + { "ping_interval", tweak_ping_interval, + "Interval between pings from parent to child.\n" + "Zero will disable pinging entirely, which makes " + "it possible to attach a debugger to the child.\n" + MUST_RESTART, + "3", "seconds" }, { NULL, NULL, NULL } }; Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-01 17:55:31 UTC (rev 1372) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-01 18:21:53 UTC (rev 1373) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd October 6, 2006 +.Dd May 1, 2007 .Dt VARNISHD 1 .Os .Sh NAME @@ -351,7 +351,15 @@ will start dropping new connections. .Pp The default is 100%. +.It Va ping_interval +The interval at which the parent process will ping the child process +to ascertain that it is still present and functioning. +.Pp +The default is 3 seconds. .It Va pipe_timeout +The time to wait before dropping an idle pipe mode connection. +.Pp +The default is 60 seconds. .It Va sendfile_threshold The size threshold beyond which documents are sent to the client using .Xr sendfile 2 From des at projects.linpro.no Wed May 2 12:20:43 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 2 May 2007 14:20:43 +0200 (CEST) Subject: r1374 - trunk/varnish-cache/bin/varnishlog Message-ID: <20070502122043.DCAEE1EC41D@projects.linpro.no> Author: des Date: 2007-05-02 14:20:43 +0200 (Wed, 02 May 2007) New Revision: 1374 Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c Log: Try fixing #95 again. The trick is that if we get a new SLT_VCL_call while the F_INVCL flag is set, we need to insert a newline before the entry for the new VCL_call. Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-01 18:21:53 UTC (rev 1373) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-02 12:20:43 UTC (rev 1374) @@ -113,8 +113,11 @@ flg[fd] |= F_MATCH; switch (tag) { case SLT_VCL_call: - flg[fd] |= F_INVCL; - vsb_printf(ob[fd], "%5d %-12s %c %.*s\n", + if (flg[fd] & F_INVCL) + vsb_cat(ob[fd], "\n"); + else + flg[fd] |= F_INVCL; + vsb_printf(ob[fd], "%5d %-12s %c %.*s", fd, VSL_tags[tag], ((spec & VSL_S_CLIENT) ? 'c' : \ (spec & VSL_S_BACKEND) ? 'b' : '-'), From des at projects.linpro.no Wed May 2 13:56:25 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 2 May 2007 15:56:25 +0200 (CEST) Subject: r1375 - trunk/varnish-cache/bin/varnishd Message-ID: <20070502135625.14E291EC6E8@projects.linpro.no> Author: des Date: 2007-05-02 15:56:24 +0200 (Wed, 02 May 2007) New Revision: 1375 Modified: trunk/varnish-cache/bin/varnishd/cache_response.c Log: Correct the URL in the error page. Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-02 12:20:43 UTC (rev 1374) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-02 13:56:24 UTC (rev 1375) @@ -148,7 +148,7 @@ vsb_printf(sb, "

Guru Meditation:

\r\n", expl); vsb_printf(sb, "

XID: %u

\r\n", sp->xid); vsb_cat(sb, - " Varnish\r\n" + " Varnish\r\n" " \r\n" "\r\n"); vsb_finish(sb); From des at projects.linpro.no Wed May 2 14:37:42 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 2 May 2007 16:37:42 +0200 (CEST) Subject: r1376 - trunk/varnish-cache/bin/varnishd Message-ID: <20070502143742.2B5F71EC6E9@projects.linpro.no> Author: des Date: 2007-05-02 16:37:42 +0200 (Wed, 02 May 2007) New Revision: 1376 Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c Log: Don't try to lock the objhead mutex if we don't have an objhead. Doing so caused the Varnish child to die immediately after sending its 503 response if the backend didn't respond. Reviewed by: phk Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2007-05-02 13:56:24 UTC (rev 1375) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2007-05-02 14:37:42 UTC (rev 1376) @@ -185,6 +185,7 @@ void HSH_Unbusy(struct object *o) { + struct objhead *oh; struct sess *sp; CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC); @@ -192,9 +193,14 @@ assert(o->refcnt > 0); if (o->cacheable) EXP_Insert(o); - LOCK(&o->objhead->mtx); + oh = o->objhead; + if (oh != NULL) { + CHECK_OBJ(oh, OBJHEAD_MAGIC); + LOCK(&oh->mtx); + } o->busy = 0; - UNLOCK(&o->objhead->mtx); + if (oh != NULL) + UNLOCK(&oh->mtx); while (1) { sp = TAILQ_FIRST(&o->waitinglist); if (sp == NULL) From des at projects.linpro.no Thu May 3 08:41:02 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 3 May 2007 10:41:02 +0200 (CEST) Subject: r1377 - trunk/varnish-cache/bin/varnishd Message-ID: <20070503084102.34AF51EC6DC@projects.linpro.no> Author: des Date: 2007-05-03 10:41:01 +0200 (Thu, 03 May 2007) New Revision: 1377 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_response.c Log: s/expl/reason/ to circumvent a bug in gcc 3. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-02 14:37:42 UTC (rev 1376) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-03 08:41:01 UTC (rev 1377) @@ -428,7 +428,7 @@ #endif /* cache_response.c */ -void RES_Error(struct sess *sp, int code, const char *expl); +void RES_Error(struct sess *sp, int code, const char *reason); void RES_WriteObj(struct sess *sp); /* cache_vcl.c */ Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-02 14:37:42 UTC (rev 1376) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-03 08:41:01 UTC (rev 1377) @@ -48,7 +48,7 @@ static struct http_msg { unsigned nbr; const char *txt; - const char *expl; + const char *reason; } http_msg[] = { { 101, "Switching Protocols" }, { 200, "OK" }, @@ -96,7 +96,7 @@ /*--------------------------------------------------------------------*/ void -RES_Error(struct sess *sp, int code, const char *expl) +RES_Error(struct sess *sp, int code, const char *reason) { char buf[40]; struct vsb *sb; @@ -115,13 +115,13 @@ if (mp->nbr > code) break; msg = mp->txt; - if (expl == NULL) - expl = mp->expl; + if (reason == NULL) + reason = mp->reason; break; } - if (expl == NULL) - expl = msg; - AN(expl); + if (reason == NULL) + reason = msg; + AN(reason); AN(msg); sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); @@ -144,8 +144,8 @@ " \r\n" " \r\n"); vsb_printf(sb, "

Error %03d %s

\r\n", code, msg); - vsb_printf(sb, "

%s

\r\n", expl); - vsb_printf(sb, "

Guru Meditation:

\r\n", expl); + vsb_printf(sb, "

%s

\r\n", reason); + vsb_printf(sb, "

Guru Meditation:

\r\n", reason); vsb_printf(sb, "

XID: %u

\r\n", sp->xid); vsb_cat(sb, " Varnish\r\n" @@ -158,7 +158,7 @@ WSL(sp->wrk, SLT_TxStatus, sp->id, "%d", code); WSL(sp->wrk, SLT_TxProtocol, sp->id, "HTTP/1.1"); WSL(sp->wrk, SLT_TxResponse, sp->id, msg); - vca_close_session(sp, expl); + vca_close_session(sp, reason); vsb_delete(sb); } From des at projects.linpro.no Thu May 3 08:45:34 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 3 May 2007 10:45:34 +0200 (CEST) Subject: r1378 - trunk/varnish-cache/bin/varnishd Message-ID: <20070503084534.0F8481EC6DC@projects.linpro.no> Author: des Date: 2007-05-03 10:45:33 +0200 (Thu, 03 May 2007) New Revision: 1378 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_vrt.c Log: s/expl/reason/ to circumvent a bug in gcc 3. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-03 08:41:01 UTC (rev 1377) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-03 08:45:33 UTC (rev 1378) @@ -275,7 +275,7 @@ unsigned handling; unsigned char wantbody; int err_code; - const char *err_expl; + const char *err_reason; TAILQ_ENTRY(sess) list; Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-03 08:41:01 UTC (rev 1377) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-03 08:45:33 UTC (rev 1378) @@ -247,9 +247,9 @@ cnt_error(struct sess *sp) { - RES_Error(sp, sp->err_code, sp->err_expl); + RES_Error(sp, sp->err_code, sp->err_reason); sp->err_code = 0; - sp->err_expl = NULL; + sp->err_reason = NULL; sp->step = STP_DONE; return (0); } Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-03 08:41:01 UTC (rev 1377) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-03 08:45:33 UTC (rev 1378) @@ -47,13 +47,13 @@ /*--------------------------------------------------------------------*/ void -VRT_error(struct sess *sp, unsigned code, const char *expl) +VRT_error(struct sess *sp, unsigned code, const char *reason) { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - WSL(sp->wrk, SLT_Debug, 0, "VCL_error(%u, %s)", code, expl); + WSL(sp->wrk, SLT_Debug, 0, "VCL_error(%u, %s)", code, reason); sp->err_code = code; - sp->err_expl = expl; + sp->err_reason = reason; } /*--------------------------------------------------------------------*/ From des at projects.linpro.no Thu May 3 08:48:43 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 3 May 2007 10:48:43 +0200 (CEST) Subject: r1379 - trunk/varnish-cache/bin/varnishd Message-ID: <20070503084843.6D40C1EC6CC@projects.linpro.no> Author: des Date: 2007-05-03 10:48:43 +0200 (Thu, 03 May 2007) New Revision: 1379 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: s/expl/reason/ to circumvent a bug in gcc 3. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2007-05-03 08:45:33 UTC (rev 1378) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2007-05-03 08:48:43 UTC (rev 1379) @@ -119,7 +119,7 @@ uintmax_t l; unsigned bs; char suff[2]; - int i, expl; + int i, explicit; off_t o; struct stat st; @@ -140,7 +140,7 @@ i = sscanf(size, "%ju%1s", &l, suff); /* can return -1, 0, 1 or 2 */ - expl = i; + explicit = i; if (i == 0) { fprintf(stderr, "Error: (-sfile) size \"%s\" not understood\n", size); @@ -215,7 +215,7 @@ exit (2); } - if (expl < 3 && sizeof(void *) == 4 && l > INT32_MAX) { + if (explicit < 3 && sizeof(void *) == 4 && l > INT32_MAX) { fprintf(stderr, "NB: Limiting size to 2GB on 32 bit architecture to" " prevent running out of\naddress space." From des at projects.linpro.no Thu May 3 08:48:51 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 3 May 2007 10:48:51 +0200 (CEST) Subject: r1380 - trunk/varnish-cache/bin/varnishd Message-ID: <20070503084851.AE1501EC6E5@projects.linpro.no> Author: des Date: 2007-05-03 10:48:51 +0200 (Thu, 03 May 2007) New Revision: 1380 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: s/expl/explicit/ to circumvent a bug in gcc 3. Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-03 08:48:43 UTC (rev 1379) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-03 08:48:51 UTC (rev 1380) @@ -50,7 +50,7 @@ struct parspec { const char *name; tweak_t *func; - const char *expl; + const char *descr; const char *def; const char *units; }; @@ -617,7 +617,7 @@ if (av[2] != NULL) { cli_out(cli, "%-20s Default is %s\n", "", pp->def); /* Format text to 72 col width */ - for (p = pp->expl; *p != '\0'; ) { + for (p = pp->descr; *p != '\0'; ) { q = strchr(p, '\n'); if (q == NULL) q = strchr(p, '\0'); From phk at projects.linpro.no Fri May 4 12:25:23 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 4 May 2007 14:25:23 +0200 (CEST) Subject: r1381 - trunk/varnish-cache/bin/varnishd Message-ID: <20070504122523.5F2E11EC6DC@projects.linpro.no> Author: phk Date: 2007-05-04 14:25:23 +0200 (Fri, 04 May 2007) New Revision: 1381 Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c Log: Fix error reporting with -C Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-03 08:48:51 UTC (rev 1380) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-04 12:25:23 UTC (rev 1381) @@ -314,15 +314,15 @@ AN(buf); if (C_flag) { csrc = VCC_Compile(sb, buf, NULL); - fputs(csrc, stdout); - return (0); + if (csrc != NULL) + fputs(csrc, stdout); } vf = mgt_VccCompile(sb, buf, NULL); free(buf); } else if (C_flag) { csrc = VCC_CompileFile(sb, f_arg); - fputs(csrc, stdout); - return (0); + if (csrc != NULL) + fputs(csrc, stdout); } else { vf = mgt_VccCompileFile(sb, f_arg); } @@ -333,6 +333,8 @@ return (1); } vsb_delete(sb); + if (C_flag) + return (0); vp = mgt_vcc_add("boot", vf); vp->active = 1; return (0); From des at projects.linpro.no Fri May 4 12:28:56 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 4 May 2007 14:28:56 +0200 (CEST) Subject: r1382 - trunk/varnish-cache/bin/varnishd Message-ID: <20070504122856.43CD01EC6A7@projects.linpro.no> Author: des Date: 2007-05-04 14:28:56 +0200 (Fri, 04 May 2007) New Revision: 1382 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c Log: Apply the workaround suggested in #102. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-04 12:25:23 UTC (rev 1381) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-04 12:28:56 UTC (rev 1382) @@ -657,7 +657,8 @@ VCL_recv_method(sp); - sp->wantbody = !strcmp(sp->http->hd[HTTP_HDR_REQ].b, "GET"); + sp->wantbody = (!strcmp(sp->http->hd[HTTP_HDR_REQ].b, "GET") || + !strcmp(sp->http->hd[HTTP_HDR_REQ].b, "POST")); switch(sp->handling) { case VCL_RET_LOOKUP: /* XXX: discard req body, if any */ From des at projects.linpro.no Sat May 5 14:08:01 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 5 May 2007 16:08:01 +0200 (CEST) Subject: r1383 - trunk/varnish-cache/bin/varnishd Message-ID: <20070505140801.89F3A1EC6DB@projects.linpro.no> Author: des Date: 2007-05-05 16:08:01 +0200 (Sat, 05 May 2007) New Revision: 1383 Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c Log: Whitespace nits Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2007-05-04 12:28:56 UTC (rev 1382) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2007-05-05 14:08:01 UTC (rev 1383) @@ -121,7 +121,7 @@ * * The canonical way to do that is to do a blocking * read(2) of one char, then change to nonblocking, - * read as many as we find, then change back to + * read as many as we find, then change back to * blocking reads again. * * Hardly much more efficient and certainly a good @@ -311,13 +311,13 @@ /* XXX: cleanup */ return (1); } + CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); sp->obj->entered = time(NULL); - assert(sp->obj->busy != 0); if (http_GetHdr(vc->http, H_Last_Modified, &b)) From des at projects.linpro.no Sat May 5 14:09:23 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 5 May 2007 16:09:23 +0200 (CEST) Subject: r1384 - trunk/varnish-cache/bin/varnishd Message-ID: <20070505140923.3699A1EC6A4@projects.linpro.no> Author: des Date: 2007-05-05 16:09:23 +0200 (Sat, 05 May 2007) New Revision: 1384 Modified: trunk/varnish-cache/bin/varnishd/cache_response.c Log: Typo in comment Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-05 14:08:01 UTC (rev 1383) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-05 14:09:23 UTC (rev 1384) @@ -255,7 +255,7 @@ sp->wrk->acct.bodybytes += st->len; #ifdef HAVE_SENDFILE /* - * XXX: the overhead of setting up senddile is not + * XXX: the overhead of setting up sendfile is not * XXX: epsilon and maybe not even delta, so avoid * XXX: engaging sendfile for small objects. * XXX: Should use getpagesize() ? From des at projects.linpro.no Sat May 5 14:35:58 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 5 May 2007 16:35:58 +0200 (CEST) Subject: r1385 - trunk/varnish-cache/bin/varnishd Message-ID: <20070505143558.EB9A31EC6E5@projects.linpro.no> Author: des Date: 2007-05-05 16:35:58 +0200 (Sat, 05 May 2007) New Revision: 1385 Modified: trunk/varnish-cache/bin/varnishd/cache_response.c Log: Remove superfluous vsb_printf() argument Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-05 14:09:23 UTC (rev 1384) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-05 14:35:58 UTC (rev 1385) @@ -145,7 +145,7 @@ " \r\n"); vsb_printf(sb, "

Error %03d %s

\r\n", code, msg); vsb_printf(sb, "

%s

\r\n", reason); - vsb_printf(sb, "

Guru Meditation:

\r\n", reason); + vsb_printf(sb, "

Guru Meditation:

\r\n"); vsb_printf(sb, "

XID: %u

\r\n", sp->xid); vsb_cat(sb, " Varnish\r\n" From des at projects.linpro.no Sat May 5 14:44:37 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 5 May 2007 16:44:37 +0200 (CEST) Subject: r1386 - trunk/varnish-cache/bin/varnishd Message-ID: <20070505144437.8F62B1EC6A4@projects.linpro.no> Author: des Date: 2007-05-05 16:44:37 +0200 (Sat, 05 May 2007) New Revision: 1386 Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c Log: Look for s-maxage before max-age. This may need to be revisited. Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c =================================================================== --- trunk/varnish-cache/bin/varnishd/rfc2616.c 2007-05-05 14:35:58 UTC (rev 1385) +++ trunk/varnish-cache/bin/varnishd/rfc2616.c 2007-05-05 14:44:37 UTC (rev 1386) @@ -109,7 +109,8 @@ retirement_age = INT_MAX; u1 = u2 = 0; - if (http_GetHdrField(hp, H_Cache_Control, "max-age", &p)) { + if (http_GetHdrField(hp, H_Cache_Control, "s-maxage", &p) || + http_GetHdrField(hp, H_Cache_Control, "max-age", &p)) { u1 = strtoul(p, NULL, 0); u2 = 0; if (http_GetHdr(hp, H_Age, &p)) { From des at projects.linpro.no Sun May 6 18:57:26 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sun, 6 May 2007 20:57:26 +0200 (CEST) Subject: r1387 - trunk/varnish-cache/man Message-ID: <20070506185726.A90EE1EC529@projects.linpro.no> Author: des Date: 2007-05-06 20:57:26 +0200 (Sun, 06 May 2007) New Revision: 1387 Modified: trunk/varnish-cache/man/vcl.7 Log: Update the default configuration. Modified: trunk/varnish-cache/man/vcl.7 =================================================================== --- trunk/varnish-cache/man/vcl.7 2007-05-05 14:44:37 UTC (rev 1386) +++ trunk/varnish-cache/man/vcl.7 2007-05-06 18:57:26 UTC (rev 1387) @@ -400,17 +400,17 @@ error; } if (!obj.cacheable) { - insert_pass; + pass; } if (resp.http.Set-Cookie) { - insert_pass; + pass; } insert; } sub vcl_timeout { discard; -}; +} .Ed .Pp The following example shows how to support multiple sites running on From phk at projects.linpro.no Wed May 9 07:59:22 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 09:59:22 +0200 (CEST) Subject: r1388 - trunk/varnish-cache/lib/libvcl Message-ID: <20070509075922.940B21EC400@projects.linpro.no> Author: phk Date: 2007-05-09 09:59:22 +0200 (Wed, 09 May 2007) New Revision: 1388 Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c trunk/varnish-cache/lib/libvcl/vcc_compile.h Log: Sanitize generation of white-space in generated C code. (It is my intent that the compiled-to C-source should have sensible readability) Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-06 18:57:26 UTC (rev 1387) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-09 07:59:22 UTC (rev 1388) @@ -134,7 +134,7 @@ va_list ap; if (indent) - vsb_printf(tl->fh, "%*.*s", tl->indent, tl->indent, ""); + vsb_printf(tl->fh, "%*.*s", tl->hindent, tl->hindent, ""); va_start(ap, fmt); vsb_vprintf(tl->fh, fmt, ap); va_end(ap); @@ -171,7 +171,7 @@ va_list ap; if (indent) - vsb_printf(tl->fi, "%*.*s", tl->indent, tl->indent, ""); + vsb_printf(tl->fi, "%*.*s", tl->iindent, tl->iindent, ""); va_start(ap, fmt); vsb_vprintf(tl->fi, fmt, ap); va_end(ap); @@ -183,7 +183,7 @@ va_list ap; if (indent) - vsb_printf(tl->ff, "%*.*s", tl->indent, tl->indent, ""); + vsb_printf(tl->ff, "%*.*s", tl->findent, tl->findent, ""); va_start(ap, fmt); vsb_vprintf(tl->ff, fmt, ap); va_end(ap); @@ -301,8 +301,8 @@ struct source *sp; const char *p; - Fh(tl, 0, "#define VGC_NREFS %u\n", tl->cnt + 1); - Fc(tl, 0, "static struct vrt_ref VGC_ref[VGC_NREFS] = {\n"); + Fh(tl, 0, "\n#define VGC_NREFS %u\n", tl->cnt + 1); + Fc(tl, 0, "\nstatic struct vrt_ref VGC_ref[VGC_NREFS] = {\n"); lin = 1; pos = 0; sp = 0; @@ -590,7 +590,8 @@ tl->sb = sb; vcl_output_lang_h(tl->fh); - Fh(tl, 0, "extern struct VCL_conf VCL_conf;\n"); + Fh(tl, 0, "\n/* ---===### VCC generated below here ###===---*/\n"); + Fh(tl, 0, "\nextern struct VCL_conf VCL_conf;\n"); Fi(tl, 0, "\tVRT_alloc_backends(&VCL_conf);\n"); @@ -639,14 +640,14 @@ /* Emit method functions */ for (i = 0; i < N_METHODS; i++) { - Fc(tl, 1, "static int\n"); + Fc(tl, 1, "\nstatic int\n"); Fc(tl, 1, "VGC_function_%s (struct sess *sp)\n", method_tab[i].name); vsb_finish(tl->fm[i]); /* XXX: check vsb_overflowed ? */ Fc(tl, 1, "{\n"); Fc(tl, 1, "%s", vsb_data(tl->fm[i])); - Fc(tl, 1, "}\n\n"); + Fc(tl, 1, "}\n"); } LocTable(tl); Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.h 2007-05-06 18:57:26 UTC (rev 1387) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.h 2007-05-09 07:59:22 UTC (rev 1388) @@ -67,6 +67,9 @@ struct source *src; struct token *t; int indent; + int hindent; + int iindent; + int findent; unsigned cnt; struct vsb *fc, *fh, *fi, *ff, *fb; struct vsb *fm[N_METHODS]; From phk at projects.linpro.no Wed May 9 08:06:00 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 10:06:00 +0200 (CEST) Subject: r1389 - trunk/varnish-cache/lib/libvcl Message-ID: <20070509080600.D346E1EC410@projects.linpro.no> Author: phk Date: 2007-05-09 10:06:00 +0200 (Wed, 09 May 2007) New Revision: 1389 Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c Log: Implement '==' and '!=' for IP number variables (presently only client.ip) It works by building a one-entry ACL of the subsequent tokens and matching this ACL just like '~' would have done. This means that it is possible to use the '!', '(...)', '/width' constructs and domain-names in these comparisons. Examples: if (client.ip == ( "www.freebsd.org" )) { if (client.ip == (! "localhost" )) { if (client.ip == (! "10.0.0.0"/8 )) { or even if (client.ip != "somehost" / 28) { Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_acl.c 2007-05-09 07:59:22 UTC (rev 1388) +++ trunk/varnish-cache/lib/libvcl/vcc_acl.c 2007-05-09 08:06:00 UTC (rev 1389) @@ -30,15 +30,88 @@ */ #include +#include +#include #include "vsb.h" #include "vcc_priv.h" #include "vcc_compile.h" +static void +vcc_acl_top(struct tokenlist *tl, const char *acln) +{ + + Fh(tl, 1, "\nstatic struct vrt_acl acl_%s[] = {\n", acln); + tl->hindent += INDENT; + +} + +static void +vcc_acl_entry(struct tokenlist *tl) +{ + unsigned mask, para, not; + struct token *t; + + not = para = mask = 0; + + if (tl->t->tok == '(') { + para = 1; + vcc_NextToken(tl); + } + + if (tl->t->tok == '!') { + not = 1; + vcc_NextToken(tl); + } + + ExpectErr(tl, CSTR); + /* XXX: try to look it up, warn if failure */ + t = tl->t; + vcc_NextToken(tl); + if (tl->t->tok == '/') { + vcc_NextToken(tl); + ExpectErr(tl, CNUM); + mask = vcc_UintVal(tl); + } + Fh(tl, 1, "{ %u, %u, %u, ", not, mask, para); + EncToken(tl->fh, t); + Fh(tl, 0, ", \""); + if (para) + Fh(tl, 0, "("); + if (not) + Fh(tl, 0, "!"); + Fh(tl, 0, "\\\"\" "); + EncToken(tl->fh, t); + Fh(tl, 0, " \"\\\""); + if (mask) + Fh(tl, 0, "/%u", mask); + if (para) + Fh(tl, 0, ")"); + Fh(tl, 0, "\" },\n"); + + if (para) { + ExpectErr(tl, ')'); + vcc_NextToken(tl); + } +} + +static void +vcc_acl_bot(struct tokenlist *tl, const char *acln) +{ + + Fh(tl, 1, "{ 0, 0, 0, (void*)0, ""}\n", 0, 0); + tl->hindent -= INDENT; + Fh(tl, 1, "};\n"); + Fi(tl, 1, "\tVRT_acl_init(acl_%s);\n", acln); + Ff(tl, 1, "\tVRT_acl_fini(acl_%s);\n", acln); +} + void vcc_Cond_Ip(struct var *vp, struct tokenlist *tl) { + unsigned tcond; + char *acln; (void)vp; /* only client.ip at this time */ @@ -51,6 +124,19 @@ PF(tl->t), PF(tl->t)); vcc_NextToken(tl); break; + case T_EQ: + case T_NEQ: + tcond = tl->t->tok; + vcc_NextToken(tl); + asprintf(&acln, "acl_%u", tl->cnt); + assert(acln != NULL); + vcc_acl_top(tl, acln); + vcc_acl_entry(tl); + vcc_acl_bot(tl, acln); + Fb(tl, 1, "%sVRT_acl_match(sp, \"%s\", acl_%s)\n", + (tcond == T_NEQ ? "!" : ""), acln, acln); + free(acln); + break; default: vsb_printf(tl->sb, "Illegal condition "); vcc_ErrToken(tl, tl->t); @@ -64,8 +150,8 @@ void vcc_Acl(struct tokenlist *tl) { - unsigned mask, para, not; - struct token *t, *an; + struct token *an; + char *acln; vcc_NextToken(tl); @@ -74,67 +160,24 @@ vcc_NextToken(tl); vcc_AddDef(tl, an, R_ACL); - Fh(tl, 0, "static struct vrt_acl acl_%.*s[];\n", PF(an)); - Fc(tl, 1, "static struct vrt_acl acl_%.*s[] = {\n", PF(an)); + asprintf(&acln, "%.*s", PF(an)); + assert(acln != NULL); - tl->indent += INDENT; + vcc_acl_top(tl, acln); ExpectErr(tl, '{'); vcc_NextToken(tl); while (tl->t->tok != '}') { - - not = para = mask = 0; - - if (tl->t->tok == '(') { - para = 1; - vcc_NextToken(tl); - } - - if (tl->t->tok == '!') { - not = 1; - vcc_NextToken(tl); - } - - ExpectErr(tl, CSTR); - /* XXX: try to look it up, warn if failure */ - t = tl->t; - vcc_NextToken(tl); - if (tl->t->tok == '/') { - vcc_NextToken(tl); - ExpectErr(tl, CNUM); - mask = vcc_UintVal(tl); - } - Fc(tl, 1, "{ %u, %u, %u, ", not, mask, para); - EncToken(tl->fc, t); - Fc(tl, 0, ", \""); - if (para) - Fc(tl, 0, "("); - if (not) - Fc(tl, 0, "!"); - Fc(tl, 0, "\\\"\" "); - EncToken(tl->fc, t); - Fc(tl, 0, " \"\\\""); - if (mask) - Fc(tl, 0, "/%u", mask); - if (para) - Fc(tl, 0, ")"); - Fc(tl, 0, "\" },\n"); - - if (para) { - ExpectErr(tl, ')'); - vcc_NextToken(tl); - } + vcc_acl_entry(tl); + ERRCHK(tl); ExpectErr(tl, ';'); vcc_NextToken(tl); } - Fc(tl, 1, "{ 0, 0, 0, (void*)0, ""}\n", 0, 0); - tl->indent -= INDENT; - Fc(tl, 1, "};\n\n"); - ExpectErr(tl, '}'); vcc_NextToken(tl); - Fi(tl, 1, "\tVRT_acl_init(acl_%.*s);\n", PF(an)); - Ff(tl, 1, "\tVRT_acl_fini(acl_%.*s);\n", PF(an)); + vcc_acl_bot(tl, acln); + + free(acln); } From phk at projects.linpro.no Wed May 9 08:39:50 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 10:39:50 +0200 (CEST) Subject: r1390 - in trunk/varnish-cache: bin/varnishd include lib/libvcl Message-ID: <20070509083950.4E39A1EC40E@projects.linpro.no> Author: phk Date: 2007-05-09 10:39:50 +0200 (Wed, 09 May 2007) New Revision: 1390 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c trunk/varnish-cache/include/vrt.h trunk/varnish-cache/include/vrt_obj.h trunk/varnish-cache/lib/libvcl/vcc_acl.c trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl trunk/varnish-cache/lib/libvcl/vcc_obj.c Log: Add support for checking "server.ip" in addition to "client.ip". The definition of "server.ip" is what getsockname(2) returns for our end of the connection. Don't report ACL matches for acls created as a result of '==' or '!=' usage on IP number variables. Move storage for sess->sockaddr away from sessmem and expose more code to . This is a network application after all. XXX: somebody with IPv6 connectivity needs to look at ACLs in IPv6 context. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-09 08:39:50 UTC (rev 1390) @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -255,7 +256,8 @@ struct worker *wrk; unsigned sockaddrlen; - struct sockaddr *sockaddr; + struct sockaddr sockaddr[2]; + struct sockaddr mysockaddr[2]; /* formatted ascii client address */ char addr[TCP_ADDRBUFSIZE]; Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2007-05-09 08:39:50 UTC (rev 1390) @@ -65,7 +65,6 @@ struct sess sess; struct http http; - struct sockaddr sockaddr[2]; /* INET6 hack */ unsigned workspace; TAILQ_ENTRY(sessmem) list; }; @@ -298,8 +297,7 @@ sm->sess.mem = sm; sm->sess.http = &sm->http; - sm->sess.sockaddr = sm->sockaddr; - assert(len < sizeof(sm->sockaddr)); + assert(len < sizeof(sm->sess.sockaddr)); if (addr != NULL) { memcpy(sm->sess.sockaddr, addr, len); sm->sess.sockaddrlen = len; Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-09 08:39:50 UTC (rev 1390) @@ -250,3 +250,25 @@ VREQ(request, HTTP_HDR_REQ) VREQ(url, HTTP_HDR_URL) VREQ(proto, HTTP_HDR_PROTO) + +/*--------------------------------------------------------------------*/ + +struct sockaddr * +VRT_r_client_ip(struct sess *sp) +{ + return (sp->sockaddr); +} + +struct sockaddr * +VRT_r_server_ip(struct sess *sp) +{ + socklen_t l; + + if (sp->mysockaddr->sa_len == 0) { + l = sizeof sp->mysockaddr; + AZ(getsockname(sp->fd, sp->mysockaddr, &l)); + assert(l == sp->mysockaddr->sa_len); + } + + return (sp->mysockaddr); +} Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2007-05-09 08:39:50 UTC (rev 1390) @@ -60,35 +60,37 @@ }; static int -vrt_acl_vsl(struct sess *sp, const char *acl, struct vrt_acl *ap, int r) +vrt_acl_vsl(struct sess *sp, const char *acln, struct vrt_acl *ap, int r) { AN(ap); - if (ap->name == NULL) { - assert(r == 0); - VSL(SLT_VCL_acl, sp->fd, "NO_MATCH %s", acl); - return (r); + if (acln != NULL) { + if (ap->name == NULL) { + assert(r == 0); + VSL(SLT_VCL_acl, sp->fd, "NO_MATCH %s", acln); + return (r); + } + if (ap->priv == NULL) { + assert(r == 0); + VSL(SLT_VCL_acl, sp->fd, "FAIL %s %s", acln, ap->desc); + return (r); + } + + VSL(SLT_VCL_acl, sp->fd, "%s %s %s", + r ? "MATCH" : "NEG_MATCH", acln, ap->desc); } - if (ap->priv == NULL) { - assert(r == 0); - VSL(SLT_VCL_acl, sp->fd, "FAIL %s %s", acl, ap->desc); - return (r); - } - - VSL(SLT_VCL_acl, sp->fd, "%s %s %s", - r ? "MATCH" : "NEG_MATCH", acl, ap->desc); return (r); } int -VRT_acl_match(struct sess *sp, const char *acl, struct vrt_acl *ap) +VRT_acl_match(struct sess *sp, struct sockaddr *sa, const char *acln, struct vrt_acl *ap) { struct addrinfo *a1; struct sockaddr_in *sin1, *sin2; - if (sp->sockaddr->sa_family == AF_INET) { - assert(sp->sockaddrlen >= sizeof *sin1); - sin1 = (void*)sp->sockaddr; + if (sa->sa_family == AF_INET) { + assert(sa->sa_len >= sizeof *sin1); + sin1 = (void*)sa; } else { sin1 = NULL; } @@ -97,7 +99,7 @@ if (ap->priv == NULL && ap->paren) continue; if (ap->priv == NULL && ap->not) { - return (vrt_acl_vsl(sp, acl, ap, 0)); + return (vrt_acl_vsl(sp, acln, ap, 0)); } if (ap->priv == NULL) continue; @@ -116,16 +118,16 @@ htonl(sin2->sin_addr.s_addr)) & ipv4mask[ap->mask > 32 ? 32 : ap->mask])) return ( - vrt_acl_vsl(sp, acl, ap, !ap->not)); + vrt_acl_vsl(sp, acln, ap, !ap->not)); continue; } /* Not rules for unknown protos match */ if (ap->not) - return (vrt_acl_vsl(sp, acl, ap, 0)); + return (vrt_acl_vsl(sp, acln, ap, 0)); } } - return (vrt_acl_vsl(sp, acl, ap, 0)); + return (vrt_acl_vsl(sp, acln, ap, 0)); } void @@ -164,5 +166,3 @@ freeaddrinfo(a1); } } - - Modified: trunk/varnish-cache/include/vrt.h =================================================================== --- trunk/varnish-cache/include/vrt.h 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/include/vrt.h 2007-05-09 08:39:50 UTC (rev 1390) @@ -38,6 +38,7 @@ struct vsb; struct backend; struct VCL_conf; +struct sockaddr; struct vrt_ref { unsigned source; @@ -58,7 +59,7 @@ }; /* ACL related */ -int VRT_acl_match(struct sess *, const char *, struct vrt_acl *); +int VRT_acl_match(struct sess *, struct sockaddr *, const char *, struct vrt_acl *); void VRT_acl_init(struct vrt_acl *); void VRT_acl_fini(struct vrt_acl *); Modified: trunk/varnish-cache/include/vrt_obj.h =================================================================== --- trunk/varnish-cache/include/vrt_obj.h 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/include/vrt_obj.h 2007-05-09 08:39:50 UTC (rev 1390) @@ -12,8 +12,10 @@ void VRT_l_backend_port(struct backend *, const char *); double VRT_r_backend_dnsttl(struct backend *); void VRT_l_backend_dnsttl(struct backend *, double); -const unsigned char * VRT_r_client_ip(struct sess *); -void VRT_l_client_ip(struct sess *, const unsigned char *); +struct sockaddr * VRT_r_client_ip(struct sess *); +void VRT_l_client_ip(struct sess *, struct sockaddr *); +struct sockaddr * VRT_r_server_ip(struct sess *); +void VRT_l_server_ip(struct sess *, struct sockaddr *); const char * VRT_r_req_request(struct sess *); void VRT_l_req_request(struct sess *, const char *); const char * VRT_r_req_host(struct sess *); Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_acl.c 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/lib/libvcl/vcc_acl.c 2007-05-09 08:39:50 UTC (rev 1390) @@ -113,15 +113,13 @@ unsigned tcond; char *acln; - (void)vp; /* only client.ip at this time */ - switch (tl->t->tok) { case '~': vcc_NextToken(tl); ExpectErr(tl, ID); vcc_AddRef(tl, tl->t, R_ACL); - Fb(tl, 1, "VRT_acl_match(sp, \"%.*s\", acl_%.*s)\n", - PF(tl->t), PF(tl->t)); + Fb(tl, 1, "VRT_acl_match(sp, %s, \"%.*s\", acl_%.*s)\n", + vp->rname, PF(tl->t), PF(tl->t)); vcc_NextToken(tl); break; case T_EQ: @@ -133,8 +131,8 @@ vcc_acl_top(tl, acln); vcc_acl_entry(tl); vcc_acl_bot(tl, acln); - Fb(tl, 1, "%sVRT_acl_match(sp, \"%s\", acl_%s)\n", - (tcond == T_NEQ ? "!" : ""), acln, acln); + Fb(tl, 1, "%sVRT_acl_match(sp, %s, 0, acl_%s)\n", + (tcond == T_NEQ ? "!" : ""), vp->rname, acln); free(acln); break; default: Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2007-05-09 08:39:50 UTC (rev 1390) @@ -391,6 +391,7 @@ vsb_cat(sb, "struct vsb;\n"); vsb_cat(sb, "struct backend;\n"); vsb_cat(sb, "struct VCL_conf;\n"); + vsb_cat(sb, "struct sockaddr;\n"); vsb_cat(sb, "\n"); vsb_cat(sb, "struct vrt_ref {\n"); vsb_cat(sb, " unsigned source;\n"); @@ -411,7 +412,7 @@ vsb_cat(sb, "};\n"); vsb_cat(sb, "\n"); vsb_cat(sb, "/* ACL related */\n"); - vsb_cat(sb, "int VRT_acl_match(struct sess *, const char *, struct vrt_acl *);\n"); + vsb_cat(sb, "int VRT_acl_match(struct sess *, struct sockaddr *, const char *, struct vrt_acl *);\n"); vsb_cat(sb, "void VRT_acl_init(struct vrt_acl *);\n"); vsb_cat(sb, "void VRT_acl_fini(struct vrt_acl *);\n"); vsb_cat(sb, "\n"); @@ -455,8 +456,10 @@ vsb_cat(sb, "void VRT_l_backend_port(struct backend *, const char *);\n"); vsb_cat(sb, "double VRT_r_backend_dnsttl(struct backend *);\n"); vsb_cat(sb, "void VRT_l_backend_dnsttl(struct backend *, double);\n"); - vsb_cat(sb, "const unsigned char * VRT_r_client_ip(struct sess *);\n"); - vsb_cat(sb, "void VRT_l_client_ip(struct sess *, const unsigned char *);\n"); + vsb_cat(sb, "struct sockaddr * VRT_r_client_ip(struct sess *);\n"); + vsb_cat(sb, "void VRT_l_client_ip(struct sess *, struct sockaddr *);\n"); + vsb_cat(sb, "struct sockaddr * VRT_r_server_ip(struct sess *);\n"); + vsb_cat(sb, "void VRT_l_server_ip(struct sess *, struct sockaddr *);\n"); vsb_cat(sb, "const char * VRT_r_req_request(struct sess *);\n"); vsb_cat(sb, "void VRT_l_req_request(struct sess *, const char *);\n"); vsb_cat(sb, "const char * VRT_r_req_host(struct sess *);\n"); Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2007-05-09 08:39:50 UTC (rev 1390) @@ -41,6 +41,7 @@ set spobj { { client.ip IP } + { server.ip IP } { req.request STRING } { req.host STRING } { req.url STRING } @@ -53,7 +54,7 @@ { resp.http. HEADER } } -set tt(IP) "const unsigned char *" +set tt(IP) "struct sockaddr *" set tt(STRING) "const char *" set tt(BOOL) "double" set tt(BACKEND) "struct backend *" Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2007-05-09 08:06:00 UTC (rev 1389) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2007-05-09 08:39:50 UTC (rev 1390) @@ -30,6 +30,10 @@ "VRT_r_client_ip(sp)", "VRT_l_client_ip(sp, ", }, + { "server.ip", IP, 9, + "VRT_r_server_ip(sp)", + "VRT_l_server_ip(sp, ", + }, { "req.request", STRING, 11, "VRT_r_req_request(sp)", "VRT_l_req_request(sp, ", From phk at projects.linpro.no Wed May 9 08:44:28 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 10:44:28 +0200 (CEST) Subject: r1391 - trunk/varnish-cache/lib/libvcl Message-ID: <20070509084428.A9B651EC40E@projects.linpro.no> Author: phk Date: 2007-05-09 10:44:28 +0200 (Wed, 09 May 2007) New Revision: 1391 Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c Log: Add back a check that was lost: You must have at least one backend. Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-09 08:39:50 UTC (rev 1390) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-09 08:44:28 UTC (rev 1391) @@ -627,6 +627,14 @@ if (tl->err) return (vcc_DestroyTokenList(tl, NULL)); + /* Check if we have any backends at all */ + if (tl->nbackend == 0) { + vsb_printf(tl->sb, + "No backends in VCL program, at least one is necessary.\n"); + tl->err = 1; + return (vcc_DestroyTokenList(tl, NULL)); + } + /* Check for orphans */ if (vcc_CheckReferences(tl)) return (vcc_DestroyTokenList(tl, NULL)); From phk at projects.linpro.no Wed May 9 09:44:35 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 11:44:35 +0200 (CEST) Subject: r1392 - trunk/varnish-cache/bin/varnishd Message-ID: <20070509094435.49B991EC40E@projects.linpro.no> Author: phk Date: 2007-05-09 11:44:35 +0200 (Wed, 09 May 2007) New Revision: 1392 Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c Log: Don't use sockaddr->sa_len, it was too advanced for POSIX people. Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2007-05-09 08:44:28 UTC (rev 1391) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2007-05-09 09:44:35 UTC (rev 1392) @@ -88,12 +88,10 @@ struct addrinfo *a1; struct sockaddr_in *sin1, *sin2; - if (sa->sa_family == AF_INET) { - assert(sa->sa_len >= sizeof *sin1); + if (sa->sa_family == AF_INET) sin1 = (void*)sa; - } else { + else sin1 = NULL; - } for ( ; ap->name != NULL; ap++) { if (ap->priv == NULL && ap->paren) From phk at projects.linpro.no Wed May 9 09:45:01 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 11:45:01 +0200 (CEST) Subject: r1393 - trunk/varnish-cache/bin/varnishd Message-ID: <20070509094501.7D8711EC52C@projects.linpro.no> Author: phk Date: 2007-05-09 11:45:01 +0200 (Wed, 09 May 2007) New Revision: 1393 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_vrt.c Log: Don't use sockaddr->sa_len, it was too advanced for POSIX people Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-09 09:44:35 UTC (rev 1392) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-09 09:45:01 UTC (rev 1393) @@ -257,6 +257,7 @@ unsigned sockaddrlen; struct sockaddr sockaddr[2]; + unsigned mysockaddrlen; struct sockaddr mysockaddr[2]; /* formatted ascii client address */ Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-09 09:44:35 UTC (rev 1392) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-09 09:45:01 UTC (rev 1393) @@ -264,10 +264,10 @@ { socklen_t l; - if (sp->mysockaddr->sa_len == 0) { + if (sp->mysockaddrlen == 0) { l = sizeof sp->mysockaddr; AZ(getsockname(sp->fd, sp->mysockaddr, &l)); - assert(l == sp->mysockaddr->sa_len); + sp->mysockaddrlen = l; } return (sp->mysockaddr); From des at linpro.no Wed May 9 10:11:20 2007 From: des at linpro.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=) Date: Wed, 09 May 2007 12:11:20 +0200 Subject: r1392 - trunk/varnish-cache/bin/varnishd In-Reply-To: <20070509094435.49B991EC40E@projects.linpro.no> (phk@projects.linpro.no's message of "Wed\, 9 May 2007 11\:44\:35 +0200 \(CEST\)") References: <20070509094435.49B991EC40E@projects.linpro.no> Message-ID: <87y7jynw6v.fsf@des.linpro.no> phk at projects.linpro.no writes: > Modified: > trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c > Log: > Don't use sockaddr->sa_len, it was too advanced for POSIX people. Actually, our configure script checks for its presence - you can test for it in code with "#if HAVE_STRUCT_SOCKADDR_SA_LEN". DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From phk at phk.freebsd.dk Wed May 9 10:16:21 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Wed, 09 May 2007 10:16:21 +0000 Subject: r1392 - trunk/varnish-cache/bin/varnishd In-Reply-To: Your message of "Wed, 09 May 2007 12:11:20 +0200." <87y7jynw6v.fsf@des.linpro.no> Message-ID: <49007.1178705781@critter.freebsd.dk> In message <87y7jynw6v.fsf at des.linpro.no>, Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= writes: >phk at projects.linpro.no writes: >> Modified: >> trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c >> Log: >> Don't use sockaddr->sa_len, it was too advanced for POSIX people. > >Actually, our configure script checks for its presence - you can test >for it in code with "#if HAVE_STRUCT_SOCKADDR_SA_LEN". It's easier and cleaner looking to assume it's not there. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at projects.linpro.no Wed May 9 10:55:33 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 12:55:33 +0200 (CEST) Subject: r1394 - trunk/varnish-cache/bin/varnishd Message-ID: <20070509105533.9CEDF1EC52C@projects.linpro.no> Author: phk Date: 2007-05-09 12:55:33 +0200 (Wed, 09 May 2007) New Revision: 1394 Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c Log: After compilation of a VCL program, do a test-load into the management process to catch any implementation-discrepancies between symbols used by the compiler and those implemented in the runtime. The situation will happen from time to time and there is no need to issue a panic when we can test sensibly for it. Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-09 09:45:01 UTC (rev 1393) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-09 10:55:33 UTC (rev 1394) @@ -33,6 +33,7 @@ #include +#include #include #include #include @@ -59,7 +60,6 @@ int active; }; - static TAILQ_HEAD(, vclprog) vclhead = TAILQ_HEAD_INITIALIZER(vclhead); /*--------------------------------------------------------------------*/ @@ -129,6 +129,7 @@ FILE *fo, *fs; char *of, *sf, buf[BUFSIZ]; int i, j, sfd; + void *p; /* Create temporary C source file */ sf = strdup("/tmp/vcl.XXXXXXXX"); @@ -201,6 +202,17 @@ of = NULL; } + /* Next, try to load the object into the management process */ + p = dlopen(of, RTLD_NOW | RTLD_LOCAL); + if (p == NULL) { + vsb_printf(sb, "Problem loading compiled VCL program:\n\t%s\n", + dlerror()); + unlink(of); + free(of); + of = NULL; + } else + AZ(dlclose(p)); + /* clean up and return */ unlink(sf); free(sf); From phk at projects.linpro.no Wed May 9 11:07:59 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 13:07:59 +0200 (CEST) Subject: r1395 - in trunk/varnish-cache: include lib/libvcl Message-ID: <20070509110759.464461EC6CB@projects.linpro.no> Author: phk Date: 2007-05-09 13:07:59 +0200 (Wed, 09 May 2007) New Revision: 1395 Modified: trunk/varnish-cache/include/vrt_obj.h trunk/varnish-cache/lib/libvcl/vcc_action.c trunk/varnish-cache/lib/libvcl/vcc_compile.c trunk/varnish-cache/lib/libvcl/vcc_compile.h trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl trunk/varnish-cache/lib/libvcl/vcc_obj.c Log: Mark variables/objects as having a string representation or not and create a function to figure this out, if present. Add the req.hash variable and the += operator for it, so we can put the actual hash contents under vcl control. The runtime half of this stuff is not done yet. Modified: trunk/varnish-cache/include/vrt_obj.h =================================================================== --- trunk/varnish-cache/include/vrt_obj.h 2007-05-09 10:55:33 UTC (rev 1394) +++ trunk/varnish-cache/include/vrt_obj.h 2007-05-09 11:07:59 UTC (rev 1395) @@ -26,6 +26,8 @@ void VRT_l_req_proto(struct sess *, const char *); struct backend * VRT_r_req_backend(struct sess *); void VRT_l_req_backend(struct sess *, struct backend *); +int VRT_r_req_hash(struct sess *); +void VRT_l_req_hash(struct sess *, int); double VRT_r_obj_valid(struct sess *); void VRT_l_obj_valid(struct sess *, double); double VRT_r_obj_cacheable(struct sess *); Modified: trunk/varnish-cache/lib/libvcl/vcc_action.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_action.c 2007-05-09 10:55:33 UTC (rev 1394) +++ trunk/varnish-cache/lib/libvcl/vcc_action.c 2007-05-09 11:07:59 UTC (rev 1395) @@ -37,7 +37,44 @@ #include "vcc_compile.h" #include "libvarnish.h" +/*--------------------------------------------------------------------*/ +static void +StringVal(struct tokenlist *tl) +{ + struct var *vp; + struct token *vt; + + if (tl->t->tok == CSTR) { + EncToken(tl->fb, tl->t); + vcc_NextToken(tl); + return; + } + ExpectErr(tl, VAR); + ERRCHK(tl); + vt = tl->t; + vp = FindVar(tl, tl->t, vcc_vars); + ERRCHK(tl); + if (!vp->has_string) { + vsb_printf(tl->sb, + "No string representation of '%s'\n", vp->name); + vcc_ErrWhere(tl, tl->t); + return; + } + switch (vp->fmt) { + case STRING: + Fb(tl, 0, "%s", vp->rname); + break; + default: + vsb_printf(tl->sb, + "String representation of '%s' not implemented yet.\n", + vp->name); + vcc_ErrWhere(tl, tl->t); + return; + } + vcc_NextToken(tl); +} + /*--------------------------------------------------------------------*/ #define VCL_RET_MAC(l,u,b,i) \ @@ -182,6 +219,12 @@ " only '=' is legal for backend\n"); vcc_ErrWhere(tl, tl->t); return; + case HASH: + ExpectErr(tl, T_INCR); + vcc_NextToken(tl); + StringVal(tl); + Fb(tl, 0, ");\n"); + return; default: vsb_printf(tl->sb, "Assignments not possible for '%s'\n", vp->name); Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-09 10:55:33 UTC (rev 1394) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-09 11:07:59 UTC (rev 1395) @@ -252,6 +252,7 @@ p[i] = '\0'; v->name = p; v->fmt = STRING; + v->has_string = vh->has_string; if (!memcmp(vh->name, "req.", 4)) w = 1; else Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.h 2007-05-09 10:55:33 UTC (rev 1394) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.h 2007-05-09 11:07:59 UTC (rev 1395) @@ -96,6 +96,7 @@ IP, HOSTNAME, PORTNAME, + HASH, HEADER }; @@ -119,6 +120,7 @@ unsigned len; const char *rname; const char *lname; + unsigned has_string; }; struct method { Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2007-05-09 10:55:33 UTC (rev 1394) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2007-05-09 11:07:59 UTC (rev 1395) @@ -32,26 +32,27 @@ # Objects which operate on backends set beobj { - { backend.host HOSTNAME } - { backend.port PORTNAME } - { backend.dnsttl TIME } + { backend.host HOSTNAME 0 } + { backend.port PORTNAME 0 } + { backend.dnsttl TIME 0 } } # Objects which operate on sessions set spobj { - { client.ip IP } - { server.ip IP } - { req.request STRING } - { req.host STRING } - { req.url STRING } - { req.proto STRING } - { req.backend BACKEND } - { obj.valid BOOL } - { obj.cacheable BOOL } - { obj.ttl TIME } - { req.http. HEADER } - { resp.http. HEADER } + { client.ip IP 1} + { server.ip IP 1} + { req.request STRING 1} + { req.host STRING 1} + { req.url STRING 1} + { req.proto STRING 1} + { req.backend BACKEND 0} + { req.hash HASH 0} + { obj.valid BOOL 0} + { obj.cacheable BOOL 0} + { obj.ttl TIME 0} + { req.http. HEADER 1} + { resp.http. HEADER 1} } set tt(IP) "struct sockaddr *" @@ -62,6 +63,7 @@ set tt(HEADER) "const char *" set tt(HOSTNAME) "const char *" set tt(PORTNAME) "const char *" +set tt(HASH) "int" #---------------------------------------------------------------------- # Boilerplate warning for all generated files. @@ -93,6 +95,7 @@ puts $fo "\t\{ \"$n\", $t, [string length $n]," puts $fo "\t \"VRT_r_${m}($pa)\"," puts $fo "\t \"VRT_l_${m}($pa, \"," + puts $fo "\t [lindex $v 2]" puts $fo "\t\}," puts $fp "$tt($t) VRT_r_${m}($ty);" Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2007-05-09 10:55:33 UTC (rev 1394) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2007-05-09 11:07:59 UTC (rev 1395) @@ -13,14 +13,17 @@ { "backend.host", HOSTNAME, 12, "VRT_r_backend_host(backend)", "VRT_l_backend_host(backend, ", + 0 }, { "backend.port", PORTNAME, 12, "VRT_r_backend_port(backend)", "VRT_l_backend_port(backend, ", + 0 }, { "backend.dnsttl", TIME, 14, "VRT_r_backend_dnsttl(backend)", "VRT_l_backend_dnsttl(backend, ", + 0 }, { NULL } }; @@ -29,50 +32,67 @@ { "client.ip", IP, 9, "VRT_r_client_ip(sp)", "VRT_l_client_ip(sp, ", + 1 }, { "server.ip", IP, 9, "VRT_r_server_ip(sp)", "VRT_l_server_ip(sp, ", + 1 }, { "req.request", STRING, 11, "VRT_r_req_request(sp)", "VRT_l_req_request(sp, ", + 1 }, { "req.host", STRING, 8, "VRT_r_req_host(sp)", "VRT_l_req_host(sp, ", + 1 }, { "req.url", STRING, 7, "VRT_r_req_url(sp)", "VRT_l_req_url(sp, ", + 1 }, { "req.proto", STRING, 9, "VRT_r_req_proto(sp)", "VRT_l_req_proto(sp, ", + 1 }, { "req.backend", BACKEND, 11, "VRT_r_req_backend(sp)", "VRT_l_req_backend(sp, ", + 0 }, + { "req.hash", HASH, 8, + "VRT_r_req_hash(sp)", + "VRT_l_req_hash(sp, ", + 0 + }, { "obj.valid", BOOL, 9, "VRT_r_obj_valid(sp)", "VRT_l_obj_valid(sp, ", + 0 }, { "obj.cacheable", BOOL, 13, "VRT_r_obj_cacheable(sp)", "VRT_l_obj_cacheable(sp, ", + 0 }, { "obj.ttl", TIME, 7, "VRT_r_obj_ttl(sp)", "VRT_l_obj_ttl(sp, ", + 0 }, { "req.http.", HEADER, 9, "VRT_r_req_http_(sp)", "VRT_l_req_http_(sp, ", + 1 }, { "resp.http.", HEADER, 10, "VRT_r_resp_http_(sp)", "VRT_l_resp_http_(sp, ", + 1 }, { NULL } }; From phk at projects.linpro.no Wed May 9 12:08:41 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 14:08:41 +0200 (CEST) Subject: r1396 - trunk/varnish-cache/bin/varnishd Message-ID: <20070509120841.CDCEC1EC42F@projects.linpro.no> Author: phk Date: 2007-05-09 14:08:41 +0200 (Wed, 09 May 2007) New Revision: 1396 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c Log: Use struct sockaddr_storage instead of our own homegrown hack. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-09 11:07:59 UTC (rev 1395) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-09 12:08:41 UTC (rev 1396) @@ -256,9 +256,9 @@ struct worker *wrk; unsigned sockaddrlen; - struct sockaddr sockaddr[2]; + struct sockaddr_storage sockaddr[1]; unsigned mysockaddrlen; - struct sockaddr mysockaddr[2]; + struct sockaddr_storage mysockaddr[1]; /* formatted ascii client address */ char addr[TCP_ADDRBUFSIZE]; Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2007-05-09 11:07:59 UTC (rev 1395) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2007-05-09 12:08:41 UTC (rev 1396) @@ -113,7 +113,7 @@ VCA_Prep(struct sess *sp) { - TCP_name(sp->sockaddr, sp->sockaddrlen, + TCP_name((struct sockaddr *)sp->sockaddr, sp->sockaddrlen, sp->addr, sizeof sp->addr, sp->port, sizeof sp->port); VSL(SLT_SessionOpen, sp->fd, "%s %s", sp->addr, sp->port); sp->acct.first = sp->t_open.tv_sec; Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-09 11:07:59 UTC (rev 1395) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-09 12:08:41 UTC (rev 1396) @@ -256,7 +256,7 @@ struct sockaddr * VRT_r_client_ip(struct sess *sp) { - return (sp->sockaddr); + return ((struct sockaddr *)sp->sockaddr); } struct sockaddr * @@ -266,9 +266,10 @@ if (sp->mysockaddrlen == 0) { l = sizeof sp->mysockaddr; - AZ(getsockname(sp->fd, sp->mysockaddr, &l)); + AZ(getsockname(sp->fd, + (struct sockaddr*)sp->mysockaddr, &l)); sp->mysockaddrlen = l; } - return (sp->mysockaddr); + return ((struct sockaddr*)sp->mysockaddr); } Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2007-05-09 11:07:59 UTC (rev 1395) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2007-05-09 12:08:41 UTC (rev 1396) @@ -104,7 +104,7 @@ for (a1 = ap->priv; a1 != NULL; a1 = a1->ai_next) { /* only match the right family */ - if (a1->ai_family != sp->sockaddr->sa_family) + if (a1->ai_family != sp->sockaddr->ss_family) continue; if (a1->ai_family == AF_INET) { From phk at projects.linpro.no Wed May 9 13:55:39 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 15:55:39 +0200 (CEST) Subject: r1397 - in trunk/varnish-cache: include lib/libvcl Message-ID: <20070509135539.5F5531EC6B3@projects.linpro.no> Author: phk Date: 2007-05-09 15:55:39 +0200 (Wed, 09 May 2007) New Revision: 1397 Modified: trunk/varnish-cache/include/vrt_obj.h trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl Log: Make req.hash have the right internal type: char * Modified: trunk/varnish-cache/include/vrt_obj.h =================================================================== --- trunk/varnish-cache/include/vrt_obj.h 2007-05-09 12:08:41 UTC (rev 1396) +++ trunk/varnish-cache/include/vrt_obj.h 2007-05-09 13:55:39 UTC (rev 1397) @@ -26,8 +26,8 @@ void VRT_l_req_proto(struct sess *, const char *); struct backend * VRT_r_req_backend(struct sess *); void VRT_l_req_backend(struct sess *, struct backend *); -int VRT_r_req_hash(struct sess *); -void VRT_l_req_hash(struct sess *, int); +const char * VRT_r_req_hash(struct sess *); +void VRT_l_req_hash(struct sess *, const char *); double VRT_r_obj_valid(struct sess *); void VRT_l_obj_valid(struct sess *, double); double VRT_r_obj_cacheable(struct sess *); Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2007-05-09 12:08:41 UTC (rev 1396) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2007-05-09 13:55:39 UTC (rev 1397) @@ -63,7 +63,7 @@ set tt(HEADER) "const char *" set tt(HOSTNAME) "const char *" set tt(PORTNAME) "const char *" -set tt(HASH) "int" +set tt(HASH) "const char *" #---------------------------------------------------------------------- # Boilerplate warning for all generated files. From phk at projects.linpro.no Wed May 9 14:28:50 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 9 May 2007 16:28:50 +0200 (CEST) Subject: r1398 - trunk/varnish-cache/bin/varnishd Message-ID: <20070509142850.B0D431EC40E@projects.linpro.no> Author: phk Date: 2007-05-09 16:28:50 +0200 (Wed, 09 May 2007) New Revision: 1398 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_hash.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/hash_classic.c trunk/varnish-cache/bin/varnishd/hash_simple_list.c trunk/varnish-cache/bin/varnishd/mgt_vcc.c Log: Implement runtime part of VCL controlled hashing. The vcl_hash() is now used to control which fields go into the hash algorithm, and the default is stil, as previously, the URL + Host: header. But now it is controlled by the vcl code, with the default vcl_hash() being: sub vcl_hash { req.hash += req.url; req.hash += req.http.host; hash; } Once I get a bit further, this will be changed to sub vcl_hash { req.hash += req.url; if (req.http.host) { req.hash += req.http.host; } else { req.hash += server.ip; } hash; } So that we correctly hash HTTP requests without Host: headers, that go to a machine with multiple IP numbers. If you want to add fields to the hash, just write a vcl_hash that does not end in "hash;": sub vcl_hash { req.hash += req.http.cookie; } If you want to override the default vcl_hash, just say so: sub vcl_hash { req.hash += req.url; hash; // do not continue into default vcl_hash } Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-09 13:55:39 UTC (rev 1397) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-09 14:28:50 UTC (rev 1398) @@ -291,6 +291,9 @@ struct workreq workreq; struct acct acct; + + char *hash_b; /* Start of hash string */ + char *hash_e; /* End of hash string */ }; struct backend { Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-09 13:55:39 UTC (rev 1397) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-09 14:28:50 UTC (rev 1398) @@ -437,9 +437,18 @@ { struct object *o; - VCL_hash_method(sp); /* XXX: no-op for now */ + assert(sp->http->f > sp->http->s); + assert(sp->http->f >= sp->http->t); + if (sp->obj == NULL) { + sp->hash_b = sp->http->f; + sp->hash_e = sp->hash_b; + VCL_hash_method(sp); /* XXX: no-op for now */ + /* XXX check error */ + } + o = HSH_Lookup(sp); + if (o == NULL) { /* * We hit a busy object, disembark worker thread and expect @@ -451,6 +460,14 @@ return (1); } + xxxassert (sp->hash_e == sp->http->f); + if (sp->hash_e == sp->http->f) { + /* Nobody alloc'ed after us, free again */ + sp->http->f = sp->hash_b; + } + + sp->hash_b = sp->hash_e = NULL; + sp->obj = o; /* If we inserted a new object it's a miss */ Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2007-05-09 13:55:39 UTC (rev 1397) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2007-05-09 14:28:50 UTC (rev 1398) @@ -115,7 +115,6 @@ struct http *h; struct objhead *oh; struct object *o; - char *url, *host; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); @@ -125,9 +124,6 @@ h = sp->http; HSH_Prealloc(sp); - url = h->hd[HTTP_HDR_URL].b; - if (!http_GetHdr(h, H_Host, &host)) - host = url; if (sp->obj != NULL) { CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); o = sp->obj; @@ -136,7 +132,9 @@ LOCK(&oh->mtx); goto were_back; } - oh = hash->lookup(url, host, w->nobjhead); +VSLR(SLT_Debug, sp->fd, sp->hash_b, sp->hash_e); + + oh = hash->lookup(sp->hash_b, sp->hash_e, w->nobjhead); CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC); if (oh == w->nobjhead) w->nobjhead = NULL; @@ -157,7 +155,7 @@ /* Object banned but not reaped yet */ } else if (o->ttl <= sp->t_req.tv_sec) { /* Object expired */ - } else if (BAN_CheckObject(o, url)) { + } else if (BAN_CheckObject(o, h->hd[HTTP_HDR_URL].b)) { o->ttl = 0; VSL(SLT_ExpBan, 0, "%u was banned", o->xid); EXP_TTLchange(o); Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-09 13:55:39 UTC (rev 1397) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-09 14:28:50 UTC (rev 1398) @@ -540,6 +540,7 @@ hp->t = p; assert(hp->t > hp->s); assert(hp->t <= hp->v); + hp->f = hp->v; return (1); } Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-09 13:55:39 UTC (rev 1397) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-09 14:28:50 UTC (rev 1398) @@ -273,3 +273,21 @@ return ((struct sockaddr*)sp->mysockaddr); } + +/*--------------------------------------------------------------------*/ + +void +VRT_l_req_hash(struct sess *sp, const char *str) +{ + int l; + + if (str == NULL) + str = ""; + l = strlen(str); + xxxassert (sp->hash_e == sp->http->f); + xxxassert (sp->hash_e + l + 1 <= sp->http->e); + memcpy(sp->hash_e, str, l); + sp->hash_e[l] = '#'; + sp->hash_e += l + 1; + sp->http->f += l + 1; +} Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_classic.c 2007-05-09 13:55:39 UTC (rev 1397) +++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2007-05-09 14:28:50 UTC (rev 1398) @@ -121,22 +121,20 @@ */ static struct objhead * -hcl_lookup(const char *key1, const char *key2, struct objhead *noh) +hcl_lookup(const char *b, const char *e, struct objhead *noh) { struct hcl_entry *he, *he2; struct hcl_hd *hp; - unsigned u1, digest, kl1, kl2, kl, r; + unsigned u1, digest, kl, r; int i; CHECK_OBJ_NOTNULL(noh, OBJHEAD_MAGIC); - digest = crc32_2s(key1, key2); + digest = crc32_l(b, e - b); u1 = digest % hcl_nhash; hp = &hcl_head[u1]; - kl1 = strlen(key1) + 1; /* Incl '/0' */ - kl2 = strlen(key2); - kl = kl1 + kl2; + kl = e - b; he2 = NULL; for (r = 0; r < 2; r++ ) { @@ -151,10 +149,8 @@ continue; if (he->digest > digest) break; - if (memcmp(he->key, key1, kl1)) + if (memcmp(he->key, b, kl)) continue; - if (memcmp(he->key + kl1, key2, kl2)) - continue; he->refcnt++; noh = he->oh; UNLOCK(&hp->mtx); @@ -190,8 +186,7 @@ noh->hashpriv = he2; he2->key = (void*)(he2 + 1); - memcpy(he2->key, key1, kl1); - memcpy(he2->key + kl1, key2, kl2); + memcpy(he2->key, b, kl); } assert(he2 == NULL); /* FlexeLint */ INCOMPL(); Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2007-05-09 13:55:39 UTC (rev 1397) +++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2007-05-09 14:28:50 UTC (rev 1398) @@ -44,8 +44,8 @@ struct hsl_entry { TAILQ_ENTRY(hsl_entry) list; - char *key1; - char *key2; + char *key; + int keylen; struct objhead *obj; unsigned refcnt; }; @@ -73,19 +73,19 @@ */ static struct objhead * -hsl_lookup(const char *key1, const char *key2, struct objhead *nobj) +hsl_lookup(const char *b, const char *e, struct objhead *nobj) { struct hsl_entry *he, *he2; - int i; + int i, l; + l = e - b; LOCK(&hsl_mutex); TAILQ_FOREACH(he, &hsl_head, list) { - i = strcmp(key1, he->key1); - if (i < 0) + if (l > he->keylen) continue; - if (i > 0) - break; - i = strcmp(key2, he->key2); + if (l < he->keylen) + break;; + i = memcmp(b, he->key, l); if (i < 0) continue; if (i > 0) @@ -100,14 +100,13 @@ UNLOCK(&hsl_mutex); return (NULL); } - he2 = calloc(sizeof *he2, 1); + he2 = calloc(sizeof *he2 + l, 1); XXXAN(he2); he2->obj = nobj; he2->refcnt = 1; - he2->key1 = strdup(key1); - XXXAN(he2->key1); - he2->key2 = strdup(key2); - XXXAN(he2->key2); + he2->key = (void*)(he2 + 1); + he2->keylen = l; + memcpy(he2->key, b, l); nobj->hashpriv = he2; if (he != NULL) TAILQ_INSERT_BEFORE(he, he2, list); @@ -131,8 +130,6 @@ he = obj->hashpriv; LOCK(&hsl_mutex); if (--he->refcnt == 0) { - free(he->key1); - free(he->key2); TAILQ_REMOVE(&hsl_head, he, list); free(he); ret = 0; Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-09 13:55:39 UTC (rev 1397) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-09 14:28:50 UTC (rev 1398) @@ -88,6 +88,16 @@ "}\n" "\n" "sub vcl_hash {\n" + " set req.hash += req.url;\n" +#if 1 + " set req.hash += req.http.host;\n" +#else + " if (req.http.host) {\n" + " set req.hash += req.http.host;\n" + " } else {\n" + " set req.hash += server.ip;\n" + " }\n" +#endif " hash;\n" "}\n" "\n" From des at projects.linpro.no Wed May 9 14:37:04 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 9 May 2007 16:37:04 +0200 (CEST) Subject: r1399 - trunk/varnish-cache Message-ID: <20070509143704.8AAF91EC529@projects.linpro.no> Author: des Date: 2007-05-09 16:37:04 +0200 (Wed, 09 May 2007) New Revision: 1399 Modified: trunk/varnish-cache/autogen.sh Log: Correctly detect more incompatible automake versions. Modified: trunk/varnish-cache/autogen.sh =================================================================== --- trunk/varnish-cache/autogen.sh 2007-05-09 14:28:50 UTC (rev 1398) +++ trunk/varnish-cache/autogen.sh 2007-05-09 14:37:04 UTC (rev 1399) @@ -15,7 +15,7 @@ exit 1 else case $automake_version in - 0.*|1.[0-8]) + 0.*|1.[0-8]|1.[0-8][.-]*) echo "your version of automake ($automake_version) is too old;" \ "you need 1.9 or newer." exit 1 From des at projects.linpro.no Thu May 10 11:38:32 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 10 May 2007 13:38:32 +0200 (CEST) Subject: r1400 - branches/1.0 Message-ID: <20070510113832.316831EC40E@projects.linpro.no> Author: des Date: 2007-05-10 13:38:32 +0200 (Thu, 10 May 2007) New Revision: 1400 Modified: branches/1.0/ Log: Switch from using SVK to using svnmerge to manage branches. Property changes on: branches/1.0 ___________________________________________________________________ Name: svk:merge - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1315 Name: svnmerge-integrated + /trunk/varnish-cache:1-1315 From des at projects.linpro.no Thu May 10 11:58:14 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 10 May 2007 13:58:14 +0200 (CEST) Subject: r1401 - in branches/1.0: . bin/varnishd bin/varnishhist bin/varnishlog bin/varnishncsa bin/varnishstat bin/varnishtop include lib/libvarnishapi lib/libvcl man Message-ID: <20070510115814.EA3181EC400@projects.linpro.no> Author: des Date: 2007-05-10 13:58:14 +0200 (Thu, 10 May 2007) New Revision: 1401 Modified: branches/1.0/ branches/1.0/autogen.des branches/1.0/autogen.sh branches/1.0/bin/varnishd/Makefile.am branches/1.0/bin/varnishd/cache.h branches/1.0/bin/varnishd/cache_acceptor_epoll.c branches/1.0/bin/varnishd/cache_backend.c branches/1.0/bin/varnishd/cache_center.c branches/1.0/bin/varnishd/cache_fetch.c branches/1.0/bin/varnishd/cache_hash.c branches/1.0/bin/varnishd/cache_http.c branches/1.0/bin/varnishd/cache_response.c branches/1.0/bin/varnishd/cache_vrt.c branches/1.0/bin/varnishd/heritage.h branches/1.0/bin/varnishd/mgt_child.c branches/1.0/bin/varnishd/mgt_param.c branches/1.0/bin/varnishd/mgt_vcc.c branches/1.0/bin/varnishd/rfc2616.c branches/1.0/bin/varnishd/storage_file.c branches/1.0/bin/varnishd/varnishd.1 branches/1.0/bin/varnishhist/Makefile.am branches/1.0/bin/varnishhist/varnishhist.c branches/1.0/bin/varnishlog/varnishlog.1 branches/1.0/bin/varnishlog/varnishlog.c branches/1.0/bin/varnishncsa/varnishncsa.1 branches/1.0/bin/varnishncsa/varnishncsa.c branches/1.0/bin/varnishstat/Makefile.am branches/1.0/bin/varnishtop/Makefile.am branches/1.0/configure.ac branches/1.0/include/shmlog.h branches/1.0/include/varnishapi.h branches/1.0/lib/libvarnishapi/shmlog.c branches/1.0/lib/libvcl/vcc_priv.h branches/1.0/man/vcl.7 Log: Merged revisions 1359-1387,1399 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r1359 | phk | 2007-04-19 17:17:35 +0200 (Thu, 19 Apr 2007) | 9 lines When we have some amount of a chunk header, but not all of it, we need to read more from the fd. The semantics we _really_ want for that read operation is "wait until at least one char is available, then return as many as N to us". This can be done with a combination of system calls, but it is likely just as cheap to just read one char at a time, so we do that. ........ r1360 | des | 2007-04-21 19:48:21 +0200 (Sat, 21 Apr 2007) | 2 lines Clarify synopsis / description ........ r1361 | des | 2007-04-21 19:52:44 +0200 (Sat, 21 Apr 2007) | 2 lines Style and whitespace cleanup + clarify comment explaining the log format ........ r1362 | des | 2007-04-21 23:48:56 +0200 (Sat, 21 Apr 2007) | 12 lines Major rewrite of the VSL handler for increased robustness and clarity: - Treat all request fields in a similar manner. - Mostly eliminate fixed-size buffers. - Don't print or format anything until we see ReqEnd. - If we saw a Host: header, use it to generate an absolute URI, resulting in far more useful output when processing logs from a server which handles multiple virtual hosts. ........ r1363 | des | 2007-04-22 15:09:59 +0200 (Sun, 22 Apr 2007) | 2 lines Further eliminate fixed-size buffers. ........ r1364 | des | 2007-04-24 11:39:12 +0200 (Tue, 24 Apr 2007) | 6 lines Correctly detect the presence and location of all external library we use (except for the C math library, which the C standard guarantees is always available as -lm) and more importantly, use them only where needed. This should fix the compilation issues on SuSE. ........ r1365 | des | 2007-04-24 14:23:37 +0200 (Tue, 24 Apr 2007) | 3 lines Move CFLAGS configuration to the bottom so it doesn't affect other tests. This makes --enable-werror work again. ........ r1366 | des | 2007-04-24 14:36:58 +0200 (Tue, 24 Apr 2007) | 3 lines Move CFLAGS configuration to the bottom so it doesn't affect other tests. This makes --enable-werror work again. ........ r1367 | des | 2007-04-24 14:37:58 +0200 (Tue, 24 Apr 2007) | 2 lines Eliminate warnings. ........ r1368 | phk | 2007-04-26 08:54:58 +0200 (Thu, 26 Apr 2007) | 5 lines Add compat trick for clock_gettime() Submitted by: Pierre Queinnec ........ r1369 | des | 2007-04-26 12:39:19 +0200 (Thu, 26 Apr 2007) | 2 lines Force CONFIG_SHELL to /bin/sh. ........ r1370 | des | 2007-05-01 19:48:56 +0200 (Tue, 01 May 2007) | 2 lines Add protective #ifdef. ........ r1371 | des | 2007-05-01 19:55:13 +0200 (Tue, 01 May 2007) | 2 lines Improve the readability and debuggability of our tag conversion tricks. ........ r1372 | des | 2007-05-01 19:55:31 +0200 (Tue, 01 May 2007) | 8 lines Two minor logging fixes: - change the type of vsl_handler()'s tag argument from unsigned int to enum shmlogtag to allow gcc to check switch statements and gdb to show its value by name rather than by number. - fix the "missing newline after VCL_call" bug in varnishlog (#95) ........ r1373 | des | 2007-05-01 20:21:53 +0200 (Tue, 01 May 2007) | 4 lines Add and document a ping_interval parameter which controls the interval at which the parent pings the child. Also document pipe_timeout, which was left out of the man page by accident. ........ r1374 | des | 2007-05-02 14:20:43 +0200 (Wed, 02 May 2007) | 4 lines Try fixing #95 again. The trick is that if we get a new SLT_VCL_call while the F_INVCL flag is set, we need to insert a newline before the entry for the new VCL_call. ........ r1375 | des | 2007-05-02 15:56:24 +0200 (Wed, 02 May 2007) | 2 lines Correct the URL in the error page. ........ r1376 | des | 2007-05-02 16:37:42 +0200 (Wed, 02 May 2007) | 6 lines Don't try to lock the objhead mutex if we don't have an objhead. Doing so caused the Varnish child to die immediately after sending its 503 response if the backend didn't respond. Reviewed by: phk ........ r1377 | des | 2007-05-03 10:41:01 +0200 (Thu, 03 May 2007) | 2 lines s/expl/reason/ to circumvent a bug in gcc 3. ........ r1378 | des | 2007-05-03 10:45:33 +0200 (Thu, 03 May 2007) | 2 lines s/expl/reason/ to circumvent a bug in gcc 3. ........ r1379 | des | 2007-05-03 10:48:43 +0200 (Thu, 03 May 2007) | 2 lines s/expl/reason/ to circumvent a bug in gcc 3. ........ r1380 | des | 2007-05-03 10:48:51 +0200 (Thu, 03 May 2007) | 2 lines s/expl/explicit/ to circumvent a bug in gcc 3. ........ r1381 | phk | 2007-05-04 14:25:23 +0200 (Fri, 04 May 2007) | 2 lines Fix error reporting with -C ........ r1382 | des | 2007-05-04 14:28:56 +0200 (Fri, 04 May 2007) | 2 lines Apply the workaround suggested in #102. ........ r1383 | des | 2007-05-05 16:08:01 +0200 (Sat, 05 May 2007) | 2 lines Whitespace nits ........ r1384 | des | 2007-05-05 16:09:23 +0200 (Sat, 05 May 2007) | 2 lines Typo in comment ........ r1385 | des | 2007-05-05 16:35:58 +0200 (Sat, 05 May 2007) | 2 lines Remove superfluous vsb_printf() argument ........ r1386 | des | 2007-05-05 16:44:37 +0200 (Sat, 05 May 2007) | 2 lines Look for s-maxage before max-age. This may need to be revisited. ........ r1387 | des | 2007-05-06 20:57:26 +0200 (Sun, 06 May 2007) | 2 lines Update the default configuration. ........ r1399 | des | 2007-05-09 16:37:04 +0200 (Wed, 09 May 2007) | 2 lines Correctly detect more incompatible automake versions. ........ Property changes on: branches/1.0 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1315 + /trunk/varnish-cache:1-1315,1359-1387,1399 Modified: branches/1.0/autogen.des =================================================================== --- branches/1.0/autogen.des 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/autogen.des 2007-05-10 11:58:14 UTC (rev 1401) @@ -7,8 +7,10 @@ ./autogen.sh +CONFIG_SHELL=/bin/sh \ ./configure \ --enable-developer-warnings \ --enable-debugging-symbols \ --enable-dependency-tracking \ + --enable-werror \ --prefix=/opt/varnish Modified: branches/1.0/autogen.sh =================================================================== --- branches/1.0/autogen.sh 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/autogen.sh 2007-05-10 11:58:14 UTC (rev 1401) @@ -15,7 +15,7 @@ exit 1 else case $automake_version in - 0.*|1.[0-8]) + 0.*|1.[0-8]|1.[0-8][.-]*) echo "your version of automake ($automake_version) is too old;" \ "you need 1.9 or newer." exit 1 Modified: branches/1.0/bin/varnishd/Makefile.am =================================================================== --- branches/1.0/bin/varnishd/Makefile.am 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/Makefile.am 2007-05-10 11:58:14 UTC (rev 1401) @@ -61,4 +61,5 @@ varnishd_LDADD = \ $(top_builddir)/lib/libcompat/libcompat.a \ $(top_builddir)/lib/libvarnish/libvarnish.la \ - $(top_builddir)/lib/libvcl/libvcl.la + $(top_builddir)/lib/libvcl/libvcl.la \ + ${DL_LIBS} ${RT_LIBS} ${PTHREAD_LIBS} Modified: branches/1.0/bin/varnishd/cache.h =================================================================== --- branches/1.0/bin/varnishd/cache.h 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/cache.h 2007-05-10 11:58:14 UTC (rev 1401) @@ -275,7 +275,7 @@ unsigned handling; unsigned char wantbody; int err_code; - const char *err_expl; + const char *err_reason; TAILQ_ENTRY(sess) list; @@ -428,7 +428,7 @@ #endif /* cache_response.c */ -void RES_Error(struct sess *sp, int code, const char *expl); +void RES_Error(struct sess *sp, int code, const char *reason); void RES_WriteObj(struct sess *sp); /* cache_vcl.c */ Modified: branches/1.0/bin/varnishd/cache_acceptor_epoll.c =================================================================== --- branches/1.0/bin/varnishd/cache_acceptor_epoll.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/cache_acceptor_epoll.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -70,13 +70,6 @@ AZ(epoll_ctl(epfd, EPOLL_CTL_DEL, fd, &ev)); } -static void -vca_rcvhdev(struct sess *sp) -{ - - CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); -} - static void * vca_main(void *arg) { Modified: branches/1.0/bin/varnishd/cache_backend.c =================================================================== --- branches/1.0/bin/varnishd/cache_backend.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/cache_backend.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -48,6 +48,10 @@ #include #include +#ifndef HAVE_CLOCK_GETTIME +#include "compat/clock_gettime.h" +#endif + #include "heritage.h" #include "shmlog.h" #include "cache.h" Modified: branches/1.0/bin/varnishd/cache_center.c =================================================================== --- branches/1.0/bin/varnishd/cache_center.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/cache_center.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -74,6 +74,10 @@ #include "compat/clock_gettime.h" #endif +#ifndef HAVE_SRANDOMDEV +#include "compat/srandomdev.h" +#endif + #include "shmlog.h" #include "vcl.h" #include "cache.h" @@ -243,9 +247,9 @@ cnt_error(struct sess *sp) { - RES_Error(sp, sp->err_code, sp->err_expl); + RES_Error(sp, sp->err_code, sp->err_reason); sp->err_code = 0; - sp->err_expl = NULL; + sp->err_reason = NULL; sp->step = STP_DONE; return (0); } @@ -653,7 +657,8 @@ VCL_recv_method(sp); - sp->wantbody = !strcmp(sp->http->hd[HTTP_HDR_REQ].b, "GET"); + sp->wantbody = (!strcmp(sp->http->hd[HTTP_HDR_REQ].b, "GET") || + !strcmp(sp->http->hd[HTTP_HDR_REQ].b, "POST")); switch(sp->handling) { case VCL_RET_LOOKUP: /* XXX: discard req body, if any */ Modified: branches/1.0/bin/varnishd/cache_fetch.c =================================================================== --- branches/1.0/bin/varnishd/cache_fetch.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/cache_fetch.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -113,7 +113,22 @@ /* If we didn't succeed, add to buffer, try again */ if (q == NULL || q == buf || *q != '\n') { xxxassert(be > bp); - i = http_Read(hp, fd, bp, be - bp); + /* + * The sematics we need here is "read until you have + * received at least one character, but feel free to + * return up to (be-bp) if they are available, but do + * not wait for those extra characters. + * + * The canonical way to do that is to do a blocking + * read(2) of one char, then change to nonblocking, + * read as many as we find, then change back to + * blocking reads again. + * + * Hardly much more efficient and certainly a good + * deal more complex than reading a single character + * at a time. + */ + i = http_Read(hp, fd, bp, 1); if (i <= 0) return (-1); bp += i; @@ -296,13 +311,13 @@ /* XXX: cleanup */ return (1); } + CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); sp->obj->entered = time(NULL); - assert(sp->obj->busy != 0); if (http_GetHdr(vc->http, H_Last_Modified, &b)) Modified: branches/1.0/bin/varnishd/cache_hash.c =================================================================== --- branches/1.0/bin/varnishd/cache_hash.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/cache_hash.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -185,6 +185,7 @@ void HSH_Unbusy(struct object *o) { + struct objhead *oh; struct sess *sp; CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC); @@ -192,9 +193,14 @@ assert(o->refcnt > 0); if (o->cacheable) EXP_Insert(o); - LOCK(&o->objhead->mtx); + oh = o->objhead; + if (oh != NULL) { + CHECK_OBJ(oh, OBJHEAD_MAGIC); + LOCK(&oh->mtx); + } o->busy = 0; - UNLOCK(&o->objhead->mtx); + if (oh != NULL) + UNLOCK(&oh->mtx); while (1) { sp = TAILQ_FIRST(&o->waitinglist); if (sp == NULL) Modified: branches/1.0/bin/varnishd/cache_http.c =================================================================== --- branches/1.0/bin/varnishd/cache_http.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/cache_http.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -77,7 +77,7 @@ }; static enum shmlogtag -T(struct http *hp, enum httptag t) +http2shmlog(struct http *hp, enum httptag t) { CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); @@ -86,9 +86,13 @@ return (logmtx[hp->logtag][t]); } -#define WSLH(wx, ax, bx, cx, dx) \ - WSLR(wx, T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e); +static void +WSLH(struct worker *w, enum httptag t, unsigned xid, struct http *hp, int hdr) +{ + WSLR(w, http2shmlog(hp, t), xid, hp->hd[hdr].b, hp->hd[hdr].e); +} + /*--------------------------------------------------------------------*/ void @@ -372,7 +376,7 @@ hp->nhd++; } else { VSL_stats->losthdr++; - WSLR(w, T(hp, HTTP_T_LostHeader), fd, p, q); + WSLR(w, http2shmlog(hp, HTTP_T_LostHeader), fd, p, q); } } assert(hp->t <= hp->v); @@ -803,7 +807,7 @@ CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); if (to->nhd >= HTTP_HDR_MAX) { VSL_stats->losthdr++; - WSL(w, T(to, HTTP_T_LostHeader), fd, "%s", hdr); + WSL(w, http2shmlog(to, HTTP_T_LostHeader), fd, "%s", hdr); return; } http_seth(w, fd, to, to->nhd++, HTTP_T_Header, hdr); @@ -823,7 +827,7 @@ n = vsnprintf(to->f, l, fmt, ap); if (n + 1 > l || to->nhd >= HTTP_HDR_MAX) { VSL_stats->losthdr++; - WSL(w, T(to, HTTP_T_LostHeader), fd, "%s", to->f); + WSL(w, http2shmlog(to, HTTP_T_LostHeader), fd, "%s", to->f); } else { assert(to->f < to->e); to->hd[to->nhd].b = to->f; Modified: branches/1.0/bin/varnishd/cache_response.c =================================================================== --- branches/1.0/bin/varnishd/cache_response.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/cache_response.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -48,7 +48,7 @@ static struct http_msg { unsigned nbr; const char *txt; - const char *expl; + const char *reason; } http_msg[] = { { 101, "Switching Protocols" }, { 200, "OK" }, @@ -96,7 +96,7 @@ /*--------------------------------------------------------------------*/ void -RES_Error(struct sess *sp, int code, const char *expl) +RES_Error(struct sess *sp, int code, const char *reason) { char buf[40]; struct vsb *sb; @@ -115,13 +115,13 @@ if (mp->nbr > code) break; msg = mp->txt; - if (expl == NULL) - expl = mp->expl; + if (reason == NULL) + reason = mp->reason; break; } - if (expl == NULL) - expl = msg; - AN(expl); + if (reason == NULL) + reason = msg; + AN(reason); AN(msg); sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); @@ -144,11 +144,11 @@ " \r\n" " \r\n"); vsb_printf(sb, "

Error %03d %s

\r\n", code, msg); - vsb_printf(sb, "

%s

\r\n", expl); - vsb_printf(sb, "

Guru Meditation:

\r\n", expl); + vsb_printf(sb, "

%s

\r\n", reason); + vsb_printf(sb, "

Guru Meditation:

\r\n"); vsb_printf(sb, "

XID: %u

\r\n", sp->xid); vsb_cat(sb, - " Varnish\r\n" + " Varnish\r\n" " \r\n" "\r\n"); vsb_finish(sb); @@ -158,7 +158,7 @@ WSL(sp->wrk, SLT_TxStatus, sp->id, "%d", code); WSL(sp->wrk, SLT_TxProtocol, sp->id, "HTTP/1.1"); WSL(sp->wrk, SLT_TxResponse, sp->id, msg); - vca_close_session(sp, expl); + vca_close_session(sp, reason); vsb_delete(sb); } @@ -255,7 +255,7 @@ sp->wrk->acct.bodybytes += st->len; #ifdef HAVE_SENDFILE /* - * XXX: the overhead of setting up senddile is not + * XXX: the overhead of setting up sendfile is not * XXX: epsilon and maybe not even delta, so avoid * XXX: engaging sendfile for small objects. * XXX: Should use getpagesize() ? Modified: branches/1.0/bin/varnishd/cache_vrt.c =================================================================== --- branches/1.0/bin/varnishd/cache_vrt.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/cache_vrt.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -47,13 +47,13 @@ /*--------------------------------------------------------------------*/ void -VRT_error(struct sess *sp, unsigned code, const char *expl) +VRT_error(struct sess *sp, unsigned code, const char *reason) { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - WSL(sp->wrk, SLT_Debug, 0, "VCL_error(%u, %s)", code, expl); + WSL(sp->wrk, SLT_Debug, 0, "VCL_error(%u, %s)", code, reason); sp->err_code = code; - sp->err_expl = expl; + sp->err_reason = reason; } /*--------------------------------------------------------------------*/ Modified: branches/1.0/bin/varnishd/heritage.h =================================================================== --- branches/1.0/bin/varnishd/heritage.h 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/heritage.h 2007-05-10 11:58:14 UTC (rev 1401) @@ -111,6 +111,9 @@ /* HTTP proto behaviour */ unsigned backend_http11; unsigned client_http11; + + /* Ping interval */ + unsigned ping_interval; }; extern volatile struct params *params; Modified: branches/1.0/bin/varnishd/mgt_child.c =================================================================== --- branches/1.0/bin/varnishd/mgt_child.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/mgt_child.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -214,13 +214,15 @@ ev_listen = e; AZ(ev_poker); - e = ev_new(); - XXXAN(e); - e->timeout = 3.0; - e->callback = child_poker; - e->name = "child poker"; - AZ(ev_add(mgt_evb, e)); - ev_poker = e; + if (params->ping_interval > 0) { + e = ev_new(); + XXXAN(e); + e->timeout = params->ping_interval; + e->callback = child_poker; + e->name = "child poker"; + AZ(ev_add(mgt_evb, e)); + ev_poker = e; + } mgt_cli_start_child(heritage.fds[0], heritage.fds[3]); AZ(close(heritage.fds[1])); Modified: branches/1.0/bin/varnishd/mgt_param.c =================================================================== --- branches/1.0/bin/varnishd/mgt_param.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/mgt_param.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -50,7 +50,7 @@ struct parspec { const char *name; tweak_t *func; - const char *expl; + const char *descr; const char *def; const char *units; }; @@ -407,6 +407,15 @@ /*--------------------------------------------------------------------*/ +static void +tweak_ping_interval(struct cli *cli, struct parspec *par, const char *arg) +{ + (void)par; + tweak_generic_uint(cli, ¶ms->ping_interval, arg, 0, UINT_MAX); +} + +/*--------------------------------------------------------------------*/ + /* * Make sure to end all lines with either a space or newline of the * formatting will go haywire. @@ -566,6 +575,12 @@ "backend response." EXPERIMENTAL, "off", "bool" }, + { "ping_interval", tweak_ping_interval, + "Interval between pings from parent to child.\n" + "Zero will disable pinging entirely, which makes " + "it possible to attach a debugger to the child.\n" + MUST_RESTART, + "3", "seconds" }, { NULL, NULL, NULL } }; @@ -602,7 +617,7 @@ if (av[2] != NULL) { cli_out(cli, "%-20s Default is %s\n", "", pp->def); /* Format text to 72 col width */ - for (p = pp->expl; *p != '\0'; ) { + for (p = pp->descr; *p != '\0'; ) { q = strchr(p, '\n'); if (q == NULL) q = strchr(p, '\0'); Modified: branches/1.0/bin/varnishd/mgt_vcc.c =================================================================== --- branches/1.0/bin/varnishd/mgt_vcc.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/mgt_vcc.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -314,15 +314,15 @@ AN(buf); if (C_flag) { csrc = VCC_Compile(sb, buf, NULL); - fputs(csrc, stdout); - return (0); + if (csrc != NULL) + fputs(csrc, stdout); } vf = mgt_VccCompile(sb, buf, NULL); free(buf); } else if (C_flag) { csrc = VCC_CompileFile(sb, f_arg); - fputs(csrc, stdout); - return (0); + if (csrc != NULL) + fputs(csrc, stdout); } else { vf = mgt_VccCompileFile(sb, f_arg); } @@ -333,6 +333,8 @@ return (1); } vsb_delete(sb); + if (C_flag) + return (0); vp = mgt_vcc_add("boot", vf); vp->active = 1; return (0); Modified: branches/1.0/bin/varnishd/rfc2616.c =================================================================== --- branches/1.0/bin/varnishd/rfc2616.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/rfc2616.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -109,7 +109,8 @@ retirement_age = INT_MAX; u1 = u2 = 0; - if (http_GetHdrField(hp, H_Cache_Control, "max-age", &p)) { + if (http_GetHdrField(hp, H_Cache_Control, "s-maxage", &p) || + http_GetHdrField(hp, H_Cache_Control, "max-age", &p)) { u1 = strtoul(p, NULL, 0); u2 = 0; if (http_GetHdr(hp, H_Age, &p)) { Modified: branches/1.0/bin/varnishd/storage_file.c =================================================================== --- branches/1.0/bin/varnishd/storage_file.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/storage_file.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -119,7 +119,7 @@ uintmax_t l; unsigned bs; char suff[2]; - int i, expl; + int i, explicit; off_t o; struct stat st; @@ -140,7 +140,7 @@ i = sscanf(size, "%ju%1s", &l, suff); /* can return -1, 0, 1 or 2 */ - expl = i; + explicit = i; if (i == 0) { fprintf(stderr, "Error: (-sfile) size \"%s\" not understood\n", size); @@ -215,7 +215,7 @@ exit (2); } - if (expl < 3 && sizeof(void *) == 4 && l > INT32_MAX) { + if (explicit < 3 && sizeof(void *) == 4 && l > INT32_MAX) { fprintf(stderr, "NB: Limiting size to 2GB on 32 bit architecture to" " prevent running out of\naddress space." Modified: branches/1.0/bin/varnishd/varnishd.1 =================================================================== --- branches/1.0/bin/varnishd/varnishd.1 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishd/varnishd.1 2007-05-10 11:58:14 UTC (rev 1401) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd October 6, 2006 +.Dd May 1, 2007 .Dt VARNISHD 1 .Os .Sh NAME @@ -351,7 +351,15 @@ will start dropping new connections. .Pp The default is 100%. +.It Va ping_interval +The interval at which the parent process will ping the child process +to ascertain that it is still present and functioning. +.Pp +The default is 3 seconds. .It Va pipe_timeout +The time to wait before dropping an idle pipe mode connection. +.Pp +The default is 60 seconds. .It Va sendfile_threshold The size threshold beyond which documents are sent to the client using .Xr sendfile 2 Modified: branches/1.0/bin/varnishhist/Makefile.am =================================================================== --- branches/1.0/bin/varnishhist/Makefile.am 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishhist/Makefile.am 2007-05-10 11:58:14 UTC (rev 1401) @@ -14,4 +14,5 @@ $(top_builddir)/lib/libcompat/libcompat.a \ $(top_builddir)/lib/libvarnish/libvarnish.la \ $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \ - -lm -lcurses + -lm \ + ${CURSES_LIBS} Modified: branches/1.0/bin/varnishhist/varnishhist.c =================================================================== --- branches/1.0/bin/varnishhist/varnishhist.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishhist/varnishhist.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -112,7 +112,7 @@ } static int -h_hist(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) +h_hist(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { double b; int i, j; Modified: branches/1.0/bin/varnishlog/varnishlog.1 =================================================================== --- branches/1.0/bin/varnishlog/varnishlog.1 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishlog/varnishlog.1 2007-05-10 11:58:14 UTC (rev 1401) @@ -28,12 +28,12 @@ .\" .\" $Id$ .\" -.Dd October 5, 2006 +.Dd April 21, 2007 .Dt VARNISHLOG 1 .Os .Sh NAME .Nm varnishlog -.Nd HTTP accelerator log watcher +.Nd Display Varnish logs .Sh SYNOPSIS .Nm .Op Fl a Modified: branches/1.0/bin/varnishlog/varnishlog.c =================================================================== --- branches/1.0/bin/varnishlog/varnishlog.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishlog/varnishlog.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -94,7 +94,7 @@ } static int -h_order(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) +h_order(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { (void)priv; @@ -113,7 +113,10 @@ flg[fd] |= F_MATCH; switch (tag) { case SLT_VCL_call: - flg[fd] |= F_INVCL; + if (flg[fd] & F_INVCL) + vsb_cat(ob[fd], "\n"); + else + flg[fd] |= F_INVCL; vsb_printf(ob[fd], "%5d %-12s %c %.*s", fd, VSL_tags[tag], ((spec & VSL_S_CLIENT) ? 'c' : \ Modified: branches/1.0/bin/varnishncsa/varnishncsa.1 =================================================================== --- branches/1.0/bin/varnishncsa/varnishncsa.1 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishncsa/varnishncsa.1 2007-05-10 11:58:14 UTC (rev 1401) @@ -28,12 +28,12 @@ .\" .\" $Id$ .\" -.Dd October 5, 2006 +.Dd April 21, 2007 .Dt VARNISHNCSA 1 .Os .Sh NAME .Nm varnishncsa -.Nd Generate NCSA logs +.Nd Display Varnish logs in Apache / NCSA combined log format .Sh SYNOPSIS .Nm .Op Fl a @@ -53,7 +53,7 @@ .Nm utility reads .Xr varnishd 1 -shared memory logs and presents them in the NCSA "common" or +shared memory logs and presents them in the Apache / NCSA "combined" log format. .Pp The following options are available: Modified: branches/1.0/bin/varnishncsa/varnishncsa.c =================================================================== --- branches/1.0/bin/varnishncsa/varnishncsa.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishncsa/varnishncsa.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -29,193 +29,319 @@ * * $Id$ * - * Program that will get data from the shared memory log. When it has the data - * it will order the data based on the sessionid. When the data is ordered - * and session is finished it will write the data into disk. Logging will be - * in NCSA extended/combined access log format. + * Obtain log data from the shared memory log, order it by session ID, and + * display it in Apache / NCSA combined log format: * - * "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" + * %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i" * + * where the fields are defined as follows: + * + * %h Client host name or IP address (always the latter) + * %l Client user ID as reported by identd (always "-") + * %u User ID if using HTTP authentication, or "-" + * %t Date and time of request + * %r Request line + * %s Status code + * %b Length of reply body, or "-" + * %{Referer}i Contents of "Referer" request header + * %{User-agent}i Contents of "User-agent" request header + * + * Actually, we cheat a little and replace "%r" with something close to + * "%m http://%{Host}i%U%q %H", where the additional fields are: + * + * %m Request method + * %{Host}i Contents of "Host" request header + * %U URL path + * %q Query string + * %H Protocol version + * * TODO: - Log in any format one wants * - Maybe rotate/compress log */ -#include +#include #include #include +#include +#include #include -#include +#include #include -#include -#include "compat/vis.h" - -#include "vsb.h" - #include "libvarnish.h" #include "shmlog.h" #include "varnishapi.h" +#include "vsb.h" static struct logline { - char df_h[4 * (3 + 1)]; /* Datafield for %h (IP adress) */ - char df_s[4]; /* Datafield for %s, Status */ - char df_b[12]; /* Datafield for %b, Bytes */ - char *df_R; /* Datafield for %{Referer} */ - char *df_U; /* Datafield for %{User-agent} */ - char *df_RU; /* Datafield for %l, Remote user */ - int bogus_req; /* bogus request */ - struct vsb *sb; -} *ll[65536]; + char *df_H; /* %H, Protocol version */ + char *df_Host; /* %{Host}i */ + char *df_Referer; /* %{Referer}i */ + char *df_Uq; /* %U%q, URL path and query string */ + char *df_User_agent; /* %{User-agent}i */ + char *df_b; /* %b, Bytes */ + char *df_h; /* %h (host name / IP adress)*/ + char *df_m; /* %m, Request method*/ + char *df_s; /* %s, Status */ + char *df_u; /* %u, Remote user */ + int bogus; /* bogus request */ +} **ll; -/* Check if string starts with pfx */ +static size_t nll; + static int -ispfx(const char *ptr, unsigned len, const char *pfx) +isprefix(const char *str, const char *prefix, const char *end, const char **next) { - unsigned l; - l = strlen(pfx); - if (l > len) + while (str < end && *str && *prefix && + tolower((int)*str) == tolower((int)*prefix)) + ++str, ++prefix; + if (*str && *str != ' ') return (0); - if (strncasecmp(ptr, pfx, l)) - return (0); + if (next) { + while (str < end && *str && *str == ' ') + ++str; + *next = str; + } return (1); } +/* + * Returns a copy of the first consecutive sequence of non-space + * characters in the string. + */ +static char * +trimfield(const char *str, const char *end) +{ + size_t len; + char *p; + + /* skip leading space */ + while (str < end && *str && *str == ' ') + ++str; + + /* seek to end of field */ + for (len = 0; &str[len] < end && str[len]; ++len) + if (str[len] == ' ') + break; + + /* copy and return */ + p = malloc(len + 1); + assert(p != NULL); + memcpy(p, str, len); + p[len] = '\0'; + return (p); +} + +/* + * Returns a copy of the entire string with leading and trailing spaces + * trimmed. + */ +static char * +trimline(const char *str, const char *end) +{ + size_t len; + char *p; + + /* skip leading space */ + while (str < end && *str && *str == ' ') + ++str; + + /* seek to end of string */ + for (len = 0; &str[len] < end && str[len]; ++len) + /* nothing */ ; + + /* trim trailing space */ + while (str[len - 1] == ' ') + --len; + + /* copy and return */ + p = malloc(len + 1); + assert(p != NULL); + memcpy(p, str, len); + p[len] = '\0'; + return (p); +} + static int -extended_log_format(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) +h_ncsa(void *priv, enum shmlogtag tag, unsigned fd, + unsigned len, unsigned spec, const char *ptr) { - const char *p; + const char *end, *next; char *q; FILE *fo; time_t t; long l; - unsigned lu; struct tm tm; char tbuf[40]; - char rubuf[128]; struct logline *lp; + end = ptr + len; + if (!(spec &VSL_S_CLIENT)) return (0); + if (fd >= nll) { + struct logline **newll = ll; + size_t newnll = nll; + + while (fd >= newnll) + newnll += newnll + 1; + newll = realloc(newll, newnll * sizeof *newll); + assert(newll != NULL); + memset(newll + nll, 0, (newnll - nll) * sizeof *newll); + ll = newll; + nll = newnll; + } if (ll[fd] == NULL) { ll[fd] = calloc(sizeof *ll[fd], 1); assert(ll[fd] != NULL); - ll[fd]->sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); - assert(ll[fd]->sb != NULL); - strcpy(ll[fd]->df_h, "-"); } lp = ll[fd]; switch (tag) { - - case SLT_SessionOpen: case SLT_ReqStart: - for (p = ptr, q = lp->df_h; *p && *p != ' ';) - *q++ = *p++; - *q = '\0'; - vsb_clear(lp->sb); + if (lp->df_h != NULL) + lp->bogus = 1; + else + lp->df_h = trimfield(ptr, end); break; case SLT_RxRequest: - if (ispfx(ptr, len, "HEAD")) { - vsb_bcat(lp->sb, ptr, len); - } else if (ispfx(ptr, len, "POST")) { - vsb_bcat(lp->sb, ptr, len); - } else if (ispfx(ptr, len, "GET")) { - vsb_bcat(lp->sb, ptr, len); - } else if (ispfx(ptr, len, "PURGE")) { - vsb_bcat(lp->sb, ptr, len); - } else { - lp->bogus_req = 1; - } + if (lp->df_m != NULL) + lp->bogus = 1; + else + lp->df_m = trimline(ptr, end); break; case SLT_RxURL: - vsb_cat(lp->sb, " "); - vsb_bcat(lp->sb, ptr, len); + if (lp->df_Uq != NULL) + lp->bogus = 1; + else + lp->df_Uq = trimline(ptr, end); break; case SLT_RxProtocol: - vsb_cat(lp->sb, " "); - vsb_bcat(lp->sb, ptr, len); + if (lp->df_H != NULL) + lp->bogus = 1; + else + lp->df_H = trimline(ptr, end); break; case SLT_TxStatus: - strcpy(lp->df_s, ptr); + if (lp->df_s != NULL) + lp->bogus = 1; + else + lp->df_s = trimline(ptr, end); break; case SLT_RxHeader: - if (ispfx(ptr, len, "user-agent:")) - lp->df_U = strdup(ptr + 12); - else if (ispfx(ptr, len, "referer:")) - lp->df_R = strdup(ptr + 9); - else if (ispfx(ptr, len, "authorization:")) - lp->df_RU = strdup(ptr + 21); + if (isprefix(ptr, "user-agent:", end, &next)) + lp->df_User_agent = trimline(next, end); + else if (isprefix(ptr, "referer:", end, &next)) + lp->df_Referer = trimline(next, end); + else if (isprefix(ptr, "authorization:", end, &next) && + isprefix(next, "basic", end, &next)) + lp->df_u = trimline(next, end); + else if (isprefix(ptr, "host:", end, &next)) + lp->df_Host = trimline(next, end); break; case SLT_Length: - if (strcmp(ptr, "0")) - strcpy(lp->df_b, ptr); + if (lp->df_b != NULL) + lp->bogus = 1; else - strcpy(lp->df_b, "-"); + lp->df_b = trimline(ptr, end); break; default: break; } + if (tag != SLT_ReqEnd) return (0); - fo = priv; - assert(1 == sscanf(ptr, "%*u %*u.%*u %ld.", &l)); - t = l; - localtime_r(&t, &tm); - + if (sscanf(ptr, "%*u %*u.%*u %ld.", &l) != 1) + lp->bogus = 1; + else + t = l; - - strftime(tbuf, sizeof tbuf, "%d/%b/%Y:%T %z", &tm); - fprintf(fo, "%s", lp->df_h); - - if (lp->df_RU != NULL){ - base64_init(); - lu = sizeof rubuf; - base64_decode(rubuf, lu, lp->df_RU); - q = strchr(rubuf, ':'); - if (q != NULL){ - *q = '\0'; + if (!lp->bogus) { + fo = priv; + + /* %h */ + fprintf(fo, "%s ", lp->df_h ? lp->df_h : "-"); + + /* %l */ + fprintf(fo, "- "); + + /* %u: decode authorization string */ + if (lp->df_u != NULL) { + char *rubuf; + size_t rulen; + + base64_init(); + rulen = ((strlen(lp->df_u) + 3) * 4) / 3; + rubuf = malloc(rulen); + assert(rubuf != NULL); + base64_decode(rubuf, rulen, lp->df_u); + q = strchr(rubuf, ':'); + if (q != NULL) + *q = '\0'; + fprintf(fo, "%s ", rubuf); + free(rubuf); + } else { + fprintf(fo, "- "); } - fprintf(fo, " %s", rubuf); - free(lp->df_RU); - lp->df_RU = NULL; - } - else{ - fprintf(fo, " -"); - } - fprintf(fo, " - [%s]", tbuf); - vsb_finish(lp->sb); - fprintf(fo, " \"%s\"", vsb_data(lp->sb)); - fprintf(fo, " %s", lp->df_s); - fprintf(fo, " %s", lp->df_b); - if (lp->df_R != NULL) { - fprintf(fo, " \"%s\"", lp->df_R); - free(lp->df_R); - lp->df_R = NULL; - } - else { - fprintf(fo, " \"-\""); - } - if (lp->df_U != NULL) { - fprintf(fo, " \"%s\"", lp->df_U); - free(lp->df_U); - lp->df_U = NULL; + /* %t */ + localtime_r(&t, &tm); + strftime(tbuf, sizeof tbuf, "[%d/%b/%Y:%T %z]", &tm); + fprintf(fo, "%s ", tbuf); + + /* + * Fake "%r". This would be a lot easier if Varnish + * normalized the request URL. + */ + fprintf(fo, "\"%s ", lp->df_m); + if (lp->df_Host) { + if (strncmp(lp->df_Host, "http://", 7) != 0) + fprintf(fo, "http://"); + fprintf(fo, lp->df_Host); + } + fprintf(fo, "%s ", lp->df_Uq); + fprintf(fo, "%s\" ", lp->df_H); + + /* %s */ + fprintf(fo, "%s ", lp->df_s); + + /* %b */ + fprintf(fo, "%s ", lp->df_b); + + /* %{Referer}i */ + fprintf(fo, "\"%s\" ", + lp->df_Referer ? lp->df_Referer : "-"); + + /* %{User-agent}i */ + fprintf(fo, "\"%s\"\n", + lp->df_User_agent ? lp->df_User_agent : "-"); } - else { - fprintf(fo, " \"-\""); - } - fprintf(fo, "\n"); + /* clean up */ +#define freez(x) do { if (x) free(x); x = NULL; } while (0); + freez(lp->df_H); + freez(lp->df_Host); + freez(lp->df_Referer); + freez(lp->df_Uq); + freez(lp->df_User_agent); + freez(lp->df_b); + freez(lp->df_h); + freez(lp->df_m); + freez(lp->df_s); + freez(lp->df_u); +#undef freez + lp->bogus = 0; + return (0); } @@ -248,12 +374,13 @@ static void usage(void) { + fprintf(stderr, "usage: varnishncsa %s [-aV] [-w file]\n", VSL_ARGS); exit(1); } int -main(int argc, char **argv) +main(int argc, char *argv[]) { int i, c; struct VSL_data *vd; @@ -297,7 +424,7 @@ of = stdout; } - while (VSL_Dispatch(vd, extended_log_format, of) == 0) { + while (VSL_Dispatch(vd, h_ncsa, of) == 0) { if (fflush(of) != 0) { perror(ofn); exit(1); @@ -311,4 +438,3 @@ exit(0); } - Modified: branches/1.0/bin/varnishstat/Makefile.am =================================================================== --- branches/1.0/bin/varnishstat/Makefile.am 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishstat/Makefile.am 2007-05-10 11:58:14 UTC (rev 1401) @@ -14,4 +14,4 @@ $(top_builddir)/lib/libcompat/libcompat.a \ $(top_builddir)/lib/libvarnish/libvarnish.la \ $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \ - -lcurses + ${CURSES_LIBS} ${RT_LIBS} Modified: branches/1.0/bin/varnishtop/Makefile.am =================================================================== --- branches/1.0/bin/varnishtop/Makefile.am 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/bin/varnishtop/Makefile.am 2007-05-10 11:58:14 UTC (rev 1401) @@ -14,4 +14,4 @@ $(top_builddir)/lib/libcompat/libcompat.a \ $(top_builddir)/lib/libvarnish/libvarnish.la \ $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \ - -lcurses + ${CURSES_LIBS} Modified: branches/1.0/configure.ac =================================================================== --- branches/1.0/configure.ac 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/configure.ac 2007-05-10 11:58:14 UTC (rev 1401) @@ -12,20 +12,6 @@ AM_INIT_AUTOMAKE -# Compiler flags (assume GCC). -# This section *must* come before AC_PROG_CC / AC_PROG_CPP. -CFLAGS="${CFLAGS:--O2 -pipe}" -DEVELOPER_CFLAGS="-Wall -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" -AC_ARG_ENABLE(developer-warnings, - AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), - CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}") -AC_ARG_ENABLE(debugging-symbols, - AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]), - CFLAGS="${CFLAGS} -O0 -g -fno-inline") -AC_ARG_ENABLE(werror, - AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]), - CFLAGS="${CFLAGS} -Werror") - # Checks for programs. AC_GNU_SOURCE AC_PROG_CC @@ -35,10 +21,33 @@ AC_PROG_MAKE_SET # Checks for libraries. +save_LIBS="${LIBS}" +LIBS="" AC_CHECK_LIB(rt, clock_gettime) +RT_LIBS="${LIBS}" +LIBS="${save_LIBS}" +AC_SUBST(RT_LIBS) + +save_LIBS="${LIBS}" +LIBS="" AC_CHECK_LIB(dl, dlopen) -#AC_SEARCH_LIBS(initscr, [curses ncurses]) +DL_LIBS="${LIBS}" +LIBS="${save_LIBS}" +AC_SUBST(DL_LIBS) + +save_LIBS="${LIBS}" +LIBS="" +AC_SEARCH_LIBS(initscr, [curses ncurses]) +CURSES_LIBS="${LIBS}" +LIBS="${save_LIBS}" +AC_SUBST(CURSES_LIBS) + +save_LIBS="${LIBS}" +LIBS="" AC_SEARCH_LIBS(pthread_create, [thr pthread c_r]) +PTHREAD_LIBS="${LIBS}" +LIBS="${save_LIBS}" +AC_SUBST(PTHREAD_LIBS) # Checks for header files. AC_HEADER_STDC @@ -79,13 +88,31 @@ AC_CHECK_FUNCS([strlcat strlcpy]) AC_CHECK_FUNCS([strndup]) AC_CHECK_FUNCS([vis strvis strvisx]) + +save_LIBS="${LIBS}" +LIBS="${LIBS} ${RT_LIBS}" AC_CHECK_FUNCS([clock_gettime]) +LIBS="${save_LIBS}" # Check which mechanism to use for the acceptor AC_CHECK_FUNCS([kqueue]) AC_CHECK_FUNCS([epoll_ctl]) AC_CHECK_FUNCS([poll]) +# Now that we're done using the compiler to look for functions and +# libraries, set CFLAGS to what we want them to be for our own code +DEVELOPER_CFLAGS="-Wall -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" +AC_ARG_ENABLE(developer-warnings, + AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), + CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}") +AC_ARG_ENABLE(debugging-symbols, + AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]), + CFLAGS="${CFLAGS} -O0 -g -fno-inline") +AC_ARG_ENABLE(werror, + AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]), + CFLAGS="${CFLAGS} -Werror") + +# Generate output AC_CONFIG_FILES([ Makefile bin/Makefile Modified: branches/1.0/include/shmlog.h =================================================================== --- branches/1.0/include/shmlog.h 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/include/shmlog.h 2007-05-10 11:58:14 UTC (rev 1401) @@ -33,6 +33,9 @@ * NB: THIS IS NOT A PUBLIC API TO VARNISH! */ +#ifndef SHMLOG_H_INCLUDED +#define SHMLOG_H_INCLUDED + #define SHMLOG_FILENAME "/tmp/_.vsl" #include @@ -82,3 +85,5 @@ #undef SLTM SLT_WRAPMARKER = 255 }; + +#endif Modified: branches/1.0/include/varnishapi.h =================================================================== --- branches/1.0/include/varnishapi.h 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/include/varnishapi.h 2007-05-10 11:58:14 UTC (rev 1401) @@ -32,6 +32,8 @@ #ifndef VARNISHAPI_H_INCLUDED #define VARNISHAPI_H_INCLUDED +#include "shmlog.h" + #define V_DEAD __attribute__ ((noreturn)) /* base64.c */ @@ -39,7 +41,7 @@ int base64_decode(char *d, unsigned dlen, const char *s); /* shmlog.c */ -typedef int vsl_handler(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr); +typedef int vsl_handler(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr); #define VSL_S_CLIENT (1 << 0) #define VSL_S_BACKEND (1 << 1) #define VSL_ARGS "bCcdI:i:r:X:x:" Modified: branches/1.0/lib/libvarnishapi/shmlog.c =================================================================== --- branches/1.0/lib/libvarnishapi/shmlog.c 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/lib/libvarnishapi/shmlog.c 2007-05-10 11:58:14 UTC (rev 1401) @@ -284,14 +284,14 @@ if (vd->regincl != NULL) { rm.rm_so = 0; rm.rm_eo = p[1]; - i = regexec(vd->regincl, p + 4, 1, &rm, 0); + i = regexec(vd->regincl, (char *)p + 4, 1, &rm, 0); if (i == REG_NOMATCH) continue; } if (vd->regexcl != NULL) { rm.rm_so = 0; rm.rm_eo = p[1]; - i = regexec(vd->regexcl, p + 4, 1, &rm, 0); + i = regexec(vd->regexcl, (char *)p + 4, 1, &rm, 0); if (i != REG_NOMATCH) continue; } @@ -318,7 +318,7 @@ if (func(priv, p[0], u, p[1], vd->map[u] & (VSL_S_CLIENT|VSL_S_BACKEND), - p + 4)) + (char *)p + 4)) return (1); } } @@ -326,7 +326,7 @@ /*--------------------------------------------------------------------*/ int -VSL_H_Print(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) +VSL_H_Print(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { FILE *fo = priv; Modified: branches/1.0/lib/libvcl/vcc_priv.h =================================================================== --- branches/1.0/lib/libvcl/vcc_priv.h 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/lib/libvcl/vcc_priv.h 2007-05-10 11:58:14 UTC (rev 1401) @@ -43,4 +43,4 @@ void vcl_init_tnames(void); void vcl_output_lang_h(struct vsb *sb); -#define PF(t) ((t)->e - (t)->b), (t)->b +#define PF(t) (int)((t)->e - (t)->b), (t)->b Modified: branches/1.0/man/vcl.7 =================================================================== --- branches/1.0/man/vcl.7 2007-05-10 11:38:32 UTC (rev 1400) +++ branches/1.0/man/vcl.7 2007-05-10 11:58:14 UTC (rev 1401) @@ -400,17 +400,17 @@ error; } if (!obj.cacheable) { - insert_pass; + pass; } if (resp.http.Set-Cookie) { - insert_pass; + pass; } insert; } sub vcl_timeout { discard; -}; +} .Ed .Pp The following example shows how to support multiple sites running on From ingvar at projects.linpro.no Thu May 10 19:24:34 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Thu, 10 May 2007 21:24:34 +0200 (CEST) Subject: r1402 - branches/1.0/redhat Message-ID: <20070510192434.33E2B1EC2BA@projects.linpro.no> Author: ingvar Date: 2007-05-10 21:24:34 +0200 (Thu, 10 May 2007) New Revision: 1402 Added: branches/1.0/redhat/varnish.logrotate branches/1.0/redhat/varnishlog.initrc Modified: branches/1.0/redhat/varnish.initrc branches/1.0/redhat/varnish.spec branches/1.0/redhat/varnish.sysconfig Log: - Updates after fedora review request - Added logrotate and init scripts for varnishlog Modified: branches/1.0/redhat/varnish.initrc =================================================================== --- branches/1.0/redhat/varnish.initrc 2007-05-10 11:58:14 UTC (rev 1401) +++ branches/1.0/redhat/varnish.initrc 2007-05-10 19:24:34 UTC (rev 1402) @@ -5,7 +5,7 @@ # chkconfig: - 90 10 # description: HTTP accelerator # processname: varnishd -# config: /etc/varnish.conf +# config: /etc/varnish/vcl.conf # pidfile: /var/run/varnish/varnishd.pid # Source function library. @@ -24,9 +24,12 @@ -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ -s ${VARNISH_BACKEND_STORAGE}" - mkdir -p /var/run/varnish 2>/dev/null +# Open files (usually 1024, which is way too small for varnish) +[ ! "${NFILES}" ] && NFILES="131072" +ulimit -n ${NFILES} + # See how we were called. case "$1" in start) @@ -66,8 +69,15 @@ $0 start RETVAL=$? ;; + condrestart) + if [ -f /var/lock/subsys/varnish ]; then + $0 stop + $0 start + RETVAL=$? + fi + ;; *) - echo "Usage: $0 {start|stop|status|restart}" + echo "Usage: $0 {start|stop|status|restart|condrestart}" exit 1 esac Added: branches/1.0/redhat/varnish.logrotate =================================================================== --- branches/1.0/redhat/varnish.logrotate 2007-05-10 11:58:14 UTC (rev 1401) +++ branches/1.0/redhat/varnish.logrotate 2007-05-10 19:24:34 UTC (rev 1402) @@ -0,0 +1,8 @@ +/var/log/varnish/varnish.log { + missingok + notifempty + sharedscripts + postrotate + /bin/kill -HUP `cat /var/run/varnish/varnishlog.pid 2>/dev/null` 2> /dev/null || true + endscript +} Modified: branches/1.0/redhat/varnish.spec =================================================================== --- branches/1.0/redhat/varnish.spec 2007-05-10 11:58:14 UTC (rev 1401) +++ branches/1.0/redhat/varnish.spec 2007-05-10 19:24:34 UTC (rev 1402) @@ -8,7 +8,7 @@ Group: System Environment/Daemons URL: http://www.varnish-cache.org/ #Packager: Ingvar Hagelund -Source0: %{name}-%{version}.tar.gz +Source0: http://kent.dl.sourceforge.net/sourceforge/varnish/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc gcc-c++ ncurses-devel libtool autoconf automake Requires: gcc ncurses kernel >= 2.6.0 %{lib_name} = %version-%{release} Modified: branches/1.0/redhat/varnish.sysconfig =================================================================== --- branches/1.0/redhat/varnish.sysconfig 2007-05-10 11:58:14 UTC (rev 1401) +++ branches/1.0/redhat/varnish.sysconfig 2007-05-10 19:24:34 UTC (rev 1402) @@ -49,3 +49,6 @@ # Set default ttl in secounds VARNISH_TTL=120 +# The Maximum number of open files (ulimit) +# Default : 131072 (system default is usually 1024) +NFILES=131072 Added: branches/1.0/redhat/varnishlog.initrc =================================================================== --- branches/1.0/redhat/varnishlog.initrc 2007-05-10 11:58:14 UTC (rev 1401) +++ branches/1.0/redhat/varnishlog.initrc 2007-05-10 19:24:34 UTC (rev 1402) @@ -0,0 +1,90 @@ +#! /bin/sh +# +# varnishlog Control the varnish HTTP accelerator logging daemon +# +# chkconfig: - 90 10 +# description: HTTP accelerator logging daemon +# processname: varnishlog +# config: +# pidfile: /var/run/varnish/varnishlog.pid + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PROCNAME=varnishlog + +. /etc/sysconfig/varnish + +if [ "$LOGDAEMON" = "" ] +then + DAEMON="/usr/bin/varnishlog" +else + DAEMON="$LOGDAEMON" +fi + +if [ "$LOGPIDFILE" = "" ] +then + PIDFILE="/var/run/varnish/varnishlog.pid" +else + PIDFILE="$LOGPIDFILE" +fi + +if [ "$LOGFILE" = "" ]; then LOGFILE="/var/log/varnish/varnish.log"; fi + +DAEMON_OPTS="-a -w ${LOGFILE} -D -p $PIDFILE" + +mkdir -p /var/run/varnish 2>/dev/null + +# See how we were called. +case "$1" in + start) + echo -n "Starting varnish logging daeon: " + daemon $DAEMON "$DAEMON_OPTS" + sleep 1 + pkill -0 $PROCNAME + RETVAL=$? + if [ $RETVAL -eq 0 ] + then + echo_success + touch /var/lock/subsys/varnishlog + else + echo_failure + fi + echo + ;; + stop) + echo -n "Stopping varnish logging daemon: " + killproc $DAEMON + RETVAL=$? + if [ $RETVAL -eq 0 ] + then + echo_success + rm -f /var/lock/subsys/varnishlog + else + echo_failure + fi + echo + ;; + status) + status $PROCNAME + RETVAL=$? + ;; + restart|reload) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart) + if [ -f /var/lock/subsys/varnishlog ]; then + $0 stop + $0 start + RETVAL=$? + fi + ;; + *) + echo "Usage: $0 {start|stop|status|restart|condrestart}" + exit 1 +esac + +exit $RETVAL From ingvar at projects.linpro.no Fri May 11 07:51:11 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Fri, 11 May 2007 09:51:11 +0200 (CEST) Subject: r1403 - trunk/varnish-cache/redhat Message-ID: <20070511075111.C0EBE1EC52C@projects.linpro.no> Author: ingvar Date: 2007-05-11 09:51:11 +0200 (Fri, 11 May 2007) New Revision: 1403 Added: trunk/varnish-cache/redhat/varnish.logrotate trunk/varnish-cache/redhat/varnishlog.initrc Modified: trunk/varnish-cache/redhat/varnish.initrc trunk/varnish-cache/redhat/varnish.spec trunk/varnish-cache/redhat/varnish.sysconfig Log: * Fri May 11 2007 Ingvar Hagelund - 1.0.svn-20070511 - Threw latest changes into svn trunk - Removed the conversion of manpages into utf8. They are all utf8 in trunk Modified: trunk/varnish-cache/redhat/varnish.initrc =================================================================== --- trunk/varnish-cache/redhat/varnish.initrc 2007-05-10 19:24:34 UTC (rev 1402) +++ trunk/varnish-cache/redhat/varnish.initrc 2007-05-11 07:51:11 UTC (rev 1403) @@ -5,7 +5,7 @@ # chkconfig: - 90 10 # description: HTTP accelerator # processname: varnishd -# config: /etc/varnish.conf +# config: /etc/varnish/vcl.conf # pidfile: /var/run/varnish/varnishd.pid # Source function library. @@ -24,9 +24,12 @@ -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ -s ${VARNISH_BACKEND_STORAGE}" - mkdir -p /var/run/varnish 2>/dev/null +# Open files (usually 1024, which is way too small for varnish) +[ ! "${NFILES}" ] && NFILES="131072" +ulimit -n ${NFILES} + # See how we were called. case "$1" in start) @@ -38,7 +41,7 @@ if [ $RETVAL -eq 0 ] then echo_success - touch /var/lock/subsys/varnishd + touch /var/lock/subsys/varnish else echo_failure fi @@ -51,7 +54,7 @@ if [ $RETVAL -eq 0 ] then echo_success - rm -f /var/lock/subsys/varnishd + rm -f /var/lock/subsys/varnish else echo_failure fi @@ -66,8 +69,15 @@ $0 start RETVAL=$? ;; + condrestart) + if [ -f /var/lock/subsys/varnish ]; then + $0 stop + $0 start + RETVAL=$? + fi + ;; *) - echo "Usage: $0 {start|stop|status|restart}" + echo "Usage: $0 {start|stop|status|restart|condrestart}" exit 1 esac Added: trunk/varnish-cache/redhat/varnish.logrotate =================================================================== --- trunk/varnish-cache/redhat/varnish.logrotate 2007-05-10 19:24:34 UTC (rev 1402) +++ trunk/varnish-cache/redhat/varnish.logrotate 2007-05-11 07:51:11 UTC (rev 1403) @@ -0,0 +1,8 @@ +/var/log/varnish/varnish.log { + missingok + notifempty + sharedscripts + postrotate + /bin/kill -HUP `cat /var/run/varnish/varnishlog.pid 2>/dev/null` 2> /dev/null || true + endscript +} Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-05-10 19:24:34 UTC (rev 1402) +++ trunk/varnish-cache/redhat/varnish.spec 2007-05-11 07:51:11 UTC (rev 1403) @@ -1,116 +1,194 @@ -Summary: Varnish is a high-performance HTTP accelerator. +Summary: Varnish is a high-performance HTTP accelerator Name: varnish -Version: 1.0.3 -Release: 7 +Version: 1.0.svn +Release: 20070511%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ -Packager: Ingvar Hagelund -Source0: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: gcc gcc-c++ ncurses-devel libtool autoconf automake -Requires: gcc ncurses kernel >= 2.6.0 -Vendor: Linpro AS, http://www.linpro.no/ +Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: ncurses-devel +Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} +Requires: logrotate +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +# Varnish actually needs gcc installed to work. It uses the C compiler +# at runtime to compile the VCL configuration files. This is by design. +Requires: gcc + %description -This is the Varnish high-performance HTTP accelerator. -Documentation and additional information about Varnish is available on -the following web sites: - http://www.varnish-cache.org/ Official web site - http://varnish.projects.linpro.no/ Developer site and wiki +This is the Varnish high-performance HTTP accelerator. Documentation +wiki and additional information about Varnish is available on the following +web site: http://www.varnish-cache.org/ -Technical questions about Varnish and this release should be addressed -to . +%package libs +Summary: Libraries for %{name} +Group: System Environment/Libraries +BuildRequires: ncurses-devel +#Requires: ncurses -Questions about commercial support and services related to Varnish -should be addressed to . +%description libs +Libraries for %{name}. +Varnish is a high-performance HTTP accelerator. -Copyright (c) 2006 Verdens Gang AS -Copyright (c) 2006 Linpro AS -All rights reserved. -Author: Poul-Henning Kamp +## Removed the -devel package for now +#%package devel +#Summary: Development libraries for %{name} +#Group: System Environment/Libraries +#BuildRequires: ncurses-devel +#Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} +# +#%description devel +#Development libraries for %{name}. +#Varnish is a high-performance HTTP accelerator %prep %setup -q +./autogen.sh + %build -rm -rf $RPM_BUILD_ROOT -./autogen.sh -%configure --sbindir=/usr/sbin -%{__make} +# Remove "--disable static" if you want to build static libraries +# (ie for the devel package) +%configure --sbindir=/usr/sbin --disable-static +# We have to remove rpath - not allowed in Fedora +# (This problem only visible on 64 bit arches) +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +%{__make} %{?_smp_mflags} + sed -e ' s/8080/80/g ' etc/vcl.conf > redhat/vcl.conf %install -%{makeinstall} -mkdir -p %{buildroot}%{_sbindir} -mkdir -p %{buildroot}%{_docdir}/%{name}-%{version} -mkdir -p %{buildroot}/etc/varnish -mkdir -p %{buildroot}/etc/init.d -mkdir -p %{buildroot}/etc/sysconfig +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} INSTALL="install -p" + +# None of these for fedora +find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';' + +# Remove this line to build the devel package +find %{buildroot}/%{_libdir}/ -name '*.so' -type l -exec rm -f {} ';' + mkdir -p %{buildroot}/var/lib/varnish +mkdir -p %{buildroot}/var/log/varnish -%{__install} -m 0644 INSTALL %{buildroot}%{_docdir}/%{name}-%{version}/INSTALL -%{__install} -m 0644 LICENSE %{buildroot}%{_docdir}/%{name}-%{version}/LICENSE -%{__install} -m 0644 README %{buildroot}%{_docdir}/%{name}-%{version}/README -%{__install} -m 0644 ChangeLog %{buildroot}%{_docdir}/%{name}-%{version}/ChangeLog -%{__install} -m 0644 redhat/README.redhat %{buildroot}%{_docdir}/%{name}-%{version}/README.redhat -%{__install} -m 0644 redhat/vcl.conf %{buildroot}%{_docdir}/%{name}-%{version}/vcl.example.conf -%{__install} -m 0644 redhat/vcl.conf %{buildroot}/etc/varnish/vcl.conf -%{__install} -m 0644 redhat/varnish.sysconfig %{buildroot}/etc/sysconfig/varnish -%{__install} -m 0755 redhat/varnish.initrc %{buildroot}/etc/init.d/varnish +%{__install} -D -m 0644 redhat/vcl.conf %{buildroot}%{_sysconfdir}/varnish/vcl.conf +%{__install} -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish +%{__install} -D -m 0644 redhat/varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish +%{__install} -D -m 0755 redhat/varnish.initrc %{buildroot}%{_sysconfdir}/init.d/varnish +%{__install} -D -m 0755 redhat/varnishlog.initrc %{buildroot}%{_sysconfdir}/init.d/varnishlog %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files %defattr(-,root,root,-) -%{_sbindir}/varnishd -%{_bindir}/varnishhist -%{_bindir}/varnishlog -%{_bindir}/varnishncsa -%{_bindir}/varnishstat -%{_bindir}/varnishtop -%{_libdir}/libvarnish.a -%{_libdir}/libvarnish.la -%{_libdir}/libvarnish.so.0.0.0 -%{_libdir}/libvarnish.so.0 -%{_libdir}/libvarnishapi.a -%{_libdir}/libvarnishapi.la -%{_libdir}/libvarnishapi.so.0.0.0 -%{_libdir}/libvarnishapi.so.0 -%{_libdir}/libvcl.a -%{_libdir}/libvcl.la -%{_libdir}/libvcl.so.0.0.0 -%{_libdir}/libvcl.so.0 +%{_sbindir}/* +%{_bindir}/* %{_var}/lib/varnish -%{_mandir}/man1/varnishd.1.gz -%{_mandir}/man1/varnishhist.1.gz -%{_mandir}/man1/varnishlog.1.gz -%{_mandir}/man1/varnishncsa.1.gz -%{_mandir}/man1/varnishstat.1.gz -%{_mandir}/man1/varnishtop.1.gz -%{_mandir}/man7/vcl.7.gz +%{_var}/log/varnish +%{_mandir}/man1/*.1* +%{_mandir}/man7/*.7* +%doc INSTALL LICENSE README redhat/README.redhat redhat/vcl.conf ChangeLog +%dir %{_sysconfdir}/varnish/ +%config(noreplace) %{_sysconfdir}/varnish/vcl.conf +%config(noreplace) %{_sysconfdir}/sysconfig/varnish +%config(noreplace) %{_sysconfdir}/logrotate.d/varnish +%{_sysconfdir}/init.d/varnish +%{_sysconfdir}/init.d/varnishlog -%doc %{_docdir}/%{name}-%{version}/INSTALL -%doc %{_docdir}/%{name}-%{version}/LICENSE -%doc %{_docdir}/%{name}-%{version}/README -%doc %{_docdir}/%{name}-%{version}/README.redhat -%doc %{_docdir}/%{name}-%{version}/ChangeLog -%doc %{_docdir}/%{name}-%{version}/vcl.example.conf -%config(noreplace) /etc/varnish/vcl.conf -%config /etc/init.d/varnish -%config /etc/sysconfig/varnish +%files libs +%defattr(-,root,root,-) +%{_libdir}/*.so.* +%doc LICENSE +## Removed the -devel package for now +#%files devel +#%defattr(-,root,root,-) +#%{_libdir}/libvarnish.so +#%{_libdir}/libvarnishapi.so +#%{_libdir}/libvcl.so + %post /sbin/chkconfig --add varnish -/sbin/chkconfig --list varnish +/sbin/chkconfig --add varnishlog +%preun +if [ $1 -lt 1 ]; then + /sbin/service varnish stop > /dev/null 2>/dev/null + /sbin/service varnishlog stop > /dev/null 2>/dev/null + /sbin/chkconfig --del varnish + /sbin/chkconfig --del varnishlog +fi + +%postun +if [ $1 -ge 1 ]; then + /sbin/service varnish condrestart > /dev/null 2>/dev/null + /sbin/service varnishlog condrestart > /dev/null 2>/dev/null +fi + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + %changelog -* Thu Oct 19 2006 Ingvar Hagelund - 1.02-7 +* Fri May 11 2007 Ingvar Hagelund - 1.0.svn-20070511 +- Threw latest changes into svn trunk +- Removed the conversion of manpages into utf8. They are all utf8 in trunk + +* Wed May 09 2007 Ingvar Hagelund - 1.0.3-7 +- Simplified the references to the subpackage names +- Added init and logrotate scripts for varnishlog + +* Mon Apr 23 2007 Ingvar Hagelund - 1.0.3-6 +- Removed unnecessary macro lib_name +- Fixed inconsistently use of brackets in macros +- Added a condrestart to the initscript +- All manfiles included, not just the compressed ones +- Removed explicit requirement for ncurses. rpmbuild figures out the + correct deps by itself. +- Added ulimit value to initskript and sysconfig file +- Many thanks to Matthias Saou for valuable input + +* Mon Apr 16 2007 Ingvar Hagelund - 1.0.3-5 +- Added the dist tag +- Exchanged RPM_BUILD_ROOT variable for buildroot macro +- Removed stripping of binaries to create a meaningful debug package +- Removed BuildRoot and URL from subpackages, they are picked from the + main package +- Removed duplication of documentation files in the subpackages +- 'chkconfig --list' removed from post script +- Package now includes _sysconfdir/varnish/ +- Trimmed package information +- Removed static libs and .so-symlinks. They can be added to a -devel package + later if anybody misses them + +* Wed Feb 28 2007 Ingvar Hagelund - 1.0.3-4 +- More small specfile fixes for Fedora Extras Package + Review Request, see bugzilla ticket 230275 +- Removed rpath (only visible on x86_64 and probably ppc64) + +* Tue Feb 27 2007 Ingvar Hagelund - 1.0.3-3 +- Made post-1.0.3 changes into a patch to the upstream tarball +- First Fedora Extras Package Review Request + +* Fri Feb 23 2007 Ingvar Hagelund - 1.0.3-2 +- A few other small changes to make rpmlint happy + +* Thu Feb 22 2007 Ingvar Hagelund - 1.0.3-1 +- New release 1.0.3. See the general ChangeLog +- Splitted the package into varnish, libvarnish1 and + libvarnish1-devel + +* Thu Oct 19 2006 Ingvar Hagelund - 1.0.2-7 - Added a Vendor tag -* Thu Oct 19 2006 Ingvar Hagelund - 1.02-6 + +* Thu Oct 19 2006 Ingvar Hagelund - 1.0.2-6 - Added redhat subdir to svn - Removed default vcl config file. Used the new upstream variant instead. - Based build on svn. Running autogen.sh as start of build. Also added @@ -119,11 +197,14 @@ - Changed the sysconfig script to include a lot more nice features. Most of these were ripped from the Debian package. Updated initscript to reflect this. -* Tue Oct 10 2006 Ingvar Hagelund - 1.01-3 + +* Tue Oct 10 2006 Ingvar Hagelund - 1.0.1-3 - Moved Red Hat specific files to its own subdirectory + * Tue Sep 26 2006 Ingvar Hagelund - 1.0.1-2 - Added gcc requirement. - Changed to an even simpler example vcl in to /etc/varnish (thanks, perbu) - Added a sysconfig entry + * Fri Sep 22 2006 Ingvar Hagelund - 1.0.1-1 - Initial build. Modified: trunk/varnish-cache/redhat/varnish.sysconfig =================================================================== --- trunk/varnish-cache/redhat/varnish.sysconfig 2007-05-10 19:24:34 UTC (rev 1402) +++ trunk/varnish-cache/redhat/varnish.sysconfig 2007-05-11 07:51:11 UTC (rev 1403) @@ -49,3 +49,6 @@ # Set default ttl in secounds VARNISH_TTL=120 +# The Maximum number of open files (ulimit) +# Default : 131072 (system default is usually 1024) +NFILES=131072 Added: trunk/varnish-cache/redhat/varnishlog.initrc =================================================================== --- trunk/varnish-cache/redhat/varnishlog.initrc 2007-05-10 19:24:34 UTC (rev 1402) +++ trunk/varnish-cache/redhat/varnishlog.initrc 2007-05-11 07:51:11 UTC (rev 1403) @@ -0,0 +1,90 @@ +#! /bin/sh +# +# varnishlog Control the varnish HTTP accelerator logging daemon +# +# chkconfig: - 90 10 +# description: HTTP accelerator logging daemon +# processname: varnishlog +# config: +# pidfile: /var/run/varnish/varnishlog.pid + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 +PROCNAME=varnishlog + +. /etc/sysconfig/varnish + +if [ "$LOGDAEMON" = "" ] +then + DAEMON="/usr/bin/varnishlog" +else + DAEMON="$LOGDAEMON" +fi + +if [ "$LOGPIDFILE" = "" ] +then + PIDFILE="/var/run/varnish/varnishlog.pid" +else + PIDFILE="$LOGPIDFILE" +fi + +if [ "$LOGFILE" = "" ]; then LOGFILE="/var/log/varnish/varnish.log"; fi + +DAEMON_OPTS="-a -w ${LOGFILE} -D -p $PIDFILE" + +mkdir -p /var/run/varnish 2>/dev/null + +# See how we were called. +case "$1" in + start) + echo -n "Starting varnish logging daeon: " + daemon $DAEMON "$DAEMON_OPTS" + sleep 1 + pkill -0 $PROCNAME + RETVAL=$? + if [ $RETVAL -eq 0 ] + then + echo_success + touch /var/lock/subsys/varnishlog + else + echo_failure + fi + echo + ;; + stop) + echo -n "Stopping varnish logging daemon: " + killproc $DAEMON + RETVAL=$? + if [ $RETVAL -eq 0 ] + then + echo_success + rm -f /var/lock/subsys/varnishlog + else + echo_failure + fi + echo + ;; + status) + status $PROCNAME + RETVAL=$? + ;; + restart|reload) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart) + if [ -f /var/lock/subsys/varnishlog ]; then + $0 stop + $0 start + RETVAL=$? + fi + ;; + *) + echo "Usage: $0 {start|stop|status|restart|condrestart}" + exit 1 +esac + +exit $RETVAL From ingvar at projects.linpro.no Fri May 11 08:13:03 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Fri, 11 May 2007 10:13:03 +0200 (CEST) Subject: r1404 - trunk/varnish-cache/redhat Message-ID: <20070511081303.C99B21EC529@projects.linpro.no> Author: ingvar Date: 2007-05-11 10:13:03 +0200 (Fri, 11 May 2007) New Revision: 1404 Modified: trunk/varnish-cache/redhat/varnishlog.initrc Log: Modified: trunk/varnish-cache/redhat/varnishlog.initrc =================================================================== --- trunk/varnish-cache/redhat/varnishlog.initrc 2007-05-11 07:51:11 UTC (rev 1403) +++ trunk/varnish-cache/redhat/varnishlog.initrc 2007-05-11 08:13:03 UTC (rev 1404) @@ -32,7 +32,7 @@ if [ "$LOGFILE" = "" ]; then LOGFILE="/var/log/varnish/varnish.log"; fi -DAEMON_OPTS="-a -w ${LOGFILE} -D -p $PIDFILE" +DAEMON_OPTS="-a -w ${LOGFILE} -D -P $PIDFILE" mkdir -p /var/run/varnish 2>/dev/null From ingvar at projects.linpro.no Fri May 11 08:20:17 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Fri, 11 May 2007 10:20:17 +0200 (CEST) Subject: r1405 - branches/1.0/redhat Message-ID: <20070511082017.EEA4D1EC6CC@projects.linpro.no> Author: ingvar Date: 2007-05-11 10:20:17 +0200 (Fri, 11 May 2007) New Revision: 1405 Modified: branches/1.0/redhat/varnish.spec branches/1.0/redhat/varnishlog.initrc Log: changes from fedora extras review Modified: branches/1.0/redhat/varnish.spec =================================================================== --- branches/1.0/redhat/varnish.spec 2007-05-11 08:13:03 UTC (rev 1404) +++ branches/1.0/redhat/varnish.spec 2007-05-11 08:20:17 UTC (rev 1405) @@ -1,222 +1,196 @@ -%define lib_name %{name}-libs - Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.0.3 -Release: 2 +Release: 7%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ -#Packager: Ingvar Hagelund -Source0: http://kent.dl.sourceforge.net/sourceforge/varnish/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: gcc gcc-c++ ncurses-devel libtool autoconf automake -Requires: gcc ncurses kernel >= 2.6.0 %{lib_name} = %version-%{release} -Vendor: Linpro AS, http://www.linpro.no/ +Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz +Patch0: varnish-1.0.3.redhat.patch0 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: ncurses-devel +Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} +Requires: logrotate +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +# Varnish actually needs gcc installed to work. It uses the C compiler +# at runtime to compile the VCL configuration files. This is by design. +Requires: gcc + %description This is the Varnish high-performance HTTP accelerator. Documentation -and additional information about Varnish is available on the following -web sites: +wiki and additional information about Varnish is available on the following +web site: http://www.varnish-cache.org/ - http://www.varnish-cache.org/ Official web site - http://varnish.projects.linpro.no/ Developer site and wiki +%package libs +Summary: Libraries for %{name} +Group: System Environment/Libraries +BuildRequires: ncurses-devel +#Requires: ncurses -Technical questions about Varnish and this release should be addressed -to . +%description libs +Libraries for %{name}. +Varnish is a high-performance HTTP accelerator. -Questions about commercial support and services related to Varnish -should be addressed to . +## Removed the -devel package for now +#%package devel +#Summary: Development libraries for %{name} +#Group: System Environment/Libraries +#BuildRequires: ncurses-devel +#Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} +# +#%description devel +#Development libraries for %{name}. +#Varnish is a high-performance HTTP accelerator -Copyright (c) 2006 Verdens Gang AS -Copyright (c) 2006 Linpro AS -All rights reserved. -Author: Poul-Henning Kamp - -%package -n %{lib_name} -Summary: Varnish is a high-performance HTTP accelerator -Group: System Environment/Daemons -URL: http://www.varnish-cache.org/ -BuildRequires: gcc gcc-c++ ncurses-devel libtool autoconf automake -Requires: ncurses kernel >= 2.6.0 -Vendor: Linpro AS, http://www.linpro.no/ - -%description -n %{lib_name} -The libraries of Varnish, the high-performance HTTP accelerator. -Documentation and additional information about Varnish is available on -the following web sites: - - http://www.varnish-cache.org/ Official web site - http://varnish.projects.linpro.no/ Developer site and wiki - -Technical questions about Varnish and this release should be addressed -to . - -Questions about commercial support and services related to Varnish -should be addressed to . - -Copyright (c) 2006 Verdens Gang AS -Copyright (c) 2006 Linpro AS -All rights reserved. -Author: Poul-Henning Kamp - -%package -n %{lib_name}-devel -Summary: Varnish is a high-performance HTTP accelerator -Group: System Environment/Daemons -URL: http://www.varnish-cache.org/ -BuildRequires: gcc gcc-c++ ncurses-devel libtool autoconf automake -Requires: ncurses kernel >= 2.6.0 %{lib_name} = %version-%{release} -Vendor: Linpro AS, http://www.linpro.no/ - -%description -n %{lib_name}-devel -Development files of Varnish, the high-performance HTTP accelerator. -Documentation and additional information about Varnish is available on -the following web sites: - - http://www.varnish-cache.org/ Official web site - http://varnish.projects.linpro.no/ Developer site and wiki - -Technical questions about Varnish and this release should be addressed -to . - -Questions about commercial support and services related to Varnish -should be addressed to . - -Copyright (c) 2006 Verdens Gang AS -Copyright (c) 2006 Linpro AS -All rights reserved. -Author: Poul-Henning Kamp - %prep %setup -q -for i in varnishlog varnishtop varnishd varnishstat varnishhist varnishncsa +%patch0 -p0 + +# Convert man pages to UTF-8 +for i in bin/*/*.1 man/*.7 do - iconv -f iso-8859-1 -t utf-8 < bin/$i/$i.1 > bin/$i/$i.1.utf8 - rm -f bin/$i/$i.1 - mv bin/$i/$i.1.utf8 bin/$i/$i.1 + iconv -f iso-8859-1 -t utf-8 $i > $i.1.utf8 + rm -f $i && mv $i.1.utf8 $i done -iconv -f iso-8859-1 -t utf-8 < man/vcl.7 > man/vcl.7.utf8 -rm -f man/vcl.7 -mv man/vcl.7.utf8 man/vcl.7 %build -./autogen.sh -%configure --sbindir=/usr/sbin -%{__make} +# Remove "--disable static" if you want to build static libraries +# (ie for the devel package) +%configure --sbindir=/usr/sbin --disable-static + +# We have to remove rpath - not allowed in Fedora +# (This problem only visible on 64 bit arches) +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +#%{__make} %{?_smp_mflags} +%{__make} + sed -e ' s/8080/80/g ' etc/vcl.conf > redhat/vcl.conf %install -rm -rf $RPM_BUILD_ROOT -%{makeinstall} -strip %{buildroot}%{_sbindir}/varnishd -strip %{buildroot}%{_bindir}/varnishhist -strip %{buildroot}%{_bindir}/varnishlog -strip %{buildroot}%{_bindir}/varnishncsa -strip %{buildroot}%{_bindir}/varnishstat -strip %{buildroot}%{_bindir}/varnishtop +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} INSTALL="install -p" -strip %{buildroot}%{_libdir}/libvarnish.so.0.0.0 -strip %{buildroot}%{_libdir}/libvarnishapi.so.0.0.0 -strip %{buildroot}%{_libdir}/libvcl.so.0.0.0 +# None of these for fedora +find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';' -mkdir -p %{buildroot}%{_docdir}/%{name}-%{version} -mkdir -p %{buildroot}/etc/varnish -mkdir -p %{buildroot}/etc/init.d -mkdir -p %{buildroot}/etc/sysconfig +# Remove this line to build the devel package +find %{buildroot}/%{_libdir}/ -name '*.so' -type l -exec rm -f {} ';' + mkdir -p %{buildroot}/var/lib/varnish +mkdir -p %{buildroot}/var/log/varnish -%{__install} -m 0644 INSTALL %{buildroot}%{_docdir}/%{name}-%{version}/INSTALL -%{__install} -m 0644 LICENSE %{buildroot}%{_docdir}/%{name}-%{version}/LICENSE -%{__install} -m 0644 README %{buildroot}%{_docdir}/%{name}-%{version}/README -%{__install} -m 0644 ChangeLog %{buildroot}%{_docdir}/%{name}-%{version}/ChangeLog -%{__install} -m 0644 redhat/README.redhat %{buildroot}%{_docdir}/%{name}-%{version}/README.redhat -%{__install} -m 0644 redhat/vcl.conf %{buildroot}%{_docdir}/%{name}-%{version}/vcl.example.conf -%{__install} -m 0644 redhat/vcl.conf %{buildroot}/etc/varnish/vcl.conf -%{__install} -m 0644 redhat/varnish.sysconfig %{buildroot}/etc/sysconfig/varnish -%{__install} -m 0755 redhat/varnish.initrc %{buildroot}/etc/init.d/varnish +%{__install} -D -m 0644 redhat/vcl.conf %{buildroot}%{_sysconfdir}/varnish/vcl.conf +%{__install} -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish +%{__install} -D -m 0644 redhat/varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish +%{__install} -D -m 0755 redhat/varnish.initrc %{buildroot}%{_sysconfdir}/init.d/varnish +%{__install} -D -m 0755 redhat/varnishlog.initrc %{buildroot}%{_sysconfdir}/init.d/varnishlog %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files %defattr(-,root,root,-) -%{_sbindir}/varnishd -%{_bindir}/varnishhist -%{_bindir}/varnishlog -%{_bindir}/varnishncsa -%{_bindir}/varnishstat -%{_bindir}/varnishtop +%{_sbindir}/* +%{_bindir}/* %{_var}/lib/varnish -%{_mandir}/man1/varnishd.1.gz -%{_mandir}/man1/varnishhist.1.gz -%{_mandir}/man1/varnishlog.1.gz -%{_mandir}/man1/varnishncsa.1.gz -%{_mandir}/man1/varnishstat.1.gz -%{_mandir}/man1/varnishtop.1.gz -%{_mandir}/man7/vcl.7.gz -%doc %{_docdir}/%{name}-%{version}/INSTALL -%doc %{_docdir}/%{name}-%{version}/LICENSE -%doc %{_docdir}/%{name}-%{version}/README -%doc %{_docdir}/%{name}-%{version}/README.redhat -%doc %{_docdir}/%{name}-%{version}/ChangeLog -%doc %{_docdir}/%{name}-%{version}/vcl.example.conf -%config(noreplace) /etc/varnish/vcl.conf -%config(noreplace) /etc/sysconfig/varnish -/etc/init.d/varnish +%{_var}/log/varnish +%{_mandir}/man1/*.1* +%{_mandir}/man7/*.7* +%doc INSTALL LICENSE README redhat/README.redhat redhat/vcl.conf ChangeLog +%dir %{_sysconfdir}/varnish/ +%config(noreplace) %{_sysconfdir}/varnish/vcl.conf +%config(noreplace) %{_sysconfdir}/sysconfig/varnish +%config(noreplace) %{_sysconfdir}/logrotate.d/varnish +%{_sysconfdir}/init.d/varnish +%{_sysconfdir}/init.d/varnishlog -%files -n %{lib_name} +%files libs %defattr(-,root,root,-) -%{_libdir}/libvarnish.so.0.0.0 -%{_libdir}/libvarnish.so.0 -%{_libdir}/libvarnishapi.so.0.0.0 -%{_libdir}/libvarnishapi.so.0 -%{_libdir}/libvcl.so.0.0.0 -%{_libdir}/libvcl.so.0 -%doc %{_docdir}/%{name}-%{version}/INSTALL -%doc %{_docdir}/%{name}-%{version}/LICENSE -%doc %{_docdir}/%{name}-%{version}/README -%doc %{_docdir}/%{name}-%{version}/README.redhat -%doc %{_docdir}/%{name}-%{version}/ChangeLog +%{_libdir}/*.so.* +%doc LICENSE -%files -n %{lib_name}-devel -%defattr(-,root,root,-) -%{_libdir}/libvarnish.a -%{_libdir}/libvarnish.la -%{_libdir}/libvarnish.so -%{_libdir}/libvarnishapi.a -%{_libdir}/libvarnishapi.la -%{_libdir}/libvarnishapi.so -%{_libdir}/libvcl.a -%{_libdir}/libvcl.la -%{_libdir}/libvcl.so -%doc %{_docdir}/%{name}-%{version}/INSTALL -%doc %{_docdir}/%{name}-%{version}/LICENSE -%doc %{_docdir}/%{name}-%{version}/README -%doc %{_docdir}/%{name}-%{version}/README.redhat -%doc %{_docdir}/%{name}-%{version}/ChangeLog +## Removed the -devel package for now +#%files devel +#%defattr(-,root,root,-) +#%{_libdir}/libvarnish.so +#%{_libdir}/libvarnishapi.so +#%{_libdir}/libvcl.so %post /sbin/chkconfig --add varnish -/sbin/chkconfig --list varnish %preun -/sbin/service varnish stop -/sbin/chkconfig --del varnish +if [ $1 -lt 1 ]; then + /sbin/service varnish stop > /dev/null 2>/dev/null + /sbin/service varnishlog stop > /dev/null 2>/dev/null + /sbin/chkconfig --del varnish + /sbin/chkconfig --del varnishlog +fi -%post -n %{lib_name} -p /sbin/ldconfig +%postun +if [ $1 -ge 1 ]; then + /sbin/service varnish condrestart > /dev/null 2>/dev/null + /sbin/service varnishlog condrestart > /dev/null 2>/dev/null +fi -%postun -n %{lib_name} -p /sbin/ldconfig +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + %changelog +* Wed May 09 2007 Ingvar Hagelund - 1.0.3-7 +- Simplified the references to the subpackage names +- Added init and logrotate scripts for varnishlog + +* Mon Apr 23 2007 Ingvar Hagelund - 1.0.3-6 +- Removed unnecessary macro lib_name +- Fixed inconsistently use of brackets in macros +- Added a condrestart to the initscript +- All manfiles included, not just the compressed ones +- Removed explicit requirement for ncurses. rpmbuild figures out the + correct deps by itself. +- Added ulimit value to initskript and sysconfig file +- Many thanks to Matthias Saou for valuable input + +* Mon Apr 16 2007 Ingvar Hagelund - 1.0.3-5 +- Added the dist tag +- Exchanged RPM_BUILD_ROOT variable for buildroot macro +- Removed stripping of binaries to create a meaningful debug package +- Removed BuildRoot and URL from subpackages, they are picked from the + main package +- Removed duplication of documentation files in the subpackages +- 'chkconfig --list' removed from post script +- Package now includes _sysconfdir/varnish/ +- Trimmed package information +- Removed static libs and .so-symlinks. They can be added to a -devel package + later if anybody misses them + +* Wed Feb 28 2007 Ingvar Hagelund - 1.0.3-4 +- More small specfile fixes for Fedora Extras Package + Review Request, see bugzilla ticket 230275 +- Removed rpath (only visible on x86_64 and probably ppc64) + +* Tue Feb 27 2007 Ingvar Hagelund - 1.0.3-3 +- Made post-1.0.3 changes into a patch to the upstream tarball +- First Fedora Extras Package Review Request + * Fri Feb 23 2007 Ingvar Hagelund - 1.0.3-2 - A few other small changes to make rpmlint happy + * Thu Feb 22 2007 Ingvar Hagelund - 1.0.3-1 - New release 1.0.3. See the general ChangeLog - Splitted the package into varnish, libvarnish1 and libvarnish1-devel + * Thu Oct 19 2006 Ingvar Hagelund - 1.0.2-7 - Added a Vendor tag + * Thu Oct 19 2006 Ingvar Hagelund - 1.0.2-6 - Added redhat subdir to svn - Removed default vcl config file. Used the new upstream variant instead. @@ -226,11 +200,14 @@ - Changed the sysconfig script to include a lot more nice features. Most of these were ripped from the Debian package. Updated initscript to reflect this. + * Tue Oct 10 2006 Ingvar Hagelund - 1.0.1-3 - Moved Red Hat specific files to its own subdirectory + * Tue Sep 26 2006 Ingvar Hagelund - 1.0.1-2 - Added gcc requirement. - Changed to an even simpler example vcl in to /etc/varnish (thanks, perbu) - Added a sysconfig entry + * Fri Sep 22 2006 Ingvar Hagelund - 1.0.1-1 - Initial build. Modified: branches/1.0/redhat/varnishlog.initrc =================================================================== --- branches/1.0/redhat/varnishlog.initrc 2007-05-11 08:13:03 UTC (rev 1404) +++ branches/1.0/redhat/varnishlog.initrc 2007-05-11 08:20:17 UTC (rev 1405) @@ -32,7 +32,7 @@ if [ "$LOGFILE" = "" ]; then LOGFILE="/var/log/varnish/varnish.log"; fi -DAEMON_OPTS="-a -w ${LOGFILE} -D -p $PIDFILE" +DAEMON_OPTS="-a -w ${LOGFILE} -D -P $PIDFILE" mkdir -p /var/run/varnish 2>/dev/null From des at linpro.no Fri May 11 08:23:49 2007 From: des at linpro.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=) Date: Fri, 11 May 2007 10:23:49 +0200 Subject: r1403 - trunk/varnish-cache/redhat In-Reply-To: <20070511075111.C0EBE1EC52C@projects.linpro.no> (ingvar@projects.linpro.no's message of "Fri\, 11 May 2007 09\:51\:11 +0200 \(CEST\)") References: <20070511075111.C0EBE1EC52C@projects.linpro.no> Message-ID: <87sla3vkdm.fsf@des.linpro.no> ingvar at projects.linpro.no writes: > Modified: trunk/varnish-cache/redhat/varnish.initrc > =================================================================== > --- trunk/varnish-cache/redhat/varnish.initrc 2007-05-10 19:24:34 UTC (rev 1402) > +++ trunk/varnish-cache/redhat/varnish.initrc 2007-05-11 07:51:11 UTC (rev 1403) > @@ -5,7 +5,7 @@ > # chkconfig: - 90 10 > # description: HTTP accelerator > # processname: varnishd > -# config: /etc/varnish.conf > +# config: /etc/varnish/vcl.conf > # pidfile: /var/run/varnish/varnishd.pid I'm not sure I like the "vcl.conf" name. VCL is already an acronym for Varnish Configuration Language, so a better name might be "default.vcl". Varnish will run fine without a VCL script, so preferably no default script should be installed. If we must have a default script, it should consist only of commented-out examples. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From des at linpro.no Fri May 11 08:24:24 2007 From: des at linpro.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=) Date: Fri, 11 May 2007 10:24:24 +0200 Subject: r1405 - branches/1.0/redhat In-Reply-To: <20070511082017.EEA4D1EC6CC@projects.linpro.no> (ingvar@projects.linpro.no's message of "Fri\, 11 May 2007 10\:20\:17 +0200 \(CEST\)") References: <20070511082017.EEA4D1EC6CC@projects.linpro.no> Message-ID: <87odkrvkcn.fsf@des.linpro.no> ingvar at projects.linpro.no writes: > Log: > changes from fedora extras review For the last time, Ingvar, please to not commit to this branch. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From des at projects.linpro.no Fri May 11 11:06:03 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 13:06:03 +0200 (CEST) Subject: r1406 - trunk/varnish-cache/bin/varnishd Message-ID: <20070511110603.ADF8E1EC3FE@projects.linpro.no> Author: des Date: 2007-05-11 13:06:03 +0200 (Fri, 11 May 2007) New Revision: 1406 Modified: trunk/varnish-cache/bin/varnishd/cache_http.c Log: Comment out comparisons which are always true (unsigned >= 0) Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-11 08:20:17 UTC (rev 1405) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-11 11:06:03 UTC (rev 1406) @@ -81,8 +81,8 @@ { CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); - assert(hp->logtag >= HTTP_Rx && hp->logtag <= HTTP_Obj); - assert(t >= HTTP_T_Request && t <= HTTP_T_LostHeader); + assert(/* hp->logtag >= HTTP_Rx && */hp->logtag <= HTTP_Obj); + assert(/* t >= HTTP_T_Request && */t <= HTTP_T_LostHeader); return (logmtx[hp->logtag][t]); } From des at projects.linpro.no Fri May 11 11:06:38 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 13:06:38 +0200 (CEST) Subject: r1407 - trunk/varnish-cache Message-ID: <20070511110638.EEDEC1EC415@projects.linpro.no> Author: des Date: 2007-05-11 13:06:38 +0200 (Fri, 11 May 2007) New Revision: 1407 Modified: trunk/varnish-cache/configure.ac Log: Tweak DEVELOPER_CFLAGS. Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2007-05-11 11:06:03 UTC (rev 1406) +++ trunk/varnish-cache/configure.ac 2007-05-11 11:06:38 UTC (rev 1407) @@ -101,7 +101,13 @@ # Now that we're done using the compiler to look for functions and # libraries, set CFLAGS to what we want them to be for our own code -DEVELOPER_CFLAGS="-Wall -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" + +# This corresponds to FreeBSD's WARNS level 6 +DEVELOPER_CFLAGS="-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" + +# Turn off warnings for two issues which occur frequently in our code +DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wno-missing-field-initializers -Wno-sign-compare" + AC_ARG_ENABLE(developer-warnings, AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}") From des at projects.linpro.no Fri May 11 11:14:32 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 13:14:32 +0200 (CEST) Subject: r1408 - in trunk/varnish-cache: include lib/libvarnish Message-ID: <20070511111432.F41A01EC2F5@projects.linpro.no> Author: des Date: 2007-05-11 13:14:32 +0200 (Fri, 11 May 2007) New Revision: 1408 Added: trunk/varnish-cache/include/flopen.h trunk/varnish-cache/include/vpf.h trunk/varnish-cache/lib/libvarnish/flopen.c trunk/varnish-cache/lib/libvarnish/vpf.c Modified: trunk/varnish-cache/include/Makefile.am trunk/varnish-cache/lib/libvarnish/Makefile.am Log: Pull flopen() and pidfile_*() (renamed to vpf_*()) from FreeBSD. Modified: trunk/varnish-cache/include/Makefile.am =================================================================== --- trunk/varnish-cache/include/Makefile.am 2007-05-11 11:06:38 UTC (rev 1407) +++ trunk/varnish-cache/include/Makefile.am 2007-05-11 11:14:32 UTC (rev 1408) @@ -14,11 +14,13 @@ compat/strndup.h \ compat/vasprintf.h \ compat/vis.h \ + flopen.h \ http_headers.h \ libvarnish.h \ libvcl.h \ miniobj.h \ queue.h \ + vpf.h \ vsb.h \ shmlog.h \ shmlog_tags.h \ Added: trunk/varnish-cache/include/flopen.h =================================================================== --- trunk/varnish-cache/include/flopen.h 2007-05-11 11:06:38 UTC (rev 1407) +++ trunk/varnish-cache/include/flopen.h 2007-05-11 11:14:32 UTC (rev 1408) @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 2007 Dag-Erling Co??dan Sm??rgrav + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef FLOPEN_H_INCLUDED +#define FLOPEN_H_INCLUDED + +int flopen(const char *, int, ...); + +#endif Added: trunk/varnish-cache/include/vpf.h =================================================================== --- trunk/varnish-cache/include/vpf.h 2007-05-11 11:06:38 UTC (rev 1407) +++ trunk/varnish-cache/include/vpf.h 2007-05-11 11:14:32 UTC (rev 1408) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2005 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Derived from: + * $FreeBSD: src/lib/libutil/libutil.h,v 1.41 2005/08/24 17:21:38 pjd Exp $ + */ + +#ifndef VPF_H_INCLUDED +#define VPF_H_INCLUDED + +struct pidfh; + +struct pidfh *vpf_open(const char *path, mode_t mode, pid_t *pidptr); +int vpf_write(struct pidfh *pfh); +int vpf_close(struct pidfh *pfh); +int vpf_remove(struct pidfh *pfh); + +#endif Modified: trunk/varnish-cache/lib/libvarnish/Makefile.am =================================================================== --- trunk/varnish-cache/lib/libvarnish/Makefile.am 2007-05-11 11:06:38 UTC (rev 1407) +++ trunk/varnish-cache/lib/libvarnish/Makefile.am 2007-05-11 11:14:32 UTC (rev 1408) @@ -11,8 +11,10 @@ cli.c \ cli_common.c \ crc32.c \ + flopen.c \ time.c \ version.c \ + vpf.c \ vsb.c libvarnish_la_CFLAGS = -include config.h Added: trunk/varnish-cache/lib/libvarnish/flopen.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-11 11:06:38 UTC (rev 1407) +++ trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-11 11:14:32 UTC (rev 1408) @@ -0,0 +1,96 @@ +/*- + * Copyright (c) 2007 Dag-Erling Co?dan Sm?rgrav + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Derived from: + * $FreeBSD: src/lib/libutil/flopen.c,v 1.4 2007/05/10 15:01:42 des Exp $ + */ + +#include +#include + +#include +#include +#include +#include + +#include "flopen.h" + +int +flopen(const char *path, int flags, ...) +{ + int fd, operation, serrno; + struct stat sb, fsb; + mode_t mode; + +#ifdef O_EXLOCK + flags &= ~O_EXLOCK; +#endif + + mode = 0; + if (flags & O_CREAT) { + va_list ap; + + va_start(ap, flags); + mode = va_arg(ap, int); /* mode_t promoted to int */ + va_end(ap); + } + + operation = LOCK_EX; + if (flags & O_NONBLOCK) + operation |= LOCK_NB; + + for (;;) { + if ((fd = open(path, flags, mode)) == -1) + /* non-existent or no access */ + return (-1); + if (flock(fd, operation) == -1) { + /* unsupported or interrupted */ + serrno = errno; + close(fd); + errno = serrno; + return (-1); + } + if (stat(path, &sb) == -1) { + /* disappeared from under our feet */ + close(fd); + continue; + } + if (fstat(fd, &fsb) == -1) { + /* can't happen [tm] */ + serrno = errno; + close(fd); + errno = serrno; + return (-1); + } + if (sb.st_dev != fsb.st_dev || + sb.st_ino != fsb.st_ino) { + /* changed under our feet */ + close(fd); + continue; + } + return (fd); + } +} Added: trunk/varnish-cache/lib/libvarnish/vpf.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/vpf.c 2007-05-11 11:06:38 UTC (rev 1407) +++ trunk/varnish-cache/lib/libvarnish/vpf.c 2007-05-11 11:14:32 UTC (rev 1408) @@ -0,0 +1,259 @@ +/*- + * Copyright (c) 2005 Pawel Jakub Dawidek + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Derived from: + * $FreeBSD: src/lib/libutil/pidfile.c,v 1.5 2007/05/11 11:10:05 des Exp $ + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_STRLCPY +#include "compat/strlcpy.h" +#endif + +#include "flopen.h" +#include "vpf.h" + +struct pidfh { + int pf_fd; + char pf_path[MAXPATHLEN + 1]; + __dev_t pf_dev; + ino_t pf_ino; +}; + +static int _vpf_remove(struct pidfh *pfh, int freeit); + +static int +vpf_verify(struct pidfh *pfh) +{ + struct stat sb; + + if (pfh == NULL || pfh->pf_fd == -1) + return (EINVAL); + /* + * Check remembered descriptor. + */ + if (fstat(pfh->pf_fd, &sb) == -1) + return (errno); + if (sb.st_dev != pfh->pf_dev || sb.st_ino != pfh->pf_ino) + return (EINVAL); + return (0); +} + +static int +vpf_read(const char *path, pid_t *pidptr) +{ + char buf[16], *endptr; + int error, fd, i; + + fd = open(path, O_RDONLY); + if (fd == -1) + return (errno); + + i = read(fd, buf, sizeof(buf) - 1); + error = errno; /* Remember errno in case close() wants to change it. */ + close(fd); + if (i == -1) + return (error); + buf[i] = '\0'; + + *pidptr = strtol(buf, &endptr, 10); + if (endptr != &buf[i]) + return (EINVAL); + + return (0); +} + +struct pidfh * +vpf_open(const char *path, mode_t mode, pid_t *pidptr) +{ + struct pidfh *pfh; + struct stat sb; + int error, fd, len; + + pfh = malloc(sizeof(*pfh)); + if (pfh == NULL) + return (NULL); + +#if 0 + if (path == NULL) + len = snprintf(pfh->pf_path, sizeof(pfh->pf_path), + "/var/run/%s.pid", getprogname()); + else +#endif + len = snprintf(pfh->pf_path, sizeof(pfh->pf_path), + "%s", path); + if (len >= (int)sizeof(pfh->pf_path)) { + free(pfh); + errno = ENAMETOOLONG; + return (NULL); + } + + /* + * Open the PID file and obtain exclusive lock. + * We truncate PID file here only to remove old PID immediatelly, + * PID file will be truncated again in vpf_write(), so + * vpf_write() can be called multiple times. + */ + fd = flopen(pfh->pf_path, + O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode); + if (fd == -1) { + if (errno == EWOULDBLOCK && pidptr != NULL) { + errno = vpf_read(pfh->pf_path, pidptr); + if (errno == 0) + errno = EEXIST; + } + free(pfh); + return (NULL); + } + /* + * Remember file information, so in vpf_write() we are sure we write + * to the proper descriptor. + */ + if (fstat(fd, &sb) == -1) { + error = errno; + unlink(pfh->pf_path); + close(fd); + free(pfh); + errno = error; + return (NULL); + } + + pfh->pf_fd = fd; + pfh->pf_dev = sb.st_dev; + pfh->pf_ino = sb.st_ino; + + return (pfh); +} + +int +vpf_write(struct pidfh *pfh) +{ + char pidstr[16]; + int error, fd; + + /* + * Check remembered descriptor, so we don't overwrite some other + * file if pidfile was closed and descriptor reused. + */ + errno = vpf_verify(pfh); + if (errno != 0) { + /* + * Don't close descriptor, because we are not sure if it's ours. + */ + return (-1); + } + fd = pfh->pf_fd; + + /* + * Truncate PID file, so multiple calls of vpf_write() are allowed. + */ + if (ftruncate(fd, 0) == -1) { + error = errno; + _vpf_remove(pfh, 0); + errno = error; + return (-1); + } + + snprintf(pidstr, sizeof(pidstr), "%u", getpid()); + if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) { + error = errno; + _vpf_remove(pfh, 0); + errno = error; + return (-1); + } + + return (0); +} + +int +vpf_close(struct pidfh *pfh) +{ + int error; + + error = vpf_verify(pfh); + if (error != 0) { + errno = error; + return (-1); + } + + if (close(pfh->pf_fd) == -1) + error = errno; + free(pfh); + if (error != 0) { + errno = error; + return (-1); + } + return (0); +} + +static int +_vpf_remove(struct pidfh *pfh, int freeit) +{ + int error; + + error = vpf_verify(pfh); + if (error != 0) { + errno = error; + return (-1); + } + + if (unlink(pfh->pf_path) == -1) + error = errno; + if (flock(pfh->pf_fd, LOCK_UN) == -1) { + if (error == 0) + error = errno; + } + if (close(pfh->pf_fd) == -1) { + if (error == 0) + error = errno; + } + if (freeit) + free(pfh); + else + pfh->pf_fd = -1; + if (error != 0) { + errno = error; + return (-1); + } + return (0); +} + +int +vpf_remove(struct pidfh *pfh) +{ + + return (_vpf_remove(pfh, 1)); +} From des at projects.linpro.no Fri May 11 11:15:46 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 13:15:46 +0200 (CEST) Subject: r1409 - in trunk/varnish-cache: include lib/libvarnish Message-ID: <20070511111546.C909E1EC415@projects.linpro.no> Author: des Date: 2007-05-11 13:15:46 +0200 (Fri, 11 May 2007) New Revision: 1409 Modified: trunk/varnish-cache/include/flopen.h trunk/varnish-cache/include/vpf.h trunk/varnish-cache/lib/libvarnish/flopen.c trunk/varnish-cache/lib/libvarnish/vpf.c Log: Expand tags. Property changes on: trunk/varnish-cache/include/flopen.h ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/varnish-cache/include/vpf.h ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/varnish-cache/lib/libvarnish/flopen.c ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/varnish-cache/lib/libvarnish/vpf.c ___________________________________________________________________ Name: svn:keywords + Id From des at projects.linpro.no Fri May 11 11:17:09 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 13:17:09 +0200 (CEST) Subject: r1410 - in trunk/varnish-cache: include lib/libvarnish Message-ID: <20070511111709.6EEC51EC40E@projects.linpro.no> Author: des Date: 2007-05-11 13:17:09 +0200 (Fri, 11 May 2007) New Revision: 1410 Modified: trunk/varnish-cache/include/flopen.h trunk/varnish-cache/include/vpf.h trunk/varnish-cache/lib/libvarnish/flopen.c trunk/varnish-cache/lib/libvarnish/vpf.c Log: No use expanding tags unless there *are* tags... Modified: trunk/varnish-cache/include/flopen.h =================================================================== --- trunk/varnish-cache/include/flopen.h 2007-05-11 11:15:46 UTC (rev 1409) +++ trunk/varnish-cache/include/flopen.h 2007-05-11 11:17:09 UTC (rev 1410) @@ -23,6 +23,10 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $Id$ + * Derived from: + * $FreeBSD: src/lib/libutil/libutil.h,v 1.44 2007/05/10 15:01:42 des Exp $ */ #ifndef FLOPEN_H_INCLUDED Modified: trunk/varnish-cache/include/vpf.h =================================================================== --- trunk/varnish-cache/include/vpf.h 2007-05-11 11:15:46 UTC (rev 1409) +++ trunk/varnish-cache/include/vpf.h 2007-05-11 11:17:09 UTC (rev 1410) @@ -23,6 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ * Derived from: * $FreeBSD: src/lib/libutil/libutil.h,v 1.41 2005/08/24 17:21:38 pjd Exp $ */ Modified: trunk/varnish-cache/lib/libvarnish/flopen.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-11 11:15:46 UTC (rev 1409) +++ trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-11 11:17:09 UTC (rev 1410) @@ -24,6 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ * Derived from: * $FreeBSD: src/lib/libutil/flopen.c,v 1.4 2007/05/10 15:01:42 des Exp $ */ Modified: trunk/varnish-cache/lib/libvarnish/vpf.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/vpf.c 2007-05-11 11:15:46 UTC (rev 1409) +++ trunk/varnish-cache/lib/libvarnish/vpf.c 2007-05-11 11:17:09 UTC (rev 1410) @@ -23,6 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ * Derived from: * $FreeBSD: src/lib/libutil/pidfile.c,v 1.5 2007/05/11 11:10:05 des Exp $ */ From des at projects.linpro.no Fri May 11 11:34:42 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 13:34:42 +0200 (CEST) Subject: r1411 - trunk/varnish-cache/bin/varnishlog Message-ID: <20070511113442.9FB601EC2F5@projects.linpro.no> Author: des Date: 2007-05-11 13:34:42 +0200 (Fri, 11 May 2007) New Revision: 1411 Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 trunk/varnish-cache/bin/varnishlog/varnishlog.c Log: Add -D (daemonize) and -P (pid file) options. Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.1 2007-05-11 11:17:09 UTC (rev 1410) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.1 2007-05-11 11:34:42 UTC (rev 1411) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd April 21, 2007 +.Dd May 11, 2007 .Dt VARNISHLOG 1 .Os .Sh NAME @@ -40,10 +40,12 @@ .Op Fl b .Op Fl C .Op Fl c +.Op Fl D .Op Fl d .Op Fl I Ar regex .Op Fl i Ar tag .Op Fl o +.Op Fl P Ar file .Op Fl r Ar file .Op Fl V .Op Fl w Ar file @@ -82,6 +84,8 @@ is specified, .Nm acts as if they both were. +.It Fl D +Daemonize. .It Fl d Process old log entries on startup. Normally, @@ -107,6 +111,9 @@ This has no effect when writing to a file using the .Fl w option. +.It Fl P Ar file +Write the process's PID to the specified +.Ar file . .It Fl r Ar file Read log entries from .Ar file Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-11 11:17:09 UTC (rev 1410) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-11 11:34:42 UTC (rev 1411) @@ -40,15 +40,24 @@ #include #include +#ifndef HAVE_DAEMON +#include "compat/daemon.h" +#endif + +#ifdef HAVE_VIS_H +#include +#else #include "compat/vis.h" +#endif #include "vsb.h" +#include "vpf.h" #include "libvarnish.h" #include "shmlog.h" #include "varnishapi.h" -static int bflag, cflag; +static int b_flag, c_flag; /* -------------------------------------------------------------------*/ @@ -100,7 +109,7 @@ (void)priv; if (!(spec & (VSL_S_CLIENT|VSL_S_BACKEND))) { - if (!bflag && !cflag) + if (!b_flag && !c_flag) VSL_H_Print(stdout, tag, fd, len, spec, ptr); return (0); } @@ -179,12 +188,12 @@ exit (2); } } - if (!bflag) { + if (!b_flag) { VSL_Select(vd, SLT_SessionOpen); VSL_Select(vd, SLT_SessionClose); VSL_Select(vd, SLT_ReqEnd); } - if (!cflag) { + if (!c_flag) { VSL_Select(vd, SLT_BackendOpen); VSL_Select(vd, SLT_BackendClose); VSL_Select(vd, SLT_BackendReuse); @@ -264,7 +273,7 @@ usage(void) { fprintf(stderr, - "usage: varnishlog %s [-aoV] [-w file]\n", VSL_USAGE); + "usage: varnishlog %s [-aDoV] [-P file] [-w file]\n", VSL_USAGE); exit(1); } @@ -272,20 +281,28 @@ main(int argc, char **argv) { int i, c; - int a_flag = 0, o_flag = 0; - char *w_opt = NULL; + int a_flag = 0, D_flag = 0, o_flag = 0; + const char *P_opt = NULL; + const char *w_opt = NULL; + struct pidfh *pfh = NULL; struct VSL_data *vd; vd = VSL_New(); - while ((c = getopt(argc, argv, VSL_ARGS "aoVw:")) != -1) { + while ((c = getopt(argc, argv, VSL_ARGS "aDoP:Vw:")) != -1) { switch (c) { case 'a': a_flag = 1; break; + case 'D': + D_flag = 1; + break; case 'o': o_flag = 1; break; + case 'P': + P_opt = optarg; + break; case 'V': varnish_version("varnishlog"); exit(0); @@ -293,12 +310,12 @@ w_opt = optarg; break; case 'c': - cflag = 1; + c_flag = 1; if (VSL_Arg(vd, c, optarg) > 0) break; usage(); case 'b': - bflag = 1; + b_flag = 1; if (VSL_Arg(vd, c, optarg) > 0) break; usage(); @@ -313,8 +330,23 @@ usage(); if (VSL_OpenLog(vd)) - exit (1); + exit(1); + if (P_opt && (pfh = vpf_open(P_opt, 0600, NULL)) == NULL) { + perror(P_opt); + exit(1); + } + + if (D_flag && daemon(0, 0) == -1) { + perror("daemon()"); + if (pfh != NULL) + vpf_remove(pfh); + exit(1); + } + + if (pfh != NULL) + vpf_write(pfh); + if (w_opt != NULL) do_write(vd, w_opt, a_flag); @@ -329,5 +361,7 @@ break; } + if (pfh != NULL) + vpf_remove(pfh); return (0); } From des at projects.linpro.no Fri May 11 11:35:59 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 13:35:59 +0200 (CEST) Subject: r1412 - in trunk/varnish-cache/bin: varnishhist varnishtop Message-ID: <20070511113559.24AC71EC40E@projects.linpro.no> Author: des Date: 2007-05-11 13:35:59 +0200 (Fri, 11 May 2007) New Revision: 1412 Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c trunk/varnish-cache/bin/varnishtop/varnishtop.c Log: Remove unused header. Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2007-05-11 11:34:42 UTC (rev 1411) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2007-05-11 11:35:59 UTC (rev 1412) @@ -41,8 +41,6 @@ #include #include -#include "compat/vis.h" - #include "libvarnish.h" #include "shmlog.h" #include "varnishapi.h" Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-11 11:34:42 UTC (rev 1411) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-11 11:35:59 UTC (rev 1412) @@ -39,8 +39,6 @@ #include #include -#include "compat/vis.h" - #include "vsb.h" #include "libvarnish.h" From des at projects.linpro.no Fri May 11 12:01:47 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 14:01:47 +0200 (CEST) Subject: r1413 - trunk/varnish-cache Message-ID: <20070511120147.72B3C1EC420@projects.linpro.no> Author: des Date: 2007-05-11 14:01:47 +0200 (Fri, 11 May 2007) New Revision: 1413 Modified: trunk/varnish-cache/configure.ac Log: Avoid gcc4-specific compiler options. Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2007-05-11 11:35:59 UTC (rev 1412) +++ trunk/varnish-cache/configure.ac 2007-05-11 12:01:47 UTC (rev 1413) @@ -103,10 +103,10 @@ # libraries, set CFLAGS to what we want them to be for our own code # This corresponds to FreeBSD's WARNS level 6 -DEVELOPER_CFLAGS="-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" +DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" # Turn off warnings for two issues which occur frequently in our code -DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wno-missing-field-initializers -Wno-sign-compare" +#DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wextra -Wno-missing-field-initializers -Wno-sign-compare" AC_ARG_ENABLE(developer-warnings, AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), From des at projects.linpro.no Fri May 11 12:05:02 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 14:05:02 +0200 (CEST) Subject: r1414 - trunk/varnish-cache Message-ID: <20070511120502.AEA341EC415@projects.linpro.no> Author: des Date: 2007-05-11 14:05:02 +0200 (Fri, 11 May 2007) New Revision: 1414 Modified: trunk/varnish-cache/configure.ac Log: Forgotten commit: check for and daemon(3) availability. Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2007-05-11 12:01:47 UTC (rev 1413) +++ trunk/varnish-cache/configure.ac 2007-05-11 12:05:02 UTC (rev 1414) @@ -60,6 +60,7 @@ AC_CHECK_HEADERS([stddef.h]) AC_CHECK_HEADERS([stdlib.h]) AC_CHECK_HEADERS([unistd.h]) +AC_CHECK_HEADERS([vis.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -88,6 +89,7 @@ AC_CHECK_FUNCS([strlcat strlcpy]) AC_CHECK_FUNCS([strndup]) AC_CHECK_FUNCS([vis strvis strvisx]) +AC_CHECK_FUNCS([daemon]) save_LIBS="${LIBS}" LIBS="${LIBS} ${RT_LIBS}" From des at projects.linpro.no Fri May 11 12:17:26 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 14:17:26 +0200 (CEST) Subject: r1415 - trunk/varnish-cache/bin/varnishd Message-ID: <20070511121726.A94651EC420@projects.linpro.no> Author: des Date: 2007-05-11 14:17:26 +0200 (Fri, 11 May 2007) New Revision: 1415 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 trunk/varnish-cache/bin/varnishd/varnishd.c Log: Add -P (pid file) option. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-11 12:05:02 UTC (rev 1414) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-11 12:17:26 UTC (rev 1415) @@ -41,6 +41,7 @@ .Op Fl d .Op Fl f Ar config .Op Fl h Ar type Ns Op , Ns Ar options +.Op Fl P Ar file .Op Fl p Ar param Ns = Ns Ar value .Op Fl s Ar type Ns Op , Ns Ar options .Op Fl T Ar address Ns Op : Ns Ar port @@ -111,6 +112,9 @@ See .Sx Hash Algorithms for a list of supported algorithms. +.It Fl P Ar file +Write the process's PID to the specified +.Ar file . .It Fl p Ar param Ns = Ns Ar value Set the parameter specified by .Ar param Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2007-05-11 12:05:02 UTC (rev 1414) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2007-05-11 12:17:26 UTC (rev 1415) @@ -45,7 +45,12 @@ #include #include +#ifndef HAVE_DAEMON +#include "compat/daemon.h" +#endif + #include "vsb.h" +#include "vpf.h" #include "cli.h" #include "cli_priv.h" @@ -163,7 +168,7 @@ fprintf(stderr, " %-28s # %s\n", "", " -b ':'"); fprintf(stderr, " %-28s # %s\n", "-d", "debug"); - fprintf(stderr, " %-28s # %s\n", "-f file", "VCL_file"); + fprintf(stderr, " %-28s # %s\n", "-f file", "VCL script"); fprintf(stderr, " %-28s # %s\n", "-h kind[,hashoptions]", "Hash specification"); fprintf(stderr, " %-28s # %s\n", "", @@ -172,6 +177,7 @@ " -h classic [default]"); fprintf(stderr, " %-28s # %s\n", "", " -h classic,"); + fprintf(stderr, " %-28s # %s\n", "-P file", "PID file"); fprintf(stderr, " %-28s # %s\n", "-p param=value", "set parameter"); fprintf(stderr, " %-28s # %s\n", @@ -396,12 +402,14 @@ const char *b_arg = NULL; const char *f_arg = NULL; const char *h_flag = "classic"; + const char *P_arg = NULL; const char *s_arg = "file"; const char *T_arg = NULL; unsigned C_flag = 0; char *p; struct params param; struct cli cli[1]; + struct pidfh *pfh = NULL; setbuf(stdout, NULL); setbuf(stderr, NULL); @@ -420,8 +428,8 @@ * XXX: block in shared memory. It would give us the advantage * XXX: of having the CLI thread be able to take action on the * XXX: change. - * XXX: For now live with the harmless flexelint warning this causes: - * XXX: varnishd.c 393 Info 789: Assigning address of auto variable + * XXX: For now live with the harmless flexelint warning this causes: + * XXX: varnishd.c 393 Info 789: Assigning address of auto variable * XXX: 'param' to static */ @@ -433,7 +441,7 @@ MCF_ParamInit(cli); cli_check(cli); - while ((o = getopt(argc, argv, "a:b:Cdf:h:p:s:T:t:Vw:")) != -1) + while ((o = getopt(argc, argv, "a:b:Cdf:h:P:p:s:T:t:Vw:")) != -1) switch (o) { case 'a': MCF_ParamSet(cli, "listen_address", optarg); @@ -454,6 +462,9 @@ case 'h': h_flag = optarg; break; + case 'P': + P_arg = optarg; + break; case 'p': p = strchr(optarg, '='); if (p == NULL) @@ -499,6 +510,11 @@ usage(); } + if (P_arg && (pfh = vpf_open(P_arg, 0600, NULL)) == NULL) { + perror(P_arg); + exit(1); + } + if (mgt_vcc_default(b_arg, f_arg, C_flag)) exit (2); if (C_flag) @@ -516,9 +532,14 @@ if (d_flag == 1) printf("%d\n", getpid()); + if (pfh != NULL) + vpf_write(pfh); + mgt_cli_init(); mgt_run(d_flag, T_arg); + if (pfh != NULL) + vpf_remove(pfh); exit(0); } From des at projects.linpro.no Fri May 11 12:19:48 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 11 May 2007 14:19:48 +0200 (CEST) Subject: r1416 - in trunk/varnish-cache/bin: varnishhist varnishlog varnishstat Message-ID: <20070511121948.571991EC410@projects.linpro.no> Author: des Date: 2007-05-11 14:19:48 +0200 (Fri, 11 May 2007) New Revision: 1416 Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishstat/varnishstat.c Log: Minor style issues. Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2007-05-11 12:17:26 UTC (rev 1415) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2007-05-11 12:19:48 UTC (rev 1416) @@ -224,5 +224,5 @@ break; } - return (0); + exit(0); } Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-11 12:17:26 UTC (rev 1415) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-11 12:19:48 UTC (rev 1416) @@ -223,29 +223,29 @@ } static int -open_log(const char *w_opt, int a_flag) +open_log(const char *w_arg, int a_flag) { int fd, flags; flags = (a_flag ? O_APPEND : O_TRUNC) | O_WRONLY | O_CREAT; - if (!strcmp(w_opt, "-")) + if (!strcmp(w_arg, "-")) fd = STDOUT_FILENO; else - fd = open(w_opt, flags, 0644); + fd = open(w_arg, flags, 0644); if (fd < 0) { - perror(w_opt); + perror(w_arg); exit (1); } return (fd); } static void -do_write(struct VSL_data *vd, const char *w_opt, int a_flag) +do_write(struct VSL_data *vd, const char *w_arg, int a_flag) { int fd, i; unsigned char *p; - fd = open_log(w_opt, a_flag); + fd = open_log(w_arg, a_flag); signal(SIGHUP, sighup); while (1) { i = VSL_NextLog(vd, &p); @@ -254,13 +254,13 @@ if (i > 0) { i = write(fd, p, 5 + p[1]); if (i < 0) { - perror(w_opt); + perror(w_arg); exit(1); } } if (reopen) { close(fd); - fd = open_log(w_opt, a_flag); + fd = open_log(w_arg, a_flag); reopen = 0; } } @@ -282,8 +282,8 @@ { int i, c; int a_flag = 0, D_flag = 0, o_flag = 0; - const char *P_opt = NULL; - const char *w_opt = NULL; + const char *P_arg = NULL; + const char *w_arg = NULL; struct pidfh *pfh = NULL; struct VSL_data *vd; @@ -301,13 +301,13 @@ o_flag = 1; break; case 'P': - P_opt = optarg; + P_arg = optarg; break; case 'V': varnish_version("varnishlog"); exit(0); case 'w': - w_opt = optarg; + w_arg = optarg; break; case 'c': c_flag = 1; @@ -326,14 +326,14 @@ } } - if (o_flag && w_opt != NULL) + if (o_flag && w_arg != NULL) usage(); if (VSL_OpenLog(vd)) exit(1); - if (P_opt && (pfh = vpf_open(P_opt, 0600, NULL)) == NULL) { - perror(P_opt); + if (P_arg && (pfh = vpf_open(P_arg, 0600, NULL)) == NULL) { + perror(P_arg); exit(1); } @@ -347,8 +347,8 @@ if (pfh != NULL) vpf_write(pfh); - if (w_opt != NULL) - do_write(vd, w_opt, a_flag); + if (w_arg != NULL) + do_write(vd, w_arg, a_flag); if (o_flag) do_order(vd, argc - optind, argv + optind); @@ -363,5 +363,5 @@ if (pfh != NULL) vpf_remove(pfh); - return (0); + exit(0); } Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2007-05-11 12:17:26 UTC (rev 1415) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2007-05-11 12:19:48 UTC (rev 1416) @@ -169,6 +169,5 @@ #undef MAC_STAT } - exit (0); - + exit(0); } From des at linpro.no Fri May 11 12:40:35 2007 From: des at linpro.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=) Date: Fri, 11 May 2007 14:40:35 +0200 Subject: r1415 - trunk/varnish-cache/bin/varnishd In-Reply-To: <20070511121726.A94651EC420@projects.linpro.no> (des@projects.linpro.no's message of "Fri\, 11 May 2007 14\:17\:26 +0200 \(CEST\)") References: <20070511121726.A94651EC420@projects.linpro.no> Message-ID: <87tzujttx8.fsf@des.linpro.no> des at projects.linpro.no writes: > +#ifndef HAVE_DAEMON > +#include "compat/daemon.h" > +#endif Note that we don't actually have a "compat/daemon.h", because none of the platforms we primarily care about need one (GNU libc has daemon.h in , BSD has it in ). DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From phk at projects.linpro.no Fri May 11 13:15:16 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 11 May 2007 15:15:16 +0200 (CEST) Subject: r1417 - trunk/varnish-cache/bin/varnishd Message-ID: <20070511131516.69CCE1EC415@projects.linpro.no> Author: phk Date: 2007-05-11 15:15:16 +0200 (Fri, 11 May 2007) New Revision: 1417 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Make the sendfile threshold inifinity for now, we have evidence of sendfile not doing it's job in a number of operating system (-versions ?) This change is unlikely to cause a performance hit anywhere, because writev() is pretty effective in the first place. Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-11 12:19:48 UTC (rev 1416) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-11 13:15:16 UTC (rev 1417) @@ -529,7 +529,7 @@ "may make sense to set this to \"unlimited\".\n" #endif EXPERIMENTAL, - "8192", "bytes" }, + "-1", "bytes" }, #endif /* HAVE_SENDFILE */ { "vcl_trace", tweak_vcl_trace, "Trace VCL execution in the shmlog.\n" From des at projects.linpro.no Mon May 14 09:02:24 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 14 May 2007 11:02:24 +0200 (CEST) Subject: r1418 - trunk/varnish-cache/bin/varnishd Message-ID: <20070514090224.1CA281EC420@projects.linpro.no> Author: des Date: 2007-05-14 11:02:23 +0200 (Mon, 14 May 2007) New Revision: 1418 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 Log: Document the inadvisability of enabling sendfile. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-11 13:15:16 UTC (rev 1417) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-14 09:02:23 UTC (rev 1418) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd May 1, 2007 +.Dd May 14, 2007 .Dt VARNISHD 1 .Os .Sh NAME @@ -372,7 +372,10 @@ This is not likely to have any effect unless the working set is too large to fit in physical memory. .Pp -The default is 8192 bytes, which is probably too low. +Note that several operating systems have known bugs which make it +inadvisable to use this. +.Pp +The default is -1, which disables the use of sendfile altogether. .It Va send_timeout The time to wait before dropping the connection to a client which is not accepting data sent to it. From des at projects.linpro.no Mon May 14 09:42:16 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 14 May 2007 11:42:16 +0200 (CEST) Subject: r1419 - branches/1.0 branches/1.0/bin/varnishd branches/1.0/bin/varnishhist branches/1.0/bin/varnishlog branches/1.0/bin/varnishstat branches/1.0/bin/varnishtop branches/1.0/include branches/1.0/lib/libvarnish branches/1.0/redhat trunk/varnish-cache/bin/varnishd trunk/varnish-cache/bin/varnishtop Message-ID: <20070514094216.4E4B21EC42E@projects.linpro.no> Author: des Date: 2007-05-14 11:42:16 +0200 (Mon, 14 May 2007) New Revision: 1419 Added: branches/1.0/include/flopen.h branches/1.0/include/vpf.h branches/1.0/lib/libvarnish/flopen.c branches/1.0/lib/libvarnish/vpf.c Modified: branches/1.0/ branches/1.0/bin/varnishd/cache_http.c branches/1.0/bin/varnishd/mgt_param.c branches/1.0/bin/varnishd/mgt_vcc.c branches/1.0/bin/varnishd/varnishd.1 branches/1.0/bin/varnishd/varnishd.c branches/1.0/bin/varnishhist/varnishhist.c branches/1.0/bin/varnishlog/varnishlog.1 branches/1.0/bin/varnishlog/varnishlog.c branches/1.0/bin/varnishstat/varnishstat.c branches/1.0/bin/varnishtop/varnishtop.c branches/1.0/configure.ac branches/1.0/include/Makefile.am branches/1.0/lib/libvarnish/Makefile.am branches/1.0/redhat/varnish.spec trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishtop/varnishtop.c Log: Merged revisions 1394,1400-1418 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r1394 | phk | 2007-05-09 12:55:33 +0200 (Wed, 09 May 2007) | 8 lines After compilation of a VCL program, do a test-load into the management process to catch any implementation-discrepancies between symbols used by the compiler and those implemented in the runtime. The situation will happen from time to time and there is no need to issue a panic when we can test sensibly for it. ........ r1403 | ingvar | 2007-05-11 09:51:11 +0200 (Fri, 11 May 2007) | 5 lines * Fri May 11 2007 Ingvar Hagelund - 1.0.svn-20070511 - Threw latest changes into svn trunk - Removed the conversion of manpages into utf8. They are all utf8 in trunk ........ r1404 | ingvar | 2007-05-11 10:13:03 +0200 (Fri, 11 May 2007) | 1 line ........ r1406 | des | 2007-05-11 13:06:03 +0200 (Fri, 11 May 2007) | 2 lines Comment out comparisons which are always true (unsigned >= 0) ........ r1407 | des | 2007-05-11 13:06:38 +0200 (Fri, 11 May 2007) | 2 lines Tweak DEVELOPER_CFLAGS. ........ r1408 | des | 2007-05-11 13:14:32 +0200 (Fri, 11 May 2007) | 2 lines Pull flopen() and pidfile_*() (renamed to vpf_*()) from FreeBSD. ........ r1409 | des | 2007-05-11 13:15:46 +0200 (Fri, 11 May 2007) | 2 lines Expand tags. ........ r1410 | des | 2007-05-11 13:17:09 +0200 (Fri, 11 May 2007) | 2 lines No use expanding tags unless there *are* tags... ........ r1411 | des | 2007-05-11 13:34:42 +0200 (Fri, 11 May 2007) | 2 lines Add -D (daemonize) and -P (pid file) options. ........ r1412 | des | 2007-05-11 13:35:59 +0200 (Fri, 11 May 2007) | 2 lines Remove unused header. ........ r1413 | des | 2007-05-11 14:01:47 +0200 (Fri, 11 May 2007) | 2 lines Avoid gcc4-specific compiler options. ........ r1414 | des | 2007-05-11 14:05:02 +0200 (Fri, 11 May 2007) | 2 lines Forgotten commit: check for and daemon(3) availability. ........ r1415 | des | 2007-05-11 14:17:26 +0200 (Fri, 11 May 2007) | 2 lines Add -P (pid file) option. ........ r1416 | des | 2007-05-11 14:19:48 +0200 (Fri, 11 May 2007) | 2 lines Minor style issues. ........ r1417 | phk | 2007-05-11 15:15:16 +0200 (Fri, 11 May 2007) | 7 lines Make the sendfile threshold inifinity for now, we have evidence of sendfile not doing it's job in a number of operating system (-versions ?) This change is unlikely to cause a performance hit anywhere, because writev() is pretty effective in the first place. ........ r1418 | des | 2007-05-14 11:02:23 +0200 (Mon, 14 May 2007) | 2 lines Document the inadvisability of enabling sendfile. ........ Property changes on: branches/1.0 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1315,1359-1387,1399 + /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1418 Modified: branches/1.0/bin/varnishd/cache_http.c =================================================================== --- branches/1.0/bin/varnishd/cache_http.c 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishd/cache_http.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -81,8 +81,8 @@ { CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); - assert(hp->logtag >= HTTP_Rx && hp->logtag <= HTTP_Obj); - assert(t >= HTTP_T_Request && t <= HTTP_T_LostHeader); + assert(/* hp->logtag >= HTTP_Rx && */hp->logtag <= HTTP_Obj); + assert(/* t >= HTTP_T_Request && */t <= HTTP_T_LostHeader); return (logmtx[hp->logtag][t]); } Modified: branches/1.0/bin/varnishd/mgt_param.c =================================================================== --- branches/1.0/bin/varnishd/mgt_param.c 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishd/mgt_param.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -529,7 +529,7 @@ "may make sense to set this to \"unlimited\".\n" #endif EXPERIMENTAL, - "8192", "bytes" }, + "-1", "bytes" }, #endif /* HAVE_SENDFILE */ { "vcl_trace", tweak_vcl_trace, "Trace VCL execution in the shmlog.\n" Modified: branches/1.0/bin/varnishd/mgt_vcc.c =================================================================== --- branches/1.0/bin/varnishd/mgt_vcc.c 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishd/mgt_vcc.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -33,6 +33,7 @@ #include +#include #include #include #include @@ -59,7 +60,6 @@ int active; }; - static TAILQ_HEAD(, vclprog) vclhead = TAILQ_HEAD_INITIALIZER(vclhead); /*--------------------------------------------------------------------*/ @@ -129,6 +129,7 @@ FILE *fo, *fs; char *of, *sf, buf[BUFSIZ]; int i, j, sfd; + void *p; /* Create temporary C source file */ sf = strdup("/tmp/vcl.XXXXXXXX"); @@ -201,6 +202,17 @@ of = NULL; } + /* Next, try to load the object into the management process */ + p = dlopen(of, RTLD_NOW | RTLD_LOCAL); + if (p == NULL) { + vsb_printf(sb, "Problem loading compiled VCL program:\n\t%s\n", + dlerror()); + unlink(of); + free(of); + of = NULL; + } else + AZ(dlclose(p)); + /* clean up and return */ unlink(sf); free(sf); Modified: branches/1.0/bin/varnishd/varnishd.1 =================================================================== --- branches/1.0/bin/varnishd/varnishd.1 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishd/varnishd.1 2007-05-14 09:42:16 UTC (rev 1419) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd May 1, 2007 +.Dd May 14, 2007 .Dt VARNISHD 1 .Os .Sh NAME @@ -41,6 +41,7 @@ .Op Fl d .Op Fl f Ar config .Op Fl h Ar type Ns Op , Ns Ar options +.Op Fl P Ar file .Op Fl p Ar param Ns = Ns Ar value .Op Fl s Ar type Ns Op , Ns Ar options .Op Fl T Ar address Ns Op : Ns Ar port @@ -111,6 +112,9 @@ See .Sx Hash Algorithms for a list of supported algorithms. +.It Fl P Ar file +Write the process's PID to the specified +.Ar file . .It Fl p Ar param Ns = Ns Ar value Set the parameter specified by .Ar param @@ -368,7 +372,10 @@ This is not likely to have any effect unless the working set is too large to fit in physical memory. .Pp -The default is 8192 bytes, which is probably too low. +Note that several operating systems have known bugs which make it +inadvisable to use this. +.Pp +The default is -1, which disables the use of sendfile altogether. .It Va send_timeout The time to wait before dropping the connection to a client which is not accepting data sent to it. Modified: branches/1.0/bin/varnishd/varnishd.c =================================================================== --- branches/1.0/bin/varnishd/varnishd.c 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishd/varnishd.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -45,7 +45,12 @@ #include #include +#ifndef HAVE_DAEMON +#include "compat/daemon.h" +#endif + #include "vsb.h" +#include "vpf.h" #include "cli.h" #include "cli_priv.h" @@ -163,7 +168,7 @@ fprintf(stderr, " %-28s # %s\n", "", " -b ':'"); fprintf(stderr, " %-28s # %s\n", "-d", "debug"); - fprintf(stderr, " %-28s # %s\n", "-f file", "VCL_file"); + fprintf(stderr, " %-28s # %s\n", "-f file", "VCL script"); fprintf(stderr, " %-28s # %s\n", "-h kind[,hashoptions]", "Hash specification"); fprintf(stderr, " %-28s # %s\n", "", @@ -172,6 +177,7 @@ " -h classic [default]"); fprintf(stderr, " %-28s # %s\n", "", " -h classic,"); + fprintf(stderr, " %-28s # %s\n", "-P file", "PID file"); fprintf(stderr, " %-28s # %s\n", "-p param=value", "set parameter"); fprintf(stderr, " %-28s # %s\n", @@ -396,12 +402,14 @@ const char *b_arg = NULL; const char *f_arg = NULL; const char *h_flag = "classic"; + const char *P_arg = NULL; const char *s_arg = "file"; const char *T_arg = NULL; unsigned C_flag = 0; char *p; struct params param; struct cli cli[1]; + struct pidfh *pfh = NULL; setbuf(stdout, NULL); setbuf(stderr, NULL); @@ -420,8 +428,8 @@ * XXX: block in shared memory. It would give us the advantage * XXX: of having the CLI thread be able to take action on the * XXX: change. - * XXX: For now live with the harmless flexelint warning this causes: - * XXX: varnishd.c 393 Info 789: Assigning address of auto variable + * XXX: For now live with the harmless flexelint warning this causes: + * XXX: varnishd.c 393 Info 789: Assigning address of auto variable * XXX: 'param' to static */ @@ -433,7 +441,7 @@ MCF_ParamInit(cli); cli_check(cli); - while ((o = getopt(argc, argv, "a:b:Cdf:h:p:s:T:t:Vw:")) != -1) + while ((o = getopt(argc, argv, "a:b:Cdf:h:P:p:s:T:t:Vw:")) != -1) switch (o) { case 'a': MCF_ParamSet(cli, "listen_address", optarg); @@ -454,6 +462,9 @@ case 'h': h_flag = optarg; break; + case 'P': + P_arg = optarg; + break; case 'p': p = strchr(optarg, '='); if (p == NULL) @@ -499,6 +510,11 @@ usage(); } + if (P_arg && (pfh = vpf_open(P_arg, 0600, NULL)) == NULL) { + perror(P_arg); + exit(1); + } + if (mgt_vcc_default(b_arg, f_arg, C_flag)) exit (2); if (C_flag) @@ -516,9 +532,14 @@ if (d_flag == 1) printf("%d\n", getpid()); + if (pfh != NULL) + vpf_write(pfh); + mgt_cli_init(); mgt_run(d_flag, T_arg); + if (pfh != NULL) + vpf_remove(pfh); exit(0); } Modified: branches/1.0/bin/varnishhist/varnishhist.c =================================================================== --- branches/1.0/bin/varnishhist/varnishhist.c 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishhist/varnishhist.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -41,8 +41,6 @@ #include #include -#include "compat/vis.h" - #include "libvarnish.h" #include "shmlog.h" #include "varnishapi.h" @@ -226,5 +224,5 @@ break; } - return (0); + exit(0); } Modified: branches/1.0/bin/varnishlog/varnishlog.1 =================================================================== --- branches/1.0/bin/varnishlog/varnishlog.1 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishlog/varnishlog.1 2007-05-14 09:42:16 UTC (rev 1419) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd April 21, 2007 +.Dd May 11, 2007 .Dt VARNISHLOG 1 .Os .Sh NAME @@ -40,10 +40,12 @@ .Op Fl b .Op Fl C .Op Fl c +.Op Fl D .Op Fl d .Op Fl I Ar regex .Op Fl i Ar tag .Op Fl o +.Op Fl P Ar file .Op Fl r Ar file .Op Fl V .Op Fl w Ar file @@ -82,6 +84,8 @@ is specified, .Nm acts as if they both were. +.It Fl D +Daemonize. .It Fl d Process old log entries on startup. Normally, @@ -107,6 +111,9 @@ This has no effect when writing to a file using the .Fl w option. +.It Fl P Ar file +Write the process's PID to the specified +.Ar file . .It Fl r Ar file Read log entries from .Ar file Modified: branches/1.0/bin/varnishlog/varnishlog.c =================================================================== --- branches/1.0/bin/varnishlog/varnishlog.c 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishlog/varnishlog.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -40,15 +40,24 @@ #include #include +#ifndef HAVE_DAEMON +#include "compat/daemon.h" +#endif + +#ifdef HAVE_VIS_H +#include +#else #include "compat/vis.h" +#endif #include "vsb.h" +#include "vpf.h" #include "libvarnish.h" #include "shmlog.h" #include "varnishapi.h" -static int bflag, cflag; +static int b_flag, c_flag; /* -------------------------------------------------------------------*/ @@ -100,7 +109,7 @@ (void)priv; if (!(spec & (VSL_S_CLIENT|VSL_S_BACKEND))) { - if (!bflag && !cflag) + if (!b_flag && !c_flag) VSL_H_Print(stdout, tag, fd, len, spec, ptr); return (0); } @@ -179,12 +188,12 @@ exit (2); } } - if (!bflag) { + if (!b_flag) { VSL_Select(vd, SLT_SessionOpen); VSL_Select(vd, SLT_SessionClose); VSL_Select(vd, SLT_ReqEnd); } - if (!cflag) { + if (!c_flag) { VSL_Select(vd, SLT_BackendOpen); VSL_Select(vd, SLT_BackendClose); VSL_Select(vd, SLT_BackendReuse); @@ -214,29 +223,29 @@ } static int -open_log(const char *w_opt, int a_flag) +open_log(const char *w_arg, int a_flag) { int fd, flags; flags = (a_flag ? O_APPEND : O_TRUNC) | O_WRONLY | O_CREAT; - if (!strcmp(w_opt, "-")) + if (!strcmp(w_arg, "-")) fd = STDOUT_FILENO; else - fd = open(w_opt, flags, 0644); + fd = open(w_arg, flags, 0644); if (fd < 0) { - perror(w_opt); + perror(w_arg); exit (1); } return (fd); } static void -do_write(struct VSL_data *vd, const char *w_opt, int a_flag) +do_write(struct VSL_data *vd, const char *w_arg, int a_flag) { int fd, i; unsigned char *p; - fd = open_log(w_opt, a_flag); + fd = open_log(w_arg, a_flag); signal(SIGHUP, sighup); while (1) { i = VSL_NextLog(vd, &p); @@ -245,13 +254,13 @@ if (i > 0) { i = write(fd, p, 5 + p[1]); if (i < 0) { - perror(w_opt); + perror(w_arg); exit(1); } } if (reopen) { close(fd); - fd = open_log(w_opt, a_flag); + fd = open_log(w_arg, a_flag); reopen = 0; } } @@ -264,7 +273,7 @@ usage(void) { fprintf(stderr, - "usage: varnishlog %s [-aoV] [-w file]\n", VSL_USAGE); + "usage: varnishlog %s [-aDoV] [-P file] [-w file]\n", VSL_USAGE); exit(1); } @@ -272,33 +281,41 @@ main(int argc, char **argv) { int i, c; - int a_flag = 0, o_flag = 0; - char *w_opt = NULL; + int a_flag = 0, D_flag = 0, o_flag = 0; + const char *P_arg = NULL; + const char *w_arg = NULL; + struct pidfh *pfh = NULL; struct VSL_data *vd; vd = VSL_New(); - while ((c = getopt(argc, argv, VSL_ARGS "aoVw:")) != -1) { + while ((c = getopt(argc, argv, VSL_ARGS "aDoP:Vw:")) != -1) { switch (c) { case 'a': a_flag = 1; break; + case 'D': + D_flag = 1; + break; case 'o': o_flag = 1; break; + case 'P': + P_arg = optarg; + break; case 'V': varnish_version("varnishlog"); exit(0); case 'w': - w_opt = optarg; + w_arg = optarg; break; case 'c': - cflag = 1; + c_flag = 1; if (VSL_Arg(vd, c, optarg) > 0) break; usage(); case 'b': - bflag = 1; + b_flag = 1; if (VSL_Arg(vd, c, optarg) > 0) break; usage(); @@ -309,15 +326,30 @@ } } - if (o_flag && w_opt != NULL) + if (o_flag && w_arg != NULL) usage(); if (VSL_OpenLog(vd)) - exit (1); + exit(1); - if (w_opt != NULL) - do_write(vd, w_opt, a_flag); + if (P_arg && (pfh = vpf_open(P_arg, 0600, NULL)) == NULL) { + perror(P_arg); + exit(1); + } + if (D_flag && daemon(0, 0) == -1) { + perror("daemon()"); + if (pfh != NULL) + vpf_remove(pfh); + exit(1); + } + + if (pfh != NULL) + vpf_write(pfh); + + if (w_arg != NULL) + do_write(vd, w_arg, a_flag); + if (o_flag) do_order(vd, argc - optind, argv + optind); @@ -329,5 +361,7 @@ break; } - return (0); + if (pfh != NULL) + vpf_remove(pfh); + exit(0); } Modified: branches/1.0/bin/varnishstat/varnishstat.c =================================================================== --- branches/1.0/bin/varnishstat/varnishstat.c 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishstat/varnishstat.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -169,6 +169,5 @@ #undef MAC_STAT } - exit (0); - + exit(0); } Modified: branches/1.0/bin/varnishtop/varnishtop.c =================================================================== --- branches/1.0/bin/varnishtop/varnishtop.c 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/bin/varnishtop/varnishtop.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -39,8 +39,6 @@ #include #include -#include "compat/vis.h" - #include "vsb.h" #include "libvarnish.h" Modified: branches/1.0/configure.ac =================================================================== --- branches/1.0/configure.ac 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/configure.ac 2007-05-14 09:42:16 UTC (rev 1419) @@ -60,6 +60,7 @@ AC_CHECK_HEADERS([stddef.h]) AC_CHECK_HEADERS([stdlib.h]) AC_CHECK_HEADERS([unistd.h]) +AC_CHECK_HEADERS([vis.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -88,6 +89,7 @@ AC_CHECK_FUNCS([strlcat strlcpy]) AC_CHECK_FUNCS([strndup]) AC_CHECK_FUNCS([vis strvis strvisx]) +AC_CHECK_FUNCS([daemon]) save_LIBS="${LIBS}" LIBS="${LIBS} ${RT_LIBS}" @@ -101,7 +103,13 @@ # Now that we're done using the compiler to look for functions and # libraries, set CFLAGS to what we want them to be for our own code -DEVELOPER_CFLAGS="-Wall -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" + +# This corresponds to FreeBSD's WARNS level 6 +DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" + +# Turn off warnings for two issues which occur frequently in our code +#DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wextra -Wno-missing-field-initializers -Wno-sign-compare" + AC_ARG_ENABLE(developer-warnings, AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}") Modified: branches/1.0/include/Makefile.am =================================================================== --- branches/1.0/include/Makefile.am 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/include/Makefile.am 2007-05-14 09:42:16 UTC (rev 1419) @@ -14,11 +14,13 @@ compat/strndup.h \ compat/vasprintf.h \ compat/vis.h \ + flopen.h \ http_headers.h \ libvarnish.h \ libvcl.h \ miniobj.h \ queue.h \ + vpf.h \ vsb.h \ shmlog.h \ shmlog_tags.h \ Copied: branches/1.0/include/flopen.h (from rev 1418, trunk/varnish-cache/include/flopen.h) Copied: branches/1.0/include/vpf.h (from rev 1418, trunk/varnish-cache/include/vpf.h) Modified: branches/1.0/lib/libvarnish/Makefile.am =================================================================== --- branches/1.0/lib/libvarnish/Makefile.am 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/lib/libvarnish/Makefile.am 2007-05-14 09:42:16 UTC (rev 1419) @@ -11,8 +11,10 @@ cli.c \ cli_common.c \ crc32.c \ + flopen.c \ time.c \ version.c \ + vpf.c \ vsb.c libvarnish_la_CFLAGS = -include config.h Copied: branches/1.0/lib/libvarnish/flopen.c (from rev 1418, trunk/varnish-cache/lib/libvarnish/flopen.c) Copied: branches/1.0/lib/libvarnish/vpf.c (from rev 1418, trunk/varnish-cache/lib/libvarnish/vpf.c) Modified: branches/1.0/redhat/varnish.spec =================================================================== --- branches/1.0/redhat/varnish.spec 2007-05-14 09:02:23 UTC (rev 1418) +++ branches/1.0/redhat/varnish.spec 2007-05-14 09:42:16 UTC (rev 1419) @@ -1,12 +1,11 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.0.3 -Release: 7%{?dist} +Release: 8%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz -Patch0: varnish-1.0.3.redhat.patch0 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} @@ -47,15 +46,7 @@ %prep %setup -q -%patch0 -p0 -# Convert man pages to UTF-8 -for i in bin/*/*.1 man/*.7 -do - iconv -f iso-8859-1 -t utf-8 $i > $i.1.utf8 - rm -f $i && mv $i.1.utf8 $i -done - %build # Remove "--disable static" if you want to build static libraries @@ -67,8 +58,7 @@ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool -#%{__make} %{?_smp_mflags} -%{__make} +%{__make} %{?_smp_mflags} sed -e ' s/8080/80/g ' etc/vcl.conf > redhat/vcl.conf @@ -124,6 +114,7 @@ %post /sbin/chkconfig --add varnish +/sbin/chkconfig --add varnishlog %preun if [ $1 -lt 1 ]; then @@ -144,6 +135,10 @@ %postun libs -p /sbin/ldconfig %changelog +* Fri May 11 2007 Ingvar Hagelund - 1.0.svn-20070511 +- Threw latest changes into svn trunk +- Removed the conversion of manpages into utf8. They are all utf8 in trunk + * Wed May 09 2007 Ingvar Hagelund - 1.0.3-7 - Simplified the references to the subpackage names - Added init and logrotate scripts for varnishlog Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-14 09:02:23 UTC (rev 1418) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-14 09:42:16 UTC (rev 1419) @@ -435,6 +435,7 @@ /* cache_response.c */ void RES_Error(struct sess *sp, int code, const char *reason); +int Fake(struct sess *sp, int status, const char *reason, int ttl); void RES_WriteObj(struct sess *sp); /* cache_vcl.c */ Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-05-14 09:02:23 UTC (rev 1418) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -320,7 +320,9 @@ } usleep(100000 * n); } +#if 0 RES_Error(sp, 503, "Backend did not respond."); +#endif return (NULL); } Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-14 09:02:23 UTC (rev 1418) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -286,27 +286,20 @@ cnt_fetch(struct sess *sp) { - if (Fetch(sp)) { - sp->obj->cacheable = 0; - HSH_Unbusy(sp->obj); - HSH_Deref(sp->obj); - sp->obj = NULL; - sp->step = STP_DONE; - RES_Error(sp, 503, NULL); - return (0); - } + AZ(Fake(sp, 503, "Backend did not respond.", 30)); + } else { + RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */ - RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */ + VCL_fetch_method(sp); - VCL_fetch_method(sp); + if (sp->handling == VCL_RET_ERROR) + INCOMPL(); - if (sp->handling == VCL_RET_ERROR) - INCOMPL(); + if (sp->handling == VCL_RET_PASS) + sp->obj->pass = 1; + } - if (sp->handling == VCL_RET_PASS) - sp->obj->pass = 1; - sp->obj->cacheable = 1; if (sp->obj->objhead != NULL) { HSH_Ref(sp->obj); /* get another, STP_DELIVER will deref */ Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-14 09:02:23 UTC (rev 1418) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -29,11 +29,11 @@ * $Id$ */ -#include /* XXX: for NULL ?? */ -#include /* XXX: for NULL ?? */ #include #include +#include + #ifndef HAVE_CLOCK_GETTIME #include "compat/clock_gettime.h" #endif @@ -134,7 +134,7 @@ vsb_cat(sb, "Server: Varnish\r\n" "Connection: close\r\n" - "Content-Type: text/html; charset=iso-8859-1\r\n" + "Content-Type: text/html; charset=utf-8\r\n" "\r\n" "\r\n" "\r\n" @@ -162,7 +162,118 @@ vsb_delete(sb); } +/*--------------------------------------------------------------------*/ +int +Fake(struct sess *sp, int status, const char *reason, int ttl) +{ + struct storage *st; + struct object *o; + struct vsb vsb; + struct http_msg *mp; + const char *msg; + char buf[40]; + time_t now; + size_t len; + + CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); + CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); + CHECK_OBJ_NOTNULL(&sp->obj->http, HTTP_MAGIC); + assert(sp->obj->busy != 0); + o = sp->obj; + time(&now); + + assert(status >= 100 && status <= 999); + msg = "Unknown error"; + for (mp = http_msg; mp->nbr != 0 && mp->nbr <= status; mp++) { + if (mp->nbr < status) + continue; + if (mp->nbr > status) + break; + msg = mp->txt; + if (reason == NULL) + reason = mp->reason; + break; + } + if (reason == NULL) + reason = msg; + AN(reason); + AN(msg); + + o->response = status; + o->valid = 1; + o->entered = now; + o->ttl = now + ttl; + o->last_modified = now; + + /* generate body */ + st = stevedore->alloc(stevedore, 1024); + XXXAN(st->stevedore); + TAILQ_INSERT_TAIL(&sp->obj->store, st, list); + + vsb_new(&vsb, (char *)st->ptr, st->space, VSB_FIXEDLEN); + vsb_cat(&vsb, + "\r\n" + "\r\n" + " \r\n"); + vsb_printf(&vsb, + " %03d %s\r\n", status, msg); + vsb_printf(&vsb, + " \r\n" + " \r\n"); + vsb_printf(&vsb, + "

Error %03d %s

\r\n", status, msg); + vsb_printf(&vsb, + "

%s

\r\n", reason); + vsb_printf(&vsb, + "

Guru Meditation:

\r\n"); + vsb_printf(&vsb, + "

XID: %u

\r\n", sp->xid); + vsb_printf(&vsb, + " Varnish\r\n" + " \r\n" + "\r\n"); + vsb_finish(&vsb); + vsb_finish(&vsb); + o->len = st->len = vsb_len(&vsb); + vsb_delete(&vsb); + + /* generate header */ + o->http.s = calloc(len = 1024, 1); + XXXAN(o->http.s); + o->http.e = o->http.s + len; + + /* XXX we could use a little less magic here */ + vsb_new(&vsb, o->http.s, len, VSB_FIXEDLEN); + vsb_printf(&vsb, "\n"); + vsb_printf(&vsb, "\n"); + vsb_printf(&vsb, "HTTP/1.1\r\n"); + vsb_printf(&vsb, "%d\n", status); + vsb_printf(&vsb, "%s\n", reason); + TIM_format(now, buf); + vsb_printf(&vsb, "Date: %s\n", buf); + vsb_printf(&vsb, "Server: Varnish\n"); + vsb_printf(&vsb, "Retry-After: %ju\n", (uintmax_t)ttl); + vsb_printf(&vsb, "Content-Type: text/html; charset=utf-8\n"); + vsb_printf(&vsb, "Content-Length: %ud\n", o->len); + vsb_finish(&vsb); + vsb_delete(&vsb); + + /* XXX and here */ + o->http.f = o->http.s; + o->http.nhd = 0; + do { + o->http.hd[o->http.nhd].b = o->http.f; + while (*o->http.f != '\n') + ++o->http.f; + o->http.hd[o->http.nhd].e = o->http.f; + ++o->http.nhd; + ++o->http.f; + } while (*o->http.f); + + return (0); +} + /*--------------------------------------------------------------------*/ static void Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-14 09:02:23 UTC (rev 1418) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-14 09:42:16 UTC (rev 1419) @@ -199,5 +199,5 @@ TAILQ_INSERT_BEFORE(tp, tp2, list); } } - return (0); + exit(0); } From des at projects.linpro.no Tue May 15 11:01:34 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 15 May 2007 13:01:34 +0200 (CEST) Subject: r1420 - trunk/varnish-cache/include Message-ID: <20070515110134.410DF1EC405@projects.linpro.no> Author: des Date: 2007-05-15 13:01:34 +0200 (Tue, 15 May 2007) New Revision: 1420 Modified: trunk/varnish-cache/include/libvarnish.h Log: AN() and XXXAN() are also useful for non-pointer results. Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2007-05-14 09:42:16 UTC (rev 1419) +++ trunk/varnish-cache/include/libvarnish.h 2007-05-15 11:01:34 UTC (rev 1420) @@ -80,6 +80,6 @@ /* Assert zero return value */ #define AZ(foo) do { assert((foo) == 0); } while (0) -#define AN(foo) do { assert((foo) != NULL); } while (0) +#define AN(foo) do { assert((foo) != 0); } while (0) #define XXXAZ(foo) do { xxxassert((foo) == 0); } while (0) -#define XXXAN(foo) do { xxxassert((foo) != NULL); } while (0) +#define XXXAN(foo) do { xxxassert((foo) != 0); } while (0) From des at projects.linpro.no Tue May 15 11:15:50 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 15 May 2007 13:15:50 +0200 (CEST) Subject: r1421 - in trunk/varnish-cache/bin: varnishd varnishtop Message-ID: <20070515111550.2416E1EC439@projects.linpro.no> Author: des Date: 2007-05-15 13:15:49 +0200 (Tue, 15 May 2007) New Revision: 1421 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishtop/varnishtop.c Log: Revert accidental commit of unfinished negative-caching patch. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-15 11:01:34 UTC (rev 1420) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-15 11:15:49 UTC (rev 1421) @@ -435,7 +435,6 @@ /* cache_response.c */ void RES_Error(struct sess *sp, int code, const char *reason); -int Fake(struct sess *sp, int status, const char *reason, int ttl); void RES_WriteObj(struct sess *sp); /* cache_vcl.c */ Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-05-15 11:01:34 UTC (rev 1420) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-05-15 11:15:49 UTC (rev 1421) @@ -320,9 +320,7 @@ } usleep(100000 * n); } -#if 0 RES_Error(sp, 503, "Backend did not respond."); -#endif return (NULL); } Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-15 11:01:34 UTC (rev 1420) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-15 11:15:49 UTC (rev 1421) @@ -286,20 +286,27 @@ cnt_fetch(struct sess *sp) { + if (Fetch(sp)) { - AZ(Fake(sp, 503, "Backend did not respond.", 30)); - } else { - RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */ + sp->obj->cacheable = 0; + HSH_Unbusy(sp->obj); + HSH_Deref(sp->obj); + sp->obj = NULL; + sp->step = STP_DONE; + RES_Error(sp, 503, NULL); + return (0); + } - VCL_fetch_method(sp); + RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */ - if (sp->handling == VCL_RET_ERROR) - INCOMPL(); + VCL_fetch_method(sp); - if (sp->handling == VCL_RET_PASS) - sp->obj->pass = 1; - } + if (sp->handling == VCL_RET_ERROR) + INCOMPL(); + if (sp->handling == VCL_RET_PASS) + sp->obj->pass = 1; + sp->obj->cacheable = 1; if (sp->obj->objhead != NULL) { HSH_Ref(sp->obj); /* get another, STP_DELIVER will deref */ Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-15 11:01:34 UTC (rev 1420) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-15 11:15:49 UTC (rev 1421) @@ -29,11 +29,11 @@ * $Id$ */ +#include /* XXX: for NULL ?? */ +#include /* XXX: for NULL ?? */ #include #include -#include - #ifndef HAVE_CLOCK_GETTIME #include "compat/clock_gettime.h" #endif @@ -134,7 +134,7 @@ vsb_cat(sb, "Server: Varnish\r\n" "Connection: close\r\n" - "Content-Type: text/html; charset=utf-8\r\n" + "Content-Type: text/html; charset=iso-8859-1\r\n" "\r\n" "\r\n" "\r\n" @@ -162,118 +162,7 @@ vsb_delete(sb); } -/*--------------------------------------------------------------------*/ -int -Fake(struct sess *sp, int status, const char *reason, int ttl) -{ - struct storage *st; - struct object *o; - struct vsb vsb; - struct http_msg *mp; - const char *msg; - char buf[40]; - time_t now; - size_t len; - - CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); - CHECK_OBJ_NOTNULL(&sp->obj->http, HTTP_MAGIC); - assert(sp->obj->busy != 0); - o = sp->obj; - time(&now); - - assert(status >= 100 && status <= 999); - msg = "Unknown error"; - for (mp = http_msg; mp->nbr != 0 && mp->nbr <= status; mp++) { - if (mp->nbr < status) - continue; - if (mp->nbr > status) - break; - msg = mp->txt; - if (reason == NULL) - reason = mp->reason; - break; - } - if (reason == NULL) - reason = msg; - AN(reason); - AN(msg); - - o->response = status; - o->valid = 1; - o->entered = now; - o->ttl = now + ttl; - o->last_modified = now; - - /* generate body */ - st = stevedore->alloc(stevedore, 1024); - XXXAN(st->stevedore); - TAILQ_INSERT_TAIL(&sp->obj->store, st, list); - - vsb_new(&vsb, (char *)st->ptr, st->space, VSB_FIXEDLEN); - vsb_cat(&vsb, - "\r\n" - "\r\n" - " \r\n"); - vsb_printf(&vsb, - " %03d %s\r\n", status, msg); - vsb_printf(&vsb, - " \r\n" - " \r\n"); - vsb_printf(&vsb, - "

Error %03d %s

\r\n", status, msg); - vsb_printf(&vsb, - "

%s

\r\n", reason); - vsb_printf(&vsb, - "

Guru Meditation:

\r\n"); - vsb_printf(&vsb, - "

XID: %u

\r\n", sp->xid); - vsb_printf(&vsb, - " Varnish\r\n" - " \r\n" - "\r\n"); - vsb_finish(&vsb); - vsb_finish(&vsb); - o->len = st->len = vsb_len(&vsb); - vsb_delete(&vsb); - - /* generate header */ - o->http.s = calloc(len = 1024, 1); - XXXAN(o->http.s); - o->http.e = o->http.s + len; - - /* XXX we could use a little less magic here */ - vsb_new(&vsb, o->http.s, len, VSB_FIXEDLEN); - vsb_printf(&vsb, "\n"); - vsb_printf(&vsb, "\n"); - vsb_printf(&vsb, "HTTP/1.1\r\n"); - vsb_printf(&vsb, "%d\n", status); - vsb_printf(&vsb, "%s\n", reason); - TIM_format(now, buf); - vsb_printf(&vsb, "Date: %s\n", buf); - vsb_printf(&vsb, "Server: Varnish\n"); - vsb_printf(&vsb, "Retry-After: %ju\n", (uintmax_t)ttl); - vsb_printf(&vsb, "Content-Type: text/html; charset=utf-8\n"); - vsb_printf(&vsb, "Content-Length: %ud\n", o->len); - vsb_finish(&vsb); - vsb_delete(&vsb); - - /* XXX and here */ - o->http.f = o->http.s; - o->http.nhd = 0; - do { - o->http.hd[o->http.nhd].b = o->http.f; - while (*o->http.f != '\n') - ++o->http.f; - o->http.hd[o->http.nhd].e = o->http.f; - ++o->http.nhd; - ++o->http.f; - } while (*o->http.f); - - return (0); -} - /*--------------------------------------------------------------------*/ static void Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-15 11:01:34 UTC (rev 1420) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-15 11:15:49 UTC (rev 1421) @@ -199,5 +199,5 @@ TAILQ_INSERT_BEFORE(tp, tp2, list); } } - exit(0); + return (0); } From des at projects.linpro.no Tue May 15 11:19:29 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 15 May 2007 13:19:29 +0200 (CEST) Subject: r1422 - in branches/1.0: . include Message-ID: <20070515111929.244091EC3FE@projects.linpro.no> Author: des Date: 2007-05-15 13:19:29 +0200 (Tue, 15 May 2007) New Revision: 1422 Modified: branches/1.0/ branches/1.0/include/libvarnish.h Log: Merged revisions 1419-1421 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ................ r1419 | des | 2007-05-14 11:42:16 +0200 (Mon, 14 May 2007) | 78 lines [accidental commit of unfinished negative-caching patch] ................ r1420 | des | 2007-05-15 13:01:34 +0200 (Tue, 15 May 2007) | 2 lines AN() and XXXAN() are also useful for non-pointer results. ................ r1421 | des | 2007-05-15 13:15:49 +0200 (Tue, 15 May 2007) | 2 lines Revert accidental commit of unfinished negative-caching patch. ................ Property changes on: branches/1.0 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1418 + /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421 Modified: branches/1.0/include/libvarnish.h =================================================================== --- branches/1.0/include/libvarnish.h 2007-05-15 11:15:49 UTC (rev 1421) +++ branches/1.0/include/libvarnish.h 2007-05-15 11:19:29 UTC (rev 1422) @@ -80,6 +80,6 @@ /* Assert zero return value */ #define AZ(foo) do { assert((foo) == 0); } while (0) -#define AN(foo) do { assert((foo) != NULL); } while (0) +#define AN(foo) do { assert((foo) != 0); } while (0) #define XXXAZ(foo) do { xxxassert((foo) == 0); } while (0) -#define XXXAN(foo) do { xxxassert((foo) != NULL); } while (0) +#define XXXAN(foo) do { xxxassert((foo) != 0); } while (0) From des at projects.linpro.no Tue May 15 11:35:44 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 15 May 2007 13:35:44 +0200 (CEST) Subject: r1423 - trunk/varnish-cache/bin/varnishd Message-ID: <20070515113544.4788B1EC439@projects.linpro.no> Author: des Date: 2007-05-15 13:35:44 +0200 (Tue, 15 May 2007) New Revision: 1423 Modified: trunk/varnish-cache/bin/varnishd/common.h trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_cli.c trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/tcp.c Log: Attempt to fix the bind-to-any problem: - Introduce a "struct tcp_addr" which is a lightweight form of struct addrinfo for our own internal use. - Add a TCP_resolve() function which takes the output from TCP_parse() and fills in a list of pointers to struct tcp_addr, one for each address returned by getaddrinfo(). - Modify all TCP_open() callers to use TCP_resolve() and call TCP_open() once for every address returned. - Add some explanatory comments to tcp.c. Modified: trunk/varnish-cache/bin/varnishd/common.h =================================================================== --- trunk/varnish-cache/bin/varnishd/common.h 2007-05-15 11:19:29 UTC (rev 1422) +++ trunk/varnish-cache/bin/varnishd/common.h 2007-05-15 11:35:44 UTC (rev 1423) @@ -41,8 +41,10 @@ #define TCP_ADDRBUFSIZE 64 #define TCP_PORTBUFSIZE 16 +struct tcp_addr; + void TCP_name(struct sockaddr *addr, unsigned l, char *abuf, unsigned alen, char *pbuf, unsigned plen); void TCP_myname(int sock, char *abuf, unsigned alen, char *pbuf, unsigned plen); int TCP_parse(const char *str, char **addr, char **port); -int TCP_open(const char *addr, const char *port, int http); -void TCP_check(struct cli *cli, const char *addr, const char *port); +int TCP_resolve(const char *addr, const char *port, struct tcp_addr ***ta); +int TCP_open(const struct tcp_addr *addr, int http); Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2007-05-15 11:19:29 UTC (rev 1422) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2007-05-15 11:35:44 UTC (rev 1423) @@ -36,8 +36,7 @@ struct listen_sock { TAILQ_ENTRY(listen_sock) list; int sock; - char *host; - char *port; + struct tcp_addr *addr; }; TAILQ_HEAD(listen_sock_head, listen_sock); Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2007-05-15 11:19:29 UTC (rev 1422) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2007-05-15 11:35:44 UTC (rev 1423) @@ -130,7 +130,7 @@ TAILQ_FOREACH(ls, &heritage.socks, list) { if (ls->sock >= 0) continue; - ls->sock = TCP_open(ls->host, ls->port, 1); + ls->sock = TCP_open(ls->addr, 1); if (ls->sock < 0) return (1); } Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-05-15 11:19:29 UTC (rev 1422) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-05-15 11:35:44 UTC (rev 1423) @@ -55,8 +55,6 @@ #include "shmlog.h" static int cli_i = -1, cli_o = -1; -static int telnet_sock; -static struct ev *telnet_ev; /*--------------------------------------------------------------------*/ @@ -374,14 +372,13 @@ static int telnet_accept(struct ev *ev, int what) { - socklen_t l; - struct sockaddr addr[2]; /* XXX IPv6 hack */ + struct sockaddr_storage addr; + socklen_t addrlen; int i; - (void)ev; (void)what; - l = sizeof addr; - i = accept(telnet_sock, addr, &l); + addrlen = sizeof addr; + i = accept(ev->fd, (struct sockaddr *)&addr, &addrlen); if (i < 0) return (0); @@ -392,21 +389,29 @@ int mgt_cli_telnet(const char *T_arg) { + struct tcp_addr **ta; char *addr, *port; + int i, n; - TCP_parse(T_arg, &addr, &port); - telnet_sock = TCP_open(addr, port, 0); + XXXAZ(TCP_parse(T_arg, &addr, &port)); + XXXAN(n = TCP_resolve(addr, port, &ta)); free(addr); free(port); - if (telnet_sock < 0) { + if (n == 0) { fprintf(stderr, "Could not open TELNET port\n"); - exit (2); + exit(2); } - telnet_ev = ev_new(); - XXXAN(telnet_ev); - telnet_ev->fd = telnet_sock; - telnet_ev->fd_flags = POLLIN; - telnet_ev->callback = telnet_accept; - ev_add(mgt_evb, telnet_ev); + for (i = 0; i < n; ++i) { + int sock = TCP_open(ta[i], 0); + struct ev *ev = ev_new(); + XXXAN(ev); + ev->fd = sock; + ev->fd_flags = POLLIN; + ev->callback = telnet_accept; + ev_add(mgt_evb, ev); + free(ta[i]); + ta[i] = NULL; + } + free(ta); return (0); } Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-15 11:19:29 UTC (rev 1422) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-15 11:35:44 UTC (rev 1423) @@ -29,11 +29,11 @@ * $Id$ */ +#include #include +#include #include -#include #include -#include #include "cli.h" #include "cli_priv.h" @@ -284,8 +284,7 @@ TAILQ_FOREACH_SAFE(ls, lsh, list, ls2) { TAILQ_REMOVE(lsh, ls, list); - free(ls->host); - free(ls->port); + free(ls->addr); free(ls); } } @@ -323,21 +322,31 @@ } TAILQ_INIT(&lsh); for (i = 1; av[i] != NULL; i++) { - ls = calloc(sizeof *ls, 1); - AN(ls); - ls->sock = -1; - TAILQ_INSERT_TAIL(&lsh, ls, list); - if (TCP_parse(av[i], &ls->host, &ls->port) != 0) { + struct tcp_addr **ta; + char *host, *port; + int j, n; + + if (TCP_parse(av[i], &host, &port) != 0) { cli_out(cli, "Invalid listen address \"%s\"", av[i]); cli_result(cli, CLIS_PARAM); break; } - if (ls->port == NULL) - ls->port = strdup("http"); - AN(ls->port); - TCP_check(cli, ls->host, ls->port); - if (cli->result != CLIS_OK) + n = TCP_resolve(host, port ? port : "http", &ta); + free(host); + free(port); + if (n == 0) { + cli_out(cli, "Invalid listen address \"%s\"", av[i]); + cli_result(cli, CLIS_PARAM); break; + } + for (j = 0; j < n; ++j) { + ls = calloc(sizeof *ls, 1); + AN(ls); + ls->sock = -1; + ls->addr = ta[j]; + TAILQ_INSERT_TAIL(&lsh, ls, list); + } + free(ta); } FreeArgv(av); if (cli->result != CLIS_OK) { Modified: trunk/varnish-cache/bin/varnishd/tcp.c =================================================================== --- trunk/varnish-cache/bin/varnishd/tcp.c 2007-05-15 11:19:29 UTC (rev 1422) +++ trunk/varnish-cache/bin/varnishd/tcp.c 2007-05-15 11:35:44 UTC (rev 1423) @@ -53,6 +53,15 @@ #include "cli.h" #include "cli_priv.h" +/* lightweight addrinfo */ +struct tcp_addr { + int ta_family; + int ta_socktype; + int ta_protocol; + socklen_t ta_addrlen; + struct sockaddr_storage ta_addr; +}; + /*--------------------------------------------------------------------*/ void @@ -109,6 +118,16 @@ } #endif +/* + * Take a string provided by the user and break it up into address and + * port parts. Examples of acceptable input include: + * + * "localhost" - "localhost:80" + * "127.0.0.1" - "127.0.0.1:80" + * "0.0.0.0" - "0.0.0.0:80" + * "[::1]" - "[::1]:80" + * "[::]" - "[::]:80" + */ int TCP_parse(const char *str, char **addr, char **port) { @@ -123,88 +142,124 @@ (p[1] != '\0' && p[1] != ':')) return (-1); *addr = strndup(str + 1, p - (str + 1)); - if (p[1] == ':') + XXXAN(*addr); + if (p[1] == ':') { *port = strdup(p + 2); + XXXAN(*port); + } } else { /* IPv4 address of the form 127.0.0.1:80, or non-numeric */ p = strchr(str, ':'); if (p == NULL) { *addr = strdup(str); + XXXAN(*addr); } else { - if (p > str) + if (p > str) { *addr = strndup(str, p - str); + XXXAN(*addr); + } *port = strdup(p + 1); + XXXAN(*port); } } return (0); } -/*--------------------------------------------------------------------*/ - -void -TCP_check(struct cli *cli, const char *addr, const char *port) +/* + * For a given host and port, return a list of struct tcp_addr, which + * contains all the information necessary to open and bind a socket. One + * tcp_addr is returned for each distinct address returned by + * getaddrinfo(). + * + * The value pointed to by the tap parameter receives a pointer to an + * array of pointers to struct tcp_addr. The caller is responsible for + * freeing each individual struct tcp_addr as well as the array. + * + * The return value is the number of addresses resoved, or zero. + */ +int +TCP_resolve(const char *addr, const char *port, struct tcp_addr ***tap) { - struct addrinfo hints, *res; - int ret; + struct addrinfo hints, *res0, *res; + struct tcp_addr **ta; + int i, ret; - memset(&hints, 0, sizeof hints); - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; - ret = getaddrinfo(addr, port, &hints, &res); - if (ret == 0) { - freeaddrinfo(res); - return; + memset(&hints, 0, sizeof hints); + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_PASSIVE; + ret = getaddrinfo(addr, port, &hints, &res0); + if (ret != 0) { + fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(ret)); + return (0); + } + for (res = res0, i = 0; res != NULL; res = res->ai_next) + ++i; + ta = calloc(i, sizeof *ta); + XXXAN(ta); + *tap = ta; + for (res = res0, i = 0; res != NULL; res = res->ai_next, ++i) { + ta[i] = calloc(1, sizeof *ta[i]); + XXXAN(ta[i]); + ta[i]->ta_family = res->ai_family; + ta[i]->ta_socktype = res->ai_socktype; + ta[i]->ta_protocol = res->ai_protocol; + ta[i]->ta_addrlen = res->ai_addrlen; + xxxassert(ta[i]->ta_addrlen <= sizeof ta[i]->ta_addr); + memcpy(&ta[i]->ta_addr, res->ai_addr, ta[i]->ta_addrlen); } - cli_out(cli, "getaddrinfo(%s, %s): %s\n", - addr, port, gai_strerror(ret)); - cli_result(cli, CLIS_PARAM); + freeaddrinfo(res0); + return (i); } +/* + * Given a struct tcp_addr, open a socket of the appropriate type, bind it + * to the requested address, and start listening. + * + * If the address is an IPv6 address, the IPV6_V6ONLY option is set to + * avoid conflicts between INADDR_ANY and IN6ADDR_ANY. + * + * If the http parameter is non-zero and accept filters are available, + * install an HTTP accept filter on the socket. + */ int -TCP_open(const char *addr, const char *port, int http) +TCP_open(const struct tcp_addr *ta, int http) { - struct addrinfo hints, *res; - int ret, sd, val; + int sd, val; - memset(&hints, 0, sizeof hints); - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; - ret = getaddrinfo(addr, port, &hints, &res); - if (ret != 0) { - fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(ret)); - return (-1); - } - sd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + sd = socket(ta->ta_family, ta->ta_socktype, ta->ta_protocol); if (sd < 0) { perror("socket()"); - freeaddrinfo(res); return (-1); } val = 1; if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof val) != 0) { perror("setsockopt(SO_REUSEADDR, 1)"); - freeaddrinfo(res); close(sd); return (-1); } - if (bind(sd, res->ai_addr, res->ai_addrlen) != 0) { +#ifdef IPV6_V6ONLY + /* forcibly use separate sockets for IPv4 and IPv6 */ + val = 1; + if (ta->ta_family == AF_INET6 && + setsockopt(sd, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof val) != 0) { + perror("setsockopt(IPV6_V6ONLY, 1)"); + close(sd); + return (-1); + } +#endif + if (bind(sd, (const struct sockaddr *)&ta->ta_addr, ta->ta_addrlen) != 0) { perror("bind()"); - freeaddrinfo(res); close(sd); return (-1); } if (listen(sd, http ? params->listen_depth : 16) != 0) { perror("listen()"); - freeaddrinfo(res); close(sd); return (-1); } #ifdef HAVE_ACCEPT_FILTERS if (http) accept_filter(sd); -#else - (void)http; #endif - freeaddrinfo(res); return (sd); } From phk at phk.freebsd.dk Tue May 15 12:01:33 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 15 May 2007 12:01:33 +0000 Subject: r1423 - trunk/varnish-cache/bin/varnishd In-Reply-To: Your message of "Tue, 15 May 2007 13:35:44 +0200." <20070515113544.4788B1EC439@projects.linpro.no> Message-ID: <6394.1179230493@critter.freebsd.dk> In message <20070515113544.4788B1EC439 at projects.linpro.no>, des at projects.linpro .no writes: > struct listen_sock { > TAILQ_ENTRY(listen_sock) list; > int sock; >- char *host; >- char *port; >+ struct tcp_addr *addr; > }; I'm not happy with this one. I kept the string forms given in argv around so that we could do periodic DNS lookups on it, to see if things moved. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From des at projects.linpro.no Tue May 15 19:38:56 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 15 May 2007 21:38:56 +0200 (CEST) Subject: r1424 - trunk/varnish-cache/etc Message-ID: <20070515193856.D65961EC42E@projects.linpro.no> Author: des Date: 2007-05-15 21:38:56 +0200 (Tue, 15 May 2007) New Revision: 1424 Added: trunk/varnish-cache/etc/default.vcl Removed: trunk/varnish-cache/etc/vcl.conf Log: Rename vcl.conf to default.vcl, update and comment the sample code. Copied: trunk/varnish-cache/etc/default.vcl (from rev 1423, trunk/varnish-cache/etc/vcl.conf) =================================================================== --- trunk/varnish-cache/etc/vcl.conf 2007-05-15 11:35:44 UTC (rev 1423) +++ trunk/varnish-cache/etc/default.vcl 2007-05-15 19:38:56 UTC (rev 1424) @@ -0,0 +1,88 @@ +# +# This is a basic VCL configuration file for varnish. See the vcl(7) +# man page for details on VCL syntax and semantics. +# +# $Id$ +# + +# Default backend definition. Set this to point to your content +# server. + +backend default { + set backend.host = "127.0.0.1"; + set backend.port = "8080"; +} + +# Below is a commented-out copy of the default VCL logic. If you +# redefine any of these subroutines, the built-in logic will be +# appended to your code. + +## Called when a client request is received +# +#sub vcl_recv { +# if (req.request != "GET" && req.request != "HEAD") { +# pipe; +# } +# if (req.http.Expect) { +# pipe; +# } +# if (req.http.Authenticate || req.http.Cookie) { +# pass; +# } +# lookup; +#} +# +## Called when entering pipe mode +# +#sub vcl_pipe { +# pipe; +#} +# +## Called when entering pass mode +# +#sub vcl_pass { +# pass; +#} +# +## Called when entering an object into the cache +# +#sub vcl_hash { +# hash; +#} +# +## Called when the requested object was found in the cache +# +#sub vcl_hit { +# if (!obj.cacheable) { +# pass; +# } +# deliver; +#} +# +## Called when the requested object was not found in the cache +# +#sub vcl_miss { +# fetch; +#} +# +## Called when the requested object has been retrieved from the +## backend, or the request to the backend has failed +# +#sub vcl_fetch { +# if (!obj.valid) { +# error; +# } +# if (!obj.cacheable) { +# pass; +# } +# if (resp.http.Set-Cookie) { +# pass; +# } +# insert; +#} +# +## Called when an object nears its expiry time +# +#sub vcl_timeout { +# discard; +#} Deleted: trunk/varnish-cache/etc/vcl.conf =================================================================== --- trunk/varnish-cache/etc/vcl.conf 2007-05-15 11:35:44 UTC (rev 1423) +++ trunk/varnish-cache/etc/vcl.conf 2007-05-15 19:38:56 UTC (rev 1424) @@ -1,31 +0,0 @@ -# -# This is a basic VCL configuration file for varnish. See the vcl(7) -# man page for details on VCL syntax and semantics. -# -# $Id$ -# - -backend default { - set backend.host = "127.0.0.1"; - set backend.port = "8080"; -} - -sub vcl_recv { - # pass mode can't handle POST (yet) - if (req.request == "POST") { - pipe; - } - - # force lookup even when cookies are present - if (req.request == "GET" && req.http.cookie) { - lookup; - } -} - -sub vcl_fetch { - # force minimum ttl of 180 seconds - if (obj.ttl < 180s) { - set obj.ttl = 180s; - } -} - From des at projects.linpro.no Wed May 16 09:34:26 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 16 May 2007 11:34:26 +0200 (CEST) Subject: r1425 - in trunk/varnish-cache/bin: varnishstat varnishtop Message-ID: <20070516093426.827751EC2AF@projects.linpro.no> Author: des Date: 2007-05-16 11:34:26 +0200 (Wed, 16 May 2007) New Revision: 1425 Modified: trunk/varnish-cache/bin/varnishstat/Makefile.am trunk/varnish-cache/bin/varnishtop/Makefile.am Log: Expand tags Modified: trunk/varnish-cache/bin/varnishstat/Makefile.am =================================================================== --- trunk/varnish-cache/bin/varnishstat/Makefile.am 2007-05-15 19:38:56 UTC (rev 1424) +++ trunk/varnish-cache/bin/varnishstat/Makefile.am 2007-05-16 09:34:26 UTC (rev 1425) @@ -1,4 +1,4 @@ -# $Id: Makefile.am 133 2006-04-06 09:38:00Z phk $ +# $Id$ INCLUDES = -I$(top_srcdir)/include Property changes on: trunk/varnish-cache/bin/varnishstat/Makefile.am ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/varnish-cache/bin/varnishtop/Makefile.am =================================================================== --- trunk/varnish-cache/bin/varnishtop/Makefile.am 2007-05-15 19:38:56 UTC (rev 1424) +++ trunk/varnish-cache/bin/varnishtop/Makefile.am 2007-05-16 09:34:26 UTC (rev 1425) @@ -1,4 +1,4 @@ -# $Id: Makefile.am 347 2006-07-06 09:31:45Z des $ +# $Id$ INCLUDES = -I$(top_srcdir)/include Property changes on: trunk/varnish-cache/bin/varnishtop/Makefile.am ___________________________________________________________________ Name: svn:keywords + Id From des at projects.linpro.no Wed May 16 09:35:18 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 16 May 2007 11:35:18 +0200 (CEST) Subject: r1426 - in trunk/varnish-cache: . etc Message-ID: <20070516093518.61CA61EC52F@projects.linpro.no> Author: des Date: 2007-05-16 11:35:18 +0200 (Wed, 16 May 2007) New Revision: 1426 Added: trunk/varnish-cache/etc/Makefile.am Modified: trunk/varnish-cache/Makefile.am trunk/varnish-cache/configure.ac Log: Distribute default.vcl. Modified: trunk/varnish-cache/Makefile.am =================================================================== --- trunk/varnish-cache/Makefile.am 2007-05-16 09:34:26 UTC (rev 1425) +++ trunk/varnish-cache/Makefile.am 2007-05-16 09:35:18 UTC (rev 1426) @@ -1,5 +1,5 @@ # $Id$ -SUBDIRS = include lib bin man +SUBDIRS = include lib bin man etc EXTRA_DIST = LICENSE autogen.sh debian redhat Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2007-05-16 09:34:26 UTC (rev 1425) +++ trunk/varnish-cache/configure.ac 2007-05-16 09:35:18 UTC (rev 1426) @@ -130,6 +130,7 @@ bin/varnishncsa/Makefile bin/varnishstat/Makefile bin/varnishtop/Makefile + etc/Makefile include/Makefile lib/Makefile lib/libcompat/Makefile Added: trunk/varnish-cache/etc/Makefile.am =================================================================== --- trunk/varnish-cache/etc/Makefile.am 2007-05-16 09:34:26 UTC (rev 1425) +++ trunk/varnish-cache/etc/Makefile.am 2007-05-16 09:35:18 UTC (rev 1426) @@ -0,0 +1,3 @@ +# $Id$ + +EXTRA_DIST = default.vcl Property changes on: trunk/varnish-cache/etc/Makefile.am ___________________________________________________________________ Name: svn:keywords + Id From ssm at projects.linpro.no Wed May 16 10:52:15 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Wed, 16 May 2007 12:52:15 +0200 (CEST) Subject: r1427 - trunk/varnish-cache/etc Message-ID: <20070516105215.2A4D51EC3FE@projects.linpro.no> Author: ssm Date: 2007-05-16 12:52:15 +0200 (Wed, 16 May 2007) New Revision: 1427 Added: trunk/varnish-cache/etc/zope-plone.vcl Log: Added example vcl to use in front of zope+plone (this could perhaps go in a contrib/ directory instead) Added: trunk/varnish-cache/etc/zope-plone.vcl =================================================================== --- trunk/varnish-cache/etc/zope-plone.vcl 2007-05-16 09:35:18 UTC (rev 1426) +++ trunk/varnish-cache/etc/zope-plone.vcl 2007-05-16 10:52:15 UTC (rev 1427) @@ -0,0 +1,137 @@ +# +# This is a basic VCL configuration file for varnish. See the vcl(7) +# man page for details on VCL syntax and semantics. +# +# $Id: default.vcl 1424 2007-05-15 19:38:56Z des $ +# + +# Default backend definition. Set this to point to your content +# server. + +backend default { + set backend.host = "127.0.0.1"; + set backend.port = "9673"; +} + +acl purge { + "localhost"; + "192.0.2.0"/24; +} + +sub vcl_recv { + if (req.request != "GET" && req.request != "HEAD") { + pipe; + } + if (req.http.Expect) { + pipe; + } + if (req.http.Authenticate) { + pass; + } + # We only care about the "__ac.*" cookies, used for authentication + if (req.http.Cookie && req.http.Cookie ~ "__ac(|_(name|password|persistent))=") { + pass; + } + # PURGE request if zope asks nicely + if (req.request == "PURGE") { + if (!client.ip ~ purge) { + error 405 "Not allowed."; + } + lookup; + } + lookup; +} + +# Do the PURGE thing +sub vcl_hit { + if (req.request == "PURGE") { + set obj.ttl = 0s; + error 200 "Purged"; + } +} +sub vcl_miss { + if (req.request == "PURGE") { + error 404 "Not in cache"; + } +} + +# Enforce a minimum TTL, since we PURGE changed objects actively from Zope. +sub vcl_fetch { + if (obj.ttl < 3600s) { + set obj.ttl = 3600s; + } +} + +# Below is a commented-out copy of the default VCL logic. If you +# redefine any of these subroutines, the built-in logic will be +# appended to your code. + +## Called when a client request is received +# +#sub vcl_recv { +# if (req.request != "GET" && req.request != "HEAD") { +# pipe; +# } +# if (req.http.Expect) { +# pipe; +# } +# if (req.http.Authenticate || req.http.Cookie) { +# pass; +# } +# lookup; +#} +# +## Called when entering pipe mode +# +#sub vcl_pipe { +# pipe; +#} +# +## Called when entering pass mode +# +#sub vcl_pass { +# pass; +#} +# +## Called when entering an object into the cache +# +#sub vcl_hash { +# hash; +#} +# +## Called when the requested object was found in the cache +# +#sub vcl_hit { +# if (!obj.cacheable) { +# pass; +# } +# deliver; +#} +# +## Called when the requested object was not found in the cache +# +#sub vcl_miss { +# fetch; +#} +# +## Called when the requested object has been retrieved from the +## backend, or the request to the backend has failed +# +#sub vcl_fetch { +# if (!obj.valid) { +# error; +# } +# if (!obj.cacheable) { +# pass; +# } +# if (resp.http.Set-Cookie) { +# pass; +# } +# insert; +#} +# +## Called when an object nears its expiry time +# +#sub vcl_timeout { +# discard; +#} From ssm at projects.linpro.no Wed May 16 10:53:30 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Wed, 16 May 2007 12:53:30 +0200 (CEST) Subject: r1428 - trunk/varnish-cache/debian Message-ID: <20070516105330.C95FB1EC3E3@projects.linpro.no> Author: ssm Date: 2007-05-16 12:53:30 +0200 (Wed, 16 May 2007) New Revision: 1428 Added: trunk/varnish-cache/debian/varnish.postrm Removed: trunk/varnish-cache/debian/postrm Log: fix upgrade issue in postrm script, and rename it to .postrm to match other debian control files Deleted: trunk/varnish-cache/debian/postrm =================================================================== --- trunk/varnish-cache/debian/postrm 2007-05-16 10:52:15 UTC (rev 1427) +++ trunk/varnish-cache/debian/postrm 2007-05-16 10:53:30 UTC (rev 1428) @@ -1,44 +0,0 @@ -#! /bin/sh -e - -set -e - -case "$1" in - remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - - if test -e /var/log/varnish && ! [ "$1" = upgrade ]; then - - rm -rf /var/log/varnish 2>&1 > /dev/null || exit 78 - - fi - - if test -e /var/lib/varnish; then - - rm -rf /var/lib/varnish 2>&1 > /dev/null || exit 78 - fi - - ;; - - purge) - - if test -e /var/log/varnish; then - - rm -rf /var/log/varnish 2>&1 > /dev/null || exit 78 - - fi - - if test -e /var/lib/varnish; then - - rm -rf /var/lib/varnish 2>&1 > /dev/null || exit 78 - fi - - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 64 - -esac - -#DEBHELPER# - -exit 0 Copied: trunk/varnish-cache/debian/varnish.postrm (from rev 1424, trunk/varnish-cache/debian/postrm) =================================================================== --- trunk/varnish-cache/debian/postrm 2007-05-15 19:38:56 UTC (rev 1424) +++ trunk/varnish-cache/debian/varnish.postrm 2007-05-16 10:53:30 UTC (rev 1428) @@ -0,0 +1,47 @@ +#! /bin/sh -e + +set -e + +case "$1" in + upgrade) + ;; + + remove|failed-upgrade|abort-install|abort-upgrade|disappear) + + if test -e /var/log/varnish ; then + + rm -rf /var/log/varnish 2>&1 > /dev/null || exit 78 + + fi + + if test -e /var/lib/varnish; then + + rm -rf /var/lib/varnish 2>&1 > /dev/null || exit 78 + fi + + ;; + + purge) + + if test -e /var/log/varnish; then + + rm -rf /var/log/varnish 2>&1 > /dev/null || exit 78 + + fi + + if test -e /var/lib/varnish; then + + rm -rf /var/lib/varnish 2>&1 > /dev/null || exit 78 + fi + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 64 + +esac + +#DEBHELPER# + +exit 0 From ssm at projects.linpro.no Wed May 16 10:54:38 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Wed, 16 May 2007 12:54:38 +0200 (CEST) Subject: r1429 - trunk/varnish-cache/debian Message-ID: <20070516105438.C2C211EC42E@projects.linpro.no> Author: ssm Date: 2007-05-16 12:54:38 +0200 (Wed, 16 May 2007) New Revision: 1429 Removed: trunk/varnish-cache/debian/vcl.conf Log: Ship with etc/default.vcl instead, no need for a separate configuration file Deleted: trunk/varnish-cache/debian/vcl.conf =================================================================== --- trunk/varnish-cache/debian/vcl.conf 2007-05-16 10:53:30 UTC (rev 1428) +++ trunk/varnish-cache/debian/vcl.conf 2007-05-16 10:54:38 UTC (rev 1429) @@ -1,27 +0,0 @@ -# This is a basic vcl.conf file for varnish. -# Modifying this file should be where you store your modifications to -# varnish. Settnigs here will override defaults. - -backend default { - set backend.host = "127.0.0.1"; - set backend.port = "80"; -} - -sub vcl_recv { - if (req.request == "POST") { - pipe; - } - - # force lookup even when cookies are present - if (req.request == "GET" && req.http.cookie) { - lookup; - } -} - -sub vcl_fetch { - # force minimum ttl of 180 seconds - if (obj.ttl < 180s) { - set obj.ttl = 180s; - } -} - From ssm at projects.linpro.no Wed May 16 10:59:13 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Wed, 16 May 2007 12:59:13 +0200 (CEST) Subject: r1430 - trunk/varnish-cache/debian Message-ID: <20070516105913.B65AC1EC3E3@projects.linpro.no> Author: ssm Date: 2007-05-16 12:59:13 +0200 (Wed, 16 May 2007) New Revision: 1430 Added: trunk/varnish-cache/debian/varnish.examples Modified: trunk/varnish-cache/debian/rules Log: Use etc/default.vcl instead of debian/vcl.conf Register etc/zope-plone.vcl as an example configuration file Typo patrol Modified: trunk/varnish-cache/debian/rules =================================================================== --- trunk/varnish-cache/debian/rules 2007-05-16 10:54:38 UTC (rev 1429) +++ trunk/varnish-cache/debian/rules 2007-05-16 10:59:13 UTC (rev 1430) @@ -67,7 +67,7 @@ dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/varnish - install -m 644 $(CURDIR)/debian/vcl.conf $(CURDIR)/debian/varnish/etc/varnish/ + install -m 644 $(CURDIR)/etc/default.vcl $(CURDIR)/debian/varnish/etc/varnish/ install -m 644 $(CURDIR)/debian/lintian-override $(CURDIR)/debian/varnish/usr/share/lintian/overrides/varnish @@ -81,9 +81,10 @@ dh_testroot dh_installchangelogs ChangeLog dh_installdocs - # Since varnish looses its cache on restart - we don't. + # Since varnish loses its cache on restart - we don't. dh_installinit -r dh_installman + dh_installexamples dh_link dh_strip dh_compress Added: trunk/varnish-cache/debian/varnish.examples =================================================================== --- trunk/varnish-cache/debian/varnish.examples 2007-05-16 10:54:38 UTC (rev 1429) +++ trunk/varnish-cache/debian/varnish.examples 2007-05-16 10:59:13 UTC (rev 1430) @@ -0,0 +1 @@ +etc/zope-plone.vcl From des at linpro.no Wed May 16 11:20:33 2007 From: des at linpro.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=) Date: Wed, 16 May 2007 13:20:33 +0200 Subject: r1423 - trunk/varnish-cache/bin/varnishd In-Reply-To: <6394.1179230493@critter.freebsd.dk> (Poul-Henning Kamp's message of "Tue\, 15 May 2007 12\:01\:33 +0000") References: <6394.1179230493@critter.freebsd.dk> Message-ID: <874pmdrp4u.fsf@des.linpro.no> "Poul-Henning Kamp" writes: > I'm not happy with this one. > > I kept the string forms given in argv around so that we could > do periodic DNS lookups on it, to see if things moved. Well, no such periodic lookups were implemented, so I had no way of knowing they were intended. We can't keep the string forms in struct listen_sock anyway, because a single string can resolve to multiple sockets. We could probably store the address spec in a run-time parameter, though. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From ssm at projects.linpro.no Wed May 16 11:38:08 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Wed, 16 May 2007 13:38:08 +0200 (CEST) Subject: r1431 - trunk/varnish-cache/debian Message-ID: <20070516113808.EEF0A1EC42E@projects.linpro.no> Author: ssm Date: 2007-05-16 13:38:08 +0200 (Wed, 16 May 2007) New Revision: 1431 Modified: trunk/varnish-cache/debian/varnish.default trunk/varnish-cache/debian/varnish.init Log: Init-script: * Move user-adjustable parts from init script to defaults file, expect $DAEMON_OPTS instead of a whole forest of variables. * We have a pid file argument, wheee. :D Defaults file: * Created alternative default templates, selected a one-backend default without VCL file. Modified: trunk/varnish-cache/debian/varnish.default =================================================================== --- trunk/varnish-cache/debian/varnish.default 2007-05-16 10:59:13 UTC (rev 1430) +++ trunk/varnish-cache/debian/varnish.default 2007-05-16 11:38:08 UTC (rev 1431) @@ -1,44 +1,91 @@ # Configuration file for varnish +# +# /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this +# shell script fragment. +# +# This file contains 4 alternatives, please use only one. -# Main configuration file. You probably want to change it :) -VARNISH_VCL_CONF=/etc/varnish/vcl.conf +## Alternative 1, Minimal configuration, no VCL +# +# Listen on localhost:6081, administration on localhost:6082, and forward to +# content server on localhost:8080. Use a fixed size file storage. +# +DAEMON_OPTS="-a localhost:6081 \ + -T localhost:6082 \ + -b localhost:8080 \ + -s file,/var/lib/varnish/varnish_storage.bin,10485760" -# Default address and port to bind to -VARNISH_LISTEN_ADDRESS=0.0.0.0 -VARNISH_LISTEN_PORT=6081 +## Alternative 2, Configuration with VCL +# +# Listen on localhost:6081, administration on localhost:6082, and forward to +# one content server selected by the vcl file, based on the request. Use a +# fixed size file storage. +# +# DAEMON_OPTS="-a localhost:6081 \ +# -T localhost:6082 \ +# -f /etc/varnish/default.vcl \ +# -s file,/var/lib/varnish/varnish_storage.bin,10485760" -# Telnet admin interface listen address and port -VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 -VARNISH_ADMIN_LISTEN_PORT=6082 +## Alternative 3, Advanced configuration +# +# See varnishd(1) for more information. +# +# # Main configuration file. You probably want to change it :) +# VARNISH_VCL_CONF=/etc/varnish/default.vcl +# +# # Default address and port to bind to +# VARNISH_LISTEN_ADDRESS=0.0.0.0 +# VARNISH_LISTEN_PORT=6081 +# +# +# # Telnet admin interface listen address and port +# VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 +# VARNISH_ADMIN_LISTEN_PORT=6082 +# +# +# # The minimum number of threads to start +# VARNISH_MIN_WORKER_THREADS=1 +# +# +# # Maximum number of worker threads or INF for unlimited +# VARNISH_MAX_WORKER_THREADS=2048 +# +# +# # Timeout value in seconds for threads to return +# VARNISH_WORKER_THREAD_TIMEOUT=10 +# +# +# # Hash algorithm to be used +# VARNISH_HASHOPTION=classic +# +# +# # Maximum size of the backend storagefile in bytes +# VARNISH_BACKEND_STORAGE_SIZE=10240000 +# VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin +# +# +# # Backend storage specification +# VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}" +# +# +# # Set default ttl in secounds +# VARNISH_TTL=120 +# +# # DAEMON_OPTS is used by the init script. If you add or remove options, make +# # sure you update this section, too. +# DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ +# -h ${VARNISH_HASHOPTION} \ +# -f ${VARNISH_VCL_CONF} \ +# -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ +# -t ${VARNISH_TTL} \ +# -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ +# -s ${VARNISH_BACKEND_STORAGE}" +# -# The minimum number of threads to start -VARNISH_MIN_WORKER_THREADS=1 - -# Maximum number of worker threads or INF for unlimited -VARNISH_MAX_WORKER_THREADS=2048 - - -# Timeout value in seconds for threads to return -VARNISH_WORKER_THREAD_TIMEOUT=10 - - -# Hash algorithm to be used -VARNISH_HASHOPTION=classic - - -# Maximum size of the backend storagefile in bytes -VARNISH_BACKEND_STORAGE_SIZE=10240000 -VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin - - -# Backend storage specification -VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}" - - -# Set default ttl in secounds -VARNISH_TTL=120 - +## Alternative 4, Do It Yourself +# +# DAEMON_OPTS="" Modified: trunk/varnish-cache/debian/varnish.init =================================================================== --- trunk/varnish-cache/debian/varnish.init 2007-05-16 10:59:13 UTC (rev 1430) +++ trunk/varnish-cache/debian/varnish.init 2007-05-16 11:38:08 UTC (rev 1431) @@ -1,34 +1,28 @@ #! /bin/sh # -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg . -# Modified for Debian -# by Ian Murdock . -# -# Version: @(#)skeleton 1.9 26-Feb-2001 miquels at cistron.nl -# +# varnish Control the varnish HTTP accelerator ### BEGIN INIT INFO # Provides: varnish # Required-Start: $local_fs $network # Required-Stop: $local_fs $network -# Should-Start: $remote_fs -# Should-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: Start HTTPd accelerator +# Short-Description: Start HTTP accelerator # Description: This script provides a server-side cache # to be run in front of a httpd and should -# listen on port 80 on a properly configured +# listen on port 80 on a properly configured # system ### END INIT INFO -NAME=varnish -DESC="HTTPd accelerator" +# Source function library +. /lib/lsb/init-functions + +NAME=varnishd +DESC="HTTP accelerator" PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/varnishd +PIDFILE=/var/run/$NAME.pid test -x $DAEMON || exit 0 @@ -37,46 +31,45 @@ . /etc/default/varnish fi -DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ - -h ${VARNISH_HASHOPTION} \ - -f ${VARNISH_VCL_CONF} \ - -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ - -t ${VARNISH_TTL} \ - -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ - -s ${VARNISH_BACKEND_STORAGE}" +# If $DAEMON_OPTS is not set at all in /etc/default/varnish, use minimal useful +# defaults (Backend at localhost:8080, a common place to put a locally +# installed application server.) +DAEMON_OPTS=${DAEMON_OPTS:--b localhost} -set -e - case "$1" in - start) - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON -- $DAEMON_OPTS 2>&1 > /dev/null - echo "$NAME." + start) + output=$(/bin/tempfile -s.varnish) + log_daemon_msg "Starting $DESC" + log_progress_msg $NAME + if start-stop-daemon \ + --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- \ + -P ${PIDFILE} ${DAEMON_OPTS} > ${output} 2>&1; then + log_end_msg 0 + else + log_end_msg 1 + cat $output + fi + rm $output + ;; + stop) + log_daemon_msg "Stopping $DESC" + log_progress_msg $NAME + if start-stop-daemon \ + --stop --quiet --pidfile $PIDFILE --oknodo --retry 10 \ + --exec $DAEMON; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + log_success_msg "Usage: $0 {start|stop|restart|force-reload}" + exit 1 ;; - stop) - echo -n "Stopping $DESC: " - pkill varnishd - echo "$NAME." - ;; - restart|force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart". - # - echo -n "Restarting $DESC: " - pkill varnishd - sleep 1 - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON -- $DAEMON_OPTS 2>&1 > /dev/null - echo "$NAME." - ;; - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; esac exit 0 From des at linpro.no Wed May 16 12:20:50 2007 From: des at linpro.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=) Date: Wed, 16 May 2007 14:20:50 +0200 Subject: r1427 - trunk/varnish-cache/etc In-Reply-To: <20070516105215.2A4D51EC3FE@projects.linpro.no> (ssm@projects.linpro.no's message of "Wed\, 16 May 2007 12\:52\:15 +0200 \(CEST\)") References: <20070516105215.2A4D51EC3FE@projects.linpro.no> Message-ID: <87wsz9q7rx.fsf@des.linpro.no> ssm at projects.linpro.no writes: > Log: > Added example vcl to use in front of zope+plone (this could perhaps go > in a contrib/ directory instead) etc/ should be fine DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From des at projects.linpro.no Wed May 16 12:45:53 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 16 May 2007 14:45:53 +0200 (CEST) Subject: r1432 - trunk/varnish-cache/bin/varnishd Message-ID: <20070516124553.5114E1EC42E@projects.linpro.no> Author: des Date: 2007-05-16 14:45:53 +0200 (Wed, 16 May 2007) New Revision: 1432 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 Log: Explain in more detail how the storage file size is specified. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-16 11:38:08 UTC (rev 1431) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-16 12:45:53 UTC (rev 1432) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd May 14, 2007 +.Dd May 16, 2007 .Dt VARNISHD 1 .Os .Sh NAME @@ -180,6 +180,8 @@ Not recommended for production use. .It Cm classic Ns Op Ns , Ns Ar buckets A standard hash table. +This is the default. +.Pp The hash key is the CRC32 of the object's URL modulo the size of the hash table. Each table entry points to a list of elements which share the same @@ -199,6 +201,7 @@ Not recommended for production use. .It Cm file Ns Op Ns , Ns Ar path Ns Op Ns , Ns Ar size Storage for each object is allocated from an arena backed by a file. +This is the default. .Pp The .Ar path @@ -212,6 +215,24 @@ The .Ar size parameter specifies the size of the backing file. +The size is assumed to be in bytes, unless followed by one of the +following suffixes: +.Bl -tag -width indent +.It K, k +The size is expressed in kibibytes. +.It M, m +The size is expressed in mebibytes. +.It G, g +The size is expressed in gibibytes. +.It T, t +The size is expressed in tebibytes. +.It % +The size is expressed as a percentage of the free space on the file +system where it resides. +.El +.Pp +The default size is 50%. +.Pp If the backing file already exists, it will be truncated or expanded to the specified size. .Pp From des at projects.linpro.no Wed May 16 14:25:56 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 16 May 2007 16:25:56 +0200 (CEST) Subject: r1433 - in branches/1.0: . bin/varnishd bin/varnishstat bin/varnishtop debian etc Message-ID: <20070516142556.63BC71EC52F@projects.linpro.no> Author: des Date: 2007-05-16 16:25:56 +0200 (Wed, 16 May 2007) New Revision: 1433 Added: branches/1.0/debian/varnish.examples branches/1.0/debian/varnish.postrm branches/1.0/etc/zope-plone.vcl Removed: branches/1.0/debian/postrm branches/1.0/debian/vcl.conf branches/1.0/etc/vcl.conf Modified: branches/1.0/ branches/1.0/Makefile.am branches/1.0/bin/varnishd/varnishd.1 branches/1.0/bin/varnishstat/Makefile.am branches/1.0/bin/varnishtop/Makefile.am branches/1.0/configure.ac branches/1.0/debian/rules branches/1.0/debian/varnish.default branches/1.0/debian/varnish.init Log: Merged revisions 1424-1432 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r1424 | des | 2007-05-15 21:38:56 +0200 (Tue, 15 May 2007) | 2 lines Rename vcl.conf to default.vcl, update and comment the sample code. ........ r1425 | des | 2007-05-16 11:34:26 +0200 (Wed, 16 May 2007) | 2 lines Expand tags ........ r1426 | des | 2007-05-16 11:35:18 +0200 (Wed, 16 May 2007) | 2 lines Distribute default.vcl. ........ r1427 | ssm | 2007-05-16 12:52:15 +0200 (Wed, 16 May 2007) | 1 line Added example vcl to use in front of zope+plone (this could perhaps go in a contrib/ directory instead) ........ r1428 | ssm | 2007-05-16 12:53:30 +0200 (Wed, 16 May 2007) | 1 line fix upgrade issue in postrm script, and rename it to .postrm to match other debian control files ........ r1429 | ssm | 2007-05-16 12:54:38 +0200 (Wed, 16 May 2007) | 1 line Ship with etc/default.vcl instead, no need for a separate configuration file ........ r1430 | ssm | 2007-05-16 12:59:13 +0200 (Wed, 16 May 2007) | 7 lines Use etc/default.vcl instead of debian/vcl.conf Register etc/zope-plone.vcl as an example configuration file Typo patrol ........ r1431 | ssm | 2007-05-16 13:38:08 +0200 (Wed, 16 May 2007) | 13 lines Init-script: * Move user-adjustable parts from init script to defaults file, expect $DAEMON_OPTS instead of a whole forest of variables. * We have a pid file argument, wheee. :D Defaults file: * Created alternative default templates, selected a one-backend default without VCL file. ........ r1432 | des | 2007-05-16 14:45:53 +0200 (Wed, 16 May 2007) | 2 lines Explain in more detail how the storage file size is specified. ........ Property changes on: branches/1.0 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421 + /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432 Modified: branches/1.0/Makefile.am =================================================================== --- branches/1.0/Makefile.am 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/Makefile.am 2007-05-16 14:25:56 UTC (rev 1433) @@ -1,5 +1,5 @@ # $Id$ -SUBDIRS = include lib bin man +SUBDIRS = include lib bin man etc EXTRA_DIST = LICENSE autogen.sh debian redhat Modified: branches/1.0/bin/varnishd/varnishd.1 =================================================================== --- branches/1.0/bin/varnishd/varnishd.1 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/bin/varnishd/varnishd.1 2007-05-16 14:25:56 UTC (rev 1433) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd May 14, 2007 +.Dd May 16, 2007 .Dt VARNISHD 1 .Os .Sh NAME @@ -180,6 +180,8 @@ Not recommended for production use. .It Cm classic Ns Op Ns , Ns Ar buckets A standard hash table. +This is the default. +.Pp The hash key is the CRC32 of the object's URL modulo the size of the hash table. Each table entry points to a list of elements which share the same @@ -199,6 +201,7 @@ Not recommended for production use. .It Cm file Ns Op Ns , Ns Ar path Ns Op Ns , Ns Ar size Storage for each object is allocated from an arena backed by a file. +This is the default. .Pp The .Ar path @@ -212,6 +215,24 @@ The .Ar size parameter specifies the size of the backing file. +The size is assumed to be in bytes, unless followed by one of the +following suffixes: +.Bl -tag -width indent +.It K, k +The size is expressed in kibibytes. +.It M, m +The size is expressed in mebibytes. +.It G, g +The size is expressed in gibibytes. +.It T, t +The size is expressed in tebibytes. +.It % +The size is expressed as a percentage of the free space on the file +system where it resides. +.El +.Pp +The default size is 50%. +.Pp If the backing file already exists, it will be truncated or expanded to the specified size. .Pp Modified: branches/1.0/bin/varnishstat/Makefile.am =================================================================== --- branches/1.0/bin/varnishstat/Makefile.am 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/bin/varnishstat/Makefile.am 2007-05-16 14:25:56 UTC (rev 1433) @@ -1,4 +1,4 @@ -# $Id: Makefile.am 133 2006-04-06 09:38:00Z phk $ +# $Id$ INCLUDES = -I$(top_srcdir)/include Property changes on: branches/1.0/bin/varnishstat/Makefile.am ___________________________________________________________________ Name: svn:keywords + Id Modified: branches/1.0/bin/varnishtop/Makefile.am =================================================================== --- branches/1.0/bin/varnishtop/Makefile.am 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/bin/varnishtop/Makefile.am 2007-05-16 14:25:56 UTC (rev 1433) @@ -1,4 +1,4 @@ -# $Id: Makefile.am 347 2006-07-06 09:31:45Z des $ +# $Id$ INCLUDES = -I$(top_srcdir)/include Property changes on: branches/1.0/bin/varnishtop/Makefile.am ___________________________________________________________________ Name: svn:keywords + Id Modified: branches/1.0/configure.ac =================================================================== --- branches/1.0/configure.ac 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/configure.ac 2007-05-16 14:25:56 UTC (rev 1433) @@ -130,6 +130,7 @@ bin/varnishncsa/Makefile bin/varnishstat/Makefile bin/varnishtop/Makefile + etc/Makefile include/Makefile lib/Makefile lib/libcompat/Makefile Deleted: branches/1.0/debian/postrm =================================================================== --- branches/1.0/debian/postrm 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/debian/postrm 2007-05-16 14:25:56 UTC (rev 1433) @@ -1,44 +0,0 @@ -#! /bin/sh -e - -set -e - -case "$1" in - remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - - if test -e /var/log/varnish && ! [ "$1" = upgrade ]; then - - rm -rf /var/log/varnish 2>&1 > /dev/null || exit 78 - - fi - - if test -e /var/lib/varnish; then - - rm -rf /var/lib/varnish 2>&1 > /dev/null || exit 78 - fi - - ;; - - purge) - - if test -e /var/log/varnish; then - - rm -rf /var/log/varnish 2>&1 > /dev/null || exit 78 - - fi - - if test -e /var/lib/varnish; then - - rm -rf /var/lib/varnish 2>&1 > /dev/null || exit 78 - fi - - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 64 - -esac - -#DEBHELPER# - -exit 0 Modified: branches/1.0/debian/rules =================================================================== --- branches/1.0/debian/rules 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/debian/rules 2007-05-16 14:25:56 UTC (rev 1433) @@ -67,7 +67,7 @@ dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/varnish - install -m 644 $(CURDIR)/debian/vcl.conf $(CURDIR)/debian/varnish/etc/varnish/ + install -m 644 $(CURDIR)/etc/default.vcl $(CURDIR)/debian/varnish/etc/varnish/ install -m 644 $(CURDIR)/debian/lintian-override $(CURDIR)/debian/varnish/usr/share/lintian/overrides/varnish @@ -81,9 +81,10 @@ dh_testroot dh_installchangelogs ChangeLog dh_installdocs - # Since varnish looses its cache on restart - we don't. + # Since varnish loses its cache on restart - we don't. dh_installinit -r dh_installman + dh_installexamples dh_link dh_strip dh_compress Modified: branches/1.0/debian/varnish.default =================================================================== --- branches/1.0/debian/varnish.default 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/debian/varnish.default 2007-05-16 14:25:56 UTC (rev 1433) @@ -1,44 +1,91 @@ # Configuration file for varnish +# +# /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this +# shell script fragment. +# +# This file contains 4 alternatives, please use only one. -# Main configuration file. You probably want to change it :) -VARNISH_VCL_CONF=/etc/varnish/vcl.conf +## Alternative 1, Minimal configuration, no VCL +# +# Listen on localhost:6081, administration on localhost:6082, and forward to +# content server on localhost:8080. Use a fixed size file storage. +# +DAEMON_OPTS="-a localhost:6081 \ + -T localhost:6082 \ + -b localhost:8080 \ + -s file,/var/lib/varnish/varnish_storage.bin,10485760" -# Default address and port to bind to -VARNISH_LISTEN_ADDRESS=0.0.0.0 -VARNISH_LISTEN_PORT=6081 +## Alternative 2, Configuration with VCL +# +# Listen on localhost:6081, administration on localhost:6082, and forward to +# one content server selected by the vcl file, based on the request. Use a +# fixed size file storage. +# +# DAEMON_OPTS="-a localhost:6081 \ +# -T localhost:6082 \ +# -f /etc/varnish/default.vcl \ +# -s file,/var/lib/varnish/varnish_storage.bin,10485760" -# Telnet admin interface listen address and port -VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 -VARNISH_ADMIN_LISTEN_PORT=6082 +## Alternative 3, Advanced configuration +# +# See varnishd(1) for more information. +# +# # Main configuration file. You probably want to change it :) +# VARNISH_VCL_CONF=/etc/varnish/default.vcl +# +# # Default address and port to bind to +# VARNISH_LISTEN_ADDRESS=0.0.0.0 +# VARNISH_LISTEN_PORT=6081 +# +# +# # Telnet admin interface listen address and port +# VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 +# VARNISH_ADMIN_LISTEN_PORT=6082 +# +# +# # The minimum number of threads to start +# VARNISH_MIN_WORKER_THREADS=1 +# +# +# # Maximum number of worker threads or INF for unlimited +# VARNISH_MAX_WORKER_THREADS=2048 +# +# +# # Timeout value in seconds for threads to return +# VARNISH_WORKER_THREAD_TIMEOUT=10 +# +# +# # Hash algorithm to be used +# VARNISH_HASHOPTION=classic +# +# +# # Maximum size of the backend storagefile in bytes +# VARNISH_BACKEND_STORAGE_SIZE=10240000 +# VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin +# +# +# # Backend storage specification +# VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}" +# +# +# # Set default ttl in secounds +# VARNISH_TTL=120 +# +# # DAEMON_OPTS is used by the init script. If you add or remove options, make +# # sure you update this section, too. +# DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ +# -h ${VARNISH_HASHOPTION} \ +# -f ${VARNISH_VCL_CONF} \ +# -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ +# -t ${VARNISH_TTL} \ +# -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ +# -s ${VARNISH_BACKEND_STORAGE}" +# -# The minimum number of threads to start -VARNISH_MIN_WORKER_THREADS=1 - -# Maximum number of worker threads or INF for unlimited -VARNISH_MAX_WORKER_THREADS=2048 - - -# Timeout value in seconds for threads to return -VARNISH_WORKER_THREAD_TIMEOUT=10 - - -# Hash algorithm to be used -VARNISH_HASHOPTION=classic - - -# Maximum size of the backend storagefile in bytes -VARNISH_BACKEND_STORAGE_SIZE=10240000 -VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin - - -# Backend storage specification -VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}" - - -# Set default ttl in secounds -VARNISH_TTL=120 - +## Alternative 4, Do It Yourself +# +# DAEMON_OPTS="" Copied: branches/1.0/debian/varnish.examples (from rev 1432, trunk/varnish-cache/debian/varnish.examples) Modified: branches/1.0/debian/varnish.init =================================================================== --- branches/1.0/debian/varnish.init 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/debian/varnish.init 2007-05-16 14:25:56 UTC (rev 1433) @@ -1,34 +1,28 @@ #! /bin/sh # -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg . -# Modified for Debian -# by Ian Murdock . -# -# Version: @(#)skeleton 1.9 26-Feb-2001 miquels at cistron.nl -# +# varnish Control the varnish HTTP accelerator ### BEGIN INIT INFO # Provides: varnish # Required-Start: $local_fs $network # Required-Stop: $local_fs $network -# Should-Start: $remote_fs -# Should-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: Start HTTPd accelerator +# Short-Description: Start HTTP accelerator # Description: This script provides a server-side cache # to be run in front of a httpd and should -# listen on port 80 on a properly configured +# listen on port 80 on a properly configured # system ### END INIT INFO -NAME=varnish -DESC="HTTPd accelerator" +# Source function library +. /lib/lsb/init-functions + +NAME=varnishd +DESC="HTTP accelerator" PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/varnishd +PIDFILE=/var/run/$NAME.pid test -x $DAEMON || exit 0 @@ -37,46 +31,45 @@ . /etc/default/varnish fi -DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ - -h ${VARNISH_HASHOPTION} \ - -f ${VARNISH_VCL_CONF} \ - -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ - -t ${VARNISH_TTL} \ - -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ - -s ${VARNISH_BACKEND_STORAGE}" +# If $DAEMON_OPTS is not set at all in /etc/default/varnish, use minimal useful +# defaults (Backend at localhost:8080, a common place to put a locally +# installed application server.) +DAEMON_OPTS=${DAEMON_OPTS:--b localhost} -set -e - case "$1" in - start) - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON -- $DAEMON_OPTS 2>&1 > /dev/null - echo "$NAME." + start) + output=$(/bin/tempfile -s.varnish) + log_daemon_msg "Starting $DESC" + log_progress_msg $NAME + if start-stop-daemon \ + --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- \ + -P ${PIDFILE} ${DAEMON_OPTS} > ${output} 2>&1; then + log_end_msg 0 + else + log_end_msg 1 + cat $output + fi + rm $output + ;; + stop) + log_daemon_msg "Stopping $DESC" + log_progress_msg $NAME + if start-stop-daemon \ + --stop --quiet --pidfile $PIDFILE --oknodo --retry 10 \ + --exec $DAEMON; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + log_success_msg "Usage: $0 {start|stop|restart|force-reload}" + exit 1 ;; - stop) - echo -n "Stopping $DESC: " - pkill varnishd - echo "$NAME." - ;; - restart|force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart". - # - echo -n "Restarting $DESC: " - pkill varnishd - sleep 1 - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON -- $DAEMON_OPTS 2>&1 > /dev/null - echo "$NAME." - ;; - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; esac exit 0 Copied: branches/1.0/debian/varnish.postrm (from rev 1432, trunk/varnish-cache/debian/varnish.postrm) Deleted: branches/1.0/debian/vcl.conf =================================================================== --- branches/1.0/debian/vcl.conf 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/debian/vcl.conf 2007-05-16 14:25:56 UTC (rev 1433) @@ -1,27 +0,0 @@ -# This is a basic vcl.conf file for varnish. -# Modifying this file should be where you store your modifications to -# varnish. Settnigs here will override defaults. - -backend default { - set backend.host = "127.0.0.1"; - set backend.port = "80"; -} - -sub vcl_recv { - if (req.request == "POST") { - pipe; - } - - # force lookup even when cookies are present - if (req.request == "GET" && req.http.cookie) { - lookup; - } -} - -sub vcl_fetch { - # force minimum ttl of 180 seconds - if (obj.ttl < 180s) { - set obj.ttl = 180s; - } -} - Deleted: branches/1.0/etc/vcl.conf =================================================================== --- branches/1.0/etc/vcl.conf 2007-05-16 12:45:53 UTC (rev 1432) +++ branches/1.0/etc/vcl.conf 2007-05-16 14:25:56 UTC (rev 1433) @@ -1,31 +0,0 @@ -# -# This is a basic VCL configuration file for varnish. See the vcl(7) -# man page for details on VCL syntax and semantics. -# -# $Id$ -# - -backend default { - set backend.host = "127.0.0.1"; - set backend.port = "8080"; -} - -sub vcl_recv { - # pass mode can't handle POST (yet) - if (req.request == "POST") { - pipe; - } - - # force lookup even when cookies are present - if (req.request == "GET" && req.http.cookie) { - lookup; - } -} - -sub vcl_fetch { - # force minimum ttl of 180 seconds - if (obj.ttl < 180s) { - set obj.ttl = 180s; - } -} - Copied: branches/1.0/etc/zope-plone.vcl (from rev 1432, trunk/varnish-cache/etc/zope-plone.vcl) From des at projects.linpro.no Wed May 16 14:29:46 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 16 May 2007 16:29:46 +0200 (CEST) Subject: r1434 - trunk/varnish-cache/etc Message-ID: <20070516142946.F19BB1EC3E3@projects.linpro.no> Author: des Date: 2007-05-16 16:29:46 +0200 (Wed, 16 May 2007) New Revision: 1434 Modified: trunk/varnish-cache/etc/Makefile.am Log: Include zope-plone.vcl in the tarball. Modified: trunk/varnish-cache/etc/Makefile.am =================================================================== --- trunk/varnish-cache/etc/Makefile.am 2007-05-16 14:25:56 UTC (rev 1433) +++ trunk/varnish-cache/etc/Makefile.am 2007-05-16 14:29:46 UTC (rev 1434) @@ -1,3 +1,3 @@ # $Id$ -EXTRA_DIST = default.vcl +EXTRA_DIST = default.vcl zope-plone.vcl From des at projects.linpro.no Wed May 16 14:31:46 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 16 May 2007 16:31:46 +0200 (CEST) Subject: r1435 - branches/1.0/etc Message-ID: <20070516143146.8DCF81EC6B3@projects.linpro.no> Author: des Date: 2007-05-16 16:31:46 +0200 (Wed, 16 May 2007) New Revision: 1435 Added: branches/1.0/etc/Makefile.am branches/1.0/etc/default.vcl Log: For some reason, svnmerge failed to add these two files. Added: branches/1.0/etc/Makefile.am =================================================================== --- branches/1.0/etc/Makefile.am 2007-05-16 14:29:46 UTC (rev 1434) +++ branches/1.0/etc/Makefile.am 2007-05-16 14:31:46 UTC (rev 1435) @@ -0,0 +1,3 @@ +# $Id: Makefile.am 1426 2007-05-16 09:35:18Z des $ + +EXTRA_DIST = default.vcl Added: branches/1.0/etc/default.vcl =================================================================== --- branches/1.0/etc/default.vcl 2007-05-16 14:29:46 UTC (rev 1434) +++ branches/1.0/etc/default.vcl 2007-05-16 14:31:46 UTC (rev 1435) @@ -0,0 +1,88 @@ +# +# This is a basic VCL configuration file for varnish. See the vcl(7) +# man page for details on VCL syntax and semantics. +# +# $Id: default.vcl 1424 2007-05-15 19:38:56Z des $ +# + +# Default backend definition. Set this to point to your content +# server. + +backend default { + set backend.host = "127.0.0.1"; + set backend.port = "8080"; +} + +# Below is a commented-out copy of the default VCL logic. If you +# redefine any of these subroutines, the built-in logic will be +# appended to your code. + +## Called when a client request is received +# +#sub vcl_recv { +# if (req.request != "GET" && req.request != "HEAD") { +# pipe; +# } +# if (req.http.Expect) { +# pipe; +# } +# if (req.http.Authenticate || req.http.Cookie) { +# pass; +# } +# lookup; +#} +# +## Called when entering pipe mode +# +#sub vcl_pipe { +# pipe; +#} +# +## Called when entering pass mode +# +#sub vcl_pass { +# pass; +#} +# +## Called when entering an object into the cache +# +#sub vcl_hash { +# hash; +#} +# +## Called when the requested object was found in the cache +# +#sub vcl_hit { +# if (!obj.cacheable) { +# pass; +# } +# deliver; +#} +# +## Called when the requested object was not found in the cache +# +#sub vcl_miss { +# fetch; +#} +# +## Called when the requested object has been retrieved from the +## backend, or the request to the backend has failed +# +#sub vcl_fetch { +# if (!obj.valid) { +# error; +# } +# if (!obj.cacheable) { +# pass; +# } +# if (resp.http.Set-Cookie) { +# pass; +# } +# insert; +#} +# +## Called when an object nears its expiry time +# +#sub vcl_timeout { +# discard; +#} From des at projects.linpro.no Wed May 16 14:32:47 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 16 May 2007 16:32:47 +0200 (CEST) Subject: r1436 - in branches/1.0: . etc Message-ID: <20070516143247.754E21EC42E@projects.linpro.no> Author: des Date: 2007-05-16 16:32:47 +0200 (Wed, 16 May 2007) New Revision: 1436 Modified: branches/1.0/ branches/1.0/etc/Makefile.am Log: Merged revisions 1434 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r1434 | des | 2007-05-16 16:29:46 +0200 (Wed, 16 May 2007) | 2 lines Include zope-plone.vcl in the tarball. ........ Property changes on: branches/1.0 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432 + /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434 Modified: branches/1.0/etc/Makefile.am =================================================================== --- branches/1.0/etc/Makefile.am 2007-05-16 14:31:46 UTC (rev 1435) +++ branches/1.0/etc/Makefile.am 2007-05-16 14:32:47 UTC (rev 1436) @@ -1,3 +1,3 @@ # $Id: Makefile.am 1426 2007-05-16 09:35:18Z des $ -EXTRA_DIST = default.vcl +EXTRA_DIST = default.vcl zope-plone.vcl From ssm at projects.linpro.no Wed May 16 15:20:47 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Wed, 16 May 2007 17:20:47 +0200 (CEST) Subject: r1437 - trunk/varnish-cache/debian Message-ID: <20070516152047.3C2E71EC6B3@projects.linpro.no> Author: ssm Date: 2007-05-16 17:20:47 +0200 (Wed, 16 May 2007) New Revision: 1437 Modified: trunk/varnish-cache/debian/changelog Log: debian changelog, so far Modified: trunk/varnish-cache/debian/changelog =================================================================== --- trunk/varnish-cache/debian/changelog 2007-05-16 14:32:47 UTC (rev 1436) +++ trunk/varnish-cache/debian/changelog 2007-05-16 15:20:47 UTC (rev 1437) @@ -1,3 +1,17 @@ +varnish (1.0.4-1) unstable; urgency=low + + * New upstream version (Closes: #424560) + * Use the upstream default configuration file, renamed to default.vcl. + Default template in /etc/default/varnish does not use this, but a + commented-out alternative does. + * Changed init script. Use lsb init library functions, move more defaults + to /etc/default/varnish, to make init script simpler. + * Changed postrm, /var/lib/varnish disappeared on upgrade, making varnish + non-startable. + * Added example vcl for zope and plone. + + -- ssm Wed, 16 May 2007 13:50:08 +0200 + varnish (1.0.3-2) unstable; urgency=low * Added postrm to partially solve 400384 From des at projects.linpro.no Wed May 16 20:02:08 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 16 May 2007 22:02:08 +0200 (CEST) Subject: r1438 - trunk/varnish-cache/debian Message-ID: <20070516200208.EB67C1EC6B3@projects.linpro.no> Author: des Date: 2007-05-16 22:02:08 +0200 (Wed, 16 May 2007) New Revision: 1438 Modified: trunk/varnish-cache/debian/varnish.default Log: Tweak some of the defaults: - bind to all interfaces - use a 1 gibibyte - remove hash setting, it's not safe - tweak some variable names and comments Modified: trunk/varnish-cache/debian/varnish.default =================================================================== --- trunk/varnish-cache/debian/varnish.default 2007-05-16 15:20:47 UTC (rev 1437) +++ trunk/varnish-cache/debian/varnish.default 2007-05-16 20:02:08 UTC (rev 1438) @@ -1,5 +1,5 @@ # Configuration file for varnish -# +# # /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this # shell script fragment. # @@ -8,81 +8,74 @@ ## Alternative 1, Minimal configuration, no VCL # -# Listen on localhost:6081, administration on localhost:6082, and forward to -# content server on localhost:8080. Use a fixed size file storage. +# Listen on port 6081, administration on localhost:6082, and forward to +# content server on localhost:8080. Use a fixed-size cache file. # -DAEMON_OPTS="-a localhost:6081 \ +DAEMON_OPTS="-a :6081 \ -T localhost:6082 \ -b localhost:8080 \ - -s file,/var/lib/varnish/varnish_storage.bin,10485760" + -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 2, Configuration with VCL # -# Listen on localhost:6081, administration on localhost:6082, and forward to +# Listen on port 6081, administration on localhost:6082, and forward to # one content server selected by the vcl file, based on the request. Use a -# fixed size file storage. +# fixed-size cache file. # -# DAEMON_OPTS="-a localhost:6081 \ +# DAEMON_OPTS="-a :6081 \ # -T localhost:6082 \ # -f /etc/varnish/default.vcl \ -# -s file,/var/lib/varnish/varnish_storage.bin,10485760" +# -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 3, Advanced configuration # # See varnishd(1) for more information. -# +# # # Main configuration file. You probably want to change it :) # VARNISH_VCL_CONF=/etc/varnish/default.vcl -# +# # # Default address and port to bind to -# VARNISH_LISTEN_ADDRESS=0.0.0.0 +# # Blank address means all IPv4 and IPv6 interfaces, otherwise specify +# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets. +# VARNISH_LISTEN_ADDRESS= # VARNISH_LISTEN_PORT=6081 -# -# +# # # Telnet admin interface listen address and port # VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 # VARNISH_ADMIN_LISTEN_PORT=6082 -# -# -# # The minimum number of threads to start -# VARNISH_MIN_WORKER_THREADS=1 -# -# -# # Maximum number of worker threads or INF for unlimited -# VARNISH_MAX_WORKER_THREADS=2048 -# -# -# # Timeout value in seconds for threads to return -# VARNISH_WORKER_THREAD_TIMEOUT=10 -# -# -# # Hash algorithm to be used -# VARNISH_HASHOPTION=classic -# -# -# # Maximum size of the backend storagefile in bytes -# VARNISH_BACKEND_STORAGE_SIZE=10240000 -# VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin -# -# +# +# # The minimum number of worker threads to start +# VARNISH_MIN_THREADS=1 +# +# # The Maximum number of worker threads to start +# VARNISH_MAX_THREADS=1000 +# +# # Idle timeout for worker threads +# VARNISH_THREAD_TIMEOUT=120 +# +# # Cache file location +# VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin +# +# # Cache file size: in bytes, optionally using k / M / G / T suffix, +# # or in percentage of available disk space using the % suffix. +# VARNISH_STORAGE_SIZE=1G +# # # Backend storage specification -# VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}" -# -# -# # Set default ttl in secounds +# VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}" +# +# # Default TTL used when the backend does not specify one # VARNISH_TTL=120 -# +# # # DAEMON_OPTS is used by the init script. If you add or remove options, make # # sure you update this section, too. # DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ -# -h ${VARNISH_HASHOPTION} \ # -f ${VARNISH_VCL_CONF} \ # -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ # -t ${VARNISH_TTL} \ -# -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ -# -s ${VARNISH_BACKEND_STORAGE}" +# -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ +# -s ${VARNISH_STORAGE}" # From des at projects.linpro.no Wed May 16 20:03:32 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 16 May 2007 22:03:32 +0200 (CEST) Subject: r1439 - trunk/varnish-cache/bin/varnishd Message-ID: <20070516200332.417271EC3F7@projects.linpro.no> Author: des Date: 2007-05-16 22:03:32 +0200 (Wed, 16 May 2007) New Revision: 1439 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 Log: Improve the descriptions of some of the options and parameters. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-16 20:02:08 UTC (rev 1438) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-16 20:03:32 UTC (rev 1439) @@ -64,13 +64,17 @@ .Ar port . The .Ar address -can be a host name, an IPv4 dotted-quad, or an IPv6 address enclosed -in square brackets. +can be a host name +.Pq Dq localhost , +an IPv4 dotted-quad +.Pq Dq 127.0.0.1 , +or an IPv6 address enclosed in square brackets +.Pq Dq [::1] . If .Ar address is not specified, .Nm -will listen on all available interfaces. +will listen on all available IPv4 and IPv6 interfaces. If .Ar port is not specified, the default HTTP port as listed in @@ -107,6 +111,9 @@ .It Fl f Ar config Use the specified VCL configuration file instead of the builtin default. +See +.Xr vcl 7 +for details on VCL syntax. .It Fl h Ar type Ns Op , Ns Ar options Specifies the hash algorithm. See @@ -138,6 +145,9 @@ for a list of management commands. .It Fl t Ar ttl Specifies a hard minimum time to live for cached documents. +This is a shortcut for specifying the +.Va default_ttl +run-time parameter. .It Fl V Display the version number and exit. .It Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout @@ -146,31 +156,20 @@ but no more than .Ar max worker threads with the specified idle timeout. +This is a shortcut for specifying the +.Va thread_pool_min , +.Va thread_pool_max +and +.Va thread_pool_timeout +run-time parameters. .Pp -If only -.Ar min -is specified, -.Nm -will start -.Ar min -threads and will not kill idle threads. -.Pp -If both -.Ar min +If only one number is specified, +.Va thread_pool_min and -.Ar max -are specified, the number of threads is allowed to vary within the -specified range according to system load. -Idle threads are killed after -.Ar timeout -seconds. -.Pp -The default values are 1 for -.Ar min , -1000 for -.Ar max , -and 10 for -.Ar timeout . +.Va thread_pool_max +are both set to this number, and +.Va thread_pool_timeout +has no effect. .El .Ss Hash Algorithms The following hash algorithms are available: @@ -439,7 +438,9 @@ .Pp The default is 1. .It Va thread_pool_timeout -The time to wait before killing an idle worker thread. +The amount of time a worker thread can be idle before it is killed, +when the number of worker threads exceeds +.Va thread_pool_min . .Pp The default is 120 seconds. .It Va vcl_trace From ingvar at projects.linpro.no Wed May 16 21:08:43 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Wed, 16 May 2007 23:08:43 +0200 (CEST) Subject: r1440 - trunk/varnish-cache/redhat Message-ID: <20070516210843.866C71EC2F5@projects.linpro.no> Author: ingvar Date: 2007-05-16 23:08:43 +0200 (Wed, 16 May 2007) New Revision: 1440 Modified: trunk/varnish-cache/redhat/varnish.initrc trunk/varnish-cache/redhat/varnish.spec trunk/varnish-cache/redhat/varnish.sysconfig trunk/varnish-cache/redhat/varnishlog.initrc Log: * Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070516 - Wrapping up for 1.0.4 - Changes in sysconfig and init scripts. Syncing with files in trunk/debian Modified: trunk/varnish-cache/redhat/varnish.initrc =================================================================== --- trunk/varnish-cache/redhat/varnish.initrc 2007-05-16 20:03:32 UTC (rev 1439) +++ trunk/varnish-cache/redhat/varnish.initrc 2007-05-16 21:08:43 UTC (rev 1440) @@ -13,17 +13,22 @@ RETVAL=0 PROCNAME=varnishd +PIDFILE=/var/run/varnish.pid +LOCKFILE=/var/lock/subsys/varnish +# Include varnish defaults . /etc/sysconfig/varnish -if [ "$DAEMON" = "" ]; then DAEMON="/usr/sbin/varnishd"; fi -DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ - -h ${VARNISH_HASHOPTION} \ - -f ${VARNISH_VCL_CONF} \ - -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ - -t ${VARNISH_TTL} \ - -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ - -s ${VARNISH_BACKEND_STORAGE}" +DAEMON="/usr/sbin/varnishd" + +# $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one +# have to set up a backend. +if [ "$DAEMON_OPTS" = "" ]; then + echo "No values specified in DAEMON_OPTS. Please read the varnishd(1)" + echo "manpage and put configuration options in /etc/sysconfig/varnish" + exit 1 +fi + mkdir -p /var/run/varnish 2>/dev/null # Open files (usually 1024, which is way too small for varnish) @@ -34,14 +39,14 @@ case "$1" in start) echo -n "Starting varnish HTTP accelerator: " - daemon $DAEMON "$DAEMON_OPTS" + daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} sleep 1 pkill -0 $PROCNAME RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success - touch /var/lock/subsys/varnish + touch $LOCKFILE else echo_failure fi @@ -49,19 +54,19 @@ ;; stop) echo -n "Stopping varnish HTTP accelerator: " - killproc $DAEMON + killproc -p $PIDFILE $DAEMON RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success - rm -f /var/lock/subsys/varnish + rm -f $LOCKFILE $PIDFILE else echo_failure fi echo ;; status) - status $PROCNAME + status -p $PIDFILE $PROCNAME RETVAL=$? ;; restart|reload) @@ -70,7 +75,7 @@ RETVAL=$? ;; condrestart) - if [ -f /var/lock/subsys/varnish ]; then + if [ -f $PIDFILE ]; then $0 stop $0 start RETVAL=$? Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-05-16 20:03:32 UTC (rev 1439) +++ trunk/varnish-cache/redhat/varnish.spec 2007-05-16 21:08:43 UTC (rev 1440) @@ -1,7 +1,7 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.0.svn -Release: 20070511%{?dist} +Release: 20070516%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ @@ -62,7 +62,7 @@ %{__make} %{?_smp_mflags} -sed -e ' s/8080/80/g ' etc/vcl.conf > redhat/vcl.conf +sed -e ' s/8080/80/g ' etc/default.vcl > redhat/default.vcl %install rm -rf %{buildroot} @@ -77,7 +77,7 @@ mkdir -p %{buildroot}/var/lib/varnish mkdir -p %{buildroot}/var/log/varnish -%{__install} -D -m 0644 redhat/vcl.conf %{buildroot}%{_sysconfdir}/varnish/vcl.conf +%{__install} -D -m 0644 redhat/default.vcl %{buildroot}%{_sysconfdir}/varnish/default.vcl %{__install} -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish %{__install} -D -m 0644 redhat/varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish %{__install} -D -m 0755 redhat/varnish.initrc %{buildroot}%{_sysconfdir}/init.d/varnish @@ -94,9 +94,9 @@ %{_var}/log/varnish %{_mandir}/man1/*.1* %{_mandir}/man7/*.7* -%doc INSTALL LICENSE README redhat/README.redhat redhat/vcl.conf ChangeLog +%doc INSTALL LICENSE README redhat/README.redhat redhat/default.vcl ChangeLog %dir %{_sysconfdir}/varnish/ -%config(noreplace) %{_sysconfdir}/varnish/vcl.conf +%config(noreplace) %{_sysconfdir}/varnish/default.vcl %config(noreplace) %{_sysconfdir}/sysconfig/varnish %config(noreplace) %{_sysconfdir}/logrotate.d/varnish %{_sysconfdir}/init.d/varnish @@ -137,6 +137,11 @@ %postun libs -p /sbin/ldconfig %changelog +* Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070516 +- Wrapping up for 1.0.4 +- Changes in sysconfig and init scripts. Syncing with files in + trunk/debian + * Fri May 11 2007 Ingvar Hagelund - 1.0.svn-20070511 - Threw latest changes into svn trunk - Removed the conversion of manpages into utf8. They are all utf8 in trunk Modified: trunk/varnish-cache/redhat/varnish.sysconfig =================================================================== --- trunk/varnish-cache/redhat/varnish.sysconfig 2007-05-16 20:03:32 UTC (rev 1439) +++ trunk/varnish-cache/redhat/varnish.sysconfig 2007-05-16 21:08:43 UTC (rev 1440) @@ -1,54 +1,87 @@ +# Configuration file for varnish # -# Default variables for varnish +# /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this +# shell script fragment. # -# The main daemon binary -VARNISHD=/usr/sbin/varnish +# Maximum number of open files (for ulimit -n) +NFILES=131072 -# VCL Configuration file. This is the "main configuration file" -VARNISH_VCL_CONF=/etc/varnish/vcl.conf +# This file contains 4 alternatives, please use only one. +## Alternative 1, Minimal configuration, no VCL +# +# Listen on port 6081, administration on localhost:6082, and forward to +# content server on localhost:8080. Use a fixed-size cache file. +# +DAEMON_OPTS="-a :6081 \ + -T localhost:6082 \ + -b localhost:8080 \ + -s file,/var/lib/varnish/varnish_storage.bin,1G" -# Default address and port to bind to. -# To make varnish accept normal http traffic, -# change the listen port to 80 -VARNISH_LISTEN_ADDRESS=0.0.0.0 -VARNISH_LISTEN_PORT=6081 +## Alternative 2, Configuration with VCL +# +# Listen on port 6081, administration on localhost:6082, and forward to +# one content server selected by the vcl file, based on the request. Use a +# fixed-size cache file. +# +# DAEMON_OPTS="-a :6081 \ +# -T localhost:6082 \ +# -f /etc/varnish/default.vcl \ +# -s file,/var/lib/varnish/varnish_storage.bin,1G" -# Telnet admin interface listen address and port -VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 -VARNISH_ADMIN_LISTEN_PORT=6082 +## Alternative 3, Advanced configuration +# +# See varnishd(1) for more information. +# +# # Main configuration file. You probably want to change it :) +# VARNISH_VCL_CONF=/etc/varnish/default.vcl +# +# # Default address and port to bind to +# # Blank address means all IPv4 and IPv6 interfaces, otherwise specify +# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets. +# VARNISH_LISTEN_ADDRESS= +# VARNISH_LISTEN_PORT=6081 +# +# # Telnet admin interface listen address and port +# VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 +# VARNISH_ADMIN_LISTEN_PORT=6082 +# +# # The minimum number of worker threads to start +# VARNISH_MIN_THREADS=1 +# +# # The Maximum number of worker threads to start +# VARNISH_MAX_THREADS=1000 +# +# # Idle timeout for worker threads +# VARNISH_THREAD_TIMEOUT=120 +# +# # Cache file location +# VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin +# +# # Cache file size: in bytes, optionally using k / M / G / T suffix, +# # or in percentage of available disk space using the % suffix. +# VARNISH_STORAGE_SIZE=1G +# +# # Backend storage specification +# VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}" +# +# # Default TTL used when the backend does not specify one +# VARNISH_TTL=120 +# +# # DAEMON_OPTS is used by the init script. If you add or remove options, make +# # sure you update this section, too. +# DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ +# -f ${VARNISH_VCL_CONF} \ +# -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ +# -t ${VARNISH_TTL} \ +# -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ +# -s ${VARNISH_STORAGE}" +# -# The minimum number of threads to start -VARNISH_MIN_WORKER_THREADS=1 - -# Maximum number of worker threads -VARNISH_MAX_WORKER_THREADS=1000 - - -# Timeout value in seconds for threads to return -VARNISH_WORKER_THREAD_TIMEOUT=10 - - -# Hash algorithm to be used -VARNISH_HASHOPTION=classic - - -# Maximum size of the backend storagefile in bytes -VARNISH_BACKEND_STORAGE_SIZE=10240000 -VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin - - -# Backend storage specification -VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}" - - -# Set default ttl in secounds -VARNISH_TTL=120 - -# The Maximum number of open files (ulimit) -# Default : 131072 (system default is usually 1024) -NFILES=131072 +## Alternative 4, Do It Yourself. See varnishd(1) for more information. +# +# DAEMON_OPTS="" Modified: trunk/varnish-cache/redhat/varnishlog.initrc =================================================================== --- trunk/varnish-cache/redhat/varnishlog.initrc 2007-05-16 20:03:32 UTC (rev 1439) +++ trunk/varnish-cache/redhat/varnishlog.initrc 2007-05-16 21:08:43 UTC (rev 1440) @@ -14,24 +14,11 @@ RETVAL=0 PROCNAME=varnishlog -. /etc/sysconfig/varnish +DAEMON="/usr/bin/varnishlog" +PIDFILE="/var/run/varnish/varnishlog.pid" +LOCKFILE="/var/lock/subsys/varnishlog" +LOGFILE="/var/log/varnish/varnish.log" -if [ "$LOGDAEMON" = "" ] -then - DAEMON="/usr/bin/varnishlog" -else - DAEMON="$LOGDAEMON" -fi - -if [ "$LOGPIDFILE" = "" ] -then - PIDFILE="/var/run/varnish/varnishlog.pid" -else - PIDFILE="$LOGPIDFILE" -fi - -if [ "$LOGFILE" = "" ]; then LOGFILE="/var/log/varnish/varnish.log"; fi - DAEMON_OPTS="-a -w ${LOGFILE} -D -P $PIDFILE" mkdir -p /var/run/varnish 2>/dev/null @@ -40,14 +27,14 @@ case "$1" in start) echo -n "Starting varnish logging daeon: " - daemon $DAEMON "$DAEMON_OPTS" + daemon --pidfile $PIDFILE $DAEMON "$DAEMON_OPTS" sleep 1 pkill -0 $PROCNAME RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success - touch /var/lock/subsys/varnishlog + touch $LOCKFILE else echo_failure fi @@ -55,19 +42,19 @@ ;; stop) echo -n "Stopping varnish logging daemon: " - killproc $DAEMON + killproc -p $PIDFILE $DAEMON RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success - rm -f /var/lock/subsys/varnishlog + rm -f $LOCKFILE $PIDFILE else echo_failure fi echo ;; status) - status $PROCNAME + status -p $PIDFILE $PROCNAME RETVAL=$? ;; restart|reload) @@ -76,7 +63,7 @@ RETVAL=$? ;; condrestart) - if [ -f /var/lock/subsys/varnishlog ]; then + if [ -f $PIDFILE ]; then $0 stop $0 start RETVAL=$? From des at projects.linpro.no Thu May 17 11:48:35 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 17 May 2007 13:48:35 +0200 (CEST) Subject: r1441 - in trunk/varnish-cache: . doc Message-ID: <20070517114835.BD79D1EC2AF@projects.linpro.no> Author: des Date: 2007-05-17 13:48:35 +0200 (Thu, 17 May 2007) New Revision: 1441 Added: trunk/varnish-cache/doc/ trunk/varnish-cache/doc/Makefile.am trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml trunk/varnish-cache/doc/changes-1.0.4.xml trunk/varnish-cache/doc/changes-html.xsl Modified: trunk/varnish-cache/Makefile.am trunk/varnish-cache/configure.ac Log: Add an XML+XSLT-based change log. Unlike the change logs for previous releases, this one was written by hand, which makes it user-readable. Modified: trunk/varnish-cache/Makefile.am =================================================================== --- trunk/varnish-cache/Makefile.am 2007-05-16 21:08:43 UTC (rev 1440) +++ trunk/varnish-cache/Makefile.am 2007-05-17 11:48:35 UTC (rev 1441) @@ -1,5 +1,5 @@ # $Id$ -SUBDIRS = include lib bin man etc +SUBDIRS = include lib bin man etc doc EXTRA_DIST = LICENSE autogen.sh debian redhat Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2007-05-16 21:08:43 UTC (rev 1440) +++ trunk/varnish-cache/configure.ac 2007-05-17 11:48:35 UTC (rev 1441) @@ -19,6 +19,7 @@ AC_PROG_INSTALL AC_PROG_LIBTOOL AC_PROG_MAKE_SET +AC_CHECK_PROGS(XSLTPROC, [xsltproc]) # Checks for libraries. save_LIBS="${LIBS}" @@ -130,6 +131,7 @@ bin/varnishncsa/Makefile bin/varnishstat/Makefile bin/varnishtop/Makefile + doc/Makefile etc/Makefile include/Makefile lib/Makefile Added: trunk/varnish-cache/doc/Makefile.am =================================================================== --- trunk/varnish-cache/doc/Makefile.am 2007-05-16 21:08:43 UTC (rev 1440) +++ trunk/varnish-cache/doc/Makefile.am 2007-05-17 11:48:35 UTC (rev 1441) @@ -0,0 +1,12 @@ +# $Id$ + +CHANGELOGS = changes-1.0.4.html + +EXTRA_DIST = ${CHANGELOGS} + +CLEANFILES = ${CHANGELOGS} + +SUFFIXES = .xml .html + +.xml.html: + ${XSLTPROC} --xinclude -o $@ $< Property changes on: trunk/varnish-cache/doc/Makefile.am ___________________________________________________________________ Name: svn:keywords + Id Added: trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml =================================================================== --- trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml 2007-05-16 21:08:43 UTC (rev 1440) +++ trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml 2007-05-17 11:48:35 UTC (rev 1441) @@ -0,0 +1,206 @@ + + +]> + + + + varnishd + + + The request workflow has been redesigned to simplify + request processing and eliminate code duplication. All + codepaths which need to speak HTTP now share a single + implementation of the protocol. Some new VCL hooks have been + added, though they aren't much use yet. The only real + user-visible change should be that Varnish now handles + persistent backend connections correctly (see ). + + + + Support for multiple listen addresses has been + added. + + + + An "include" facility has been added to VCL, allowing + VCL code to pull in code fragments from multiple files. + + + + Multiple definitions of the same VCL function are now + concatenated into one in the order in which they appear in the + source. This simplifies the mechanism for falling back to the + built-in default for cases which aren't handled in custom + code, and facilitates modularization. + + + + The code used to format management command arguments + before passing them on to the child process would + underestimate the amount of space needed to hold each argument + once quotes and special characters were properly escaped, + resulting in a buffer overflow. This has been + corrected. + + + + The VCL compiler has been overhauled. Several memory + leaks have been plugged, and error detection and reporting has + been improved throughout. Parts of the compiler have been + refactored to simplify future extension of the + language. + + + + A bug in the VCL compiler which resulted in incorrect + parsing of the decrement (-=) operator has been + fixed. + + + + A new -C command-line option has been added + which causes varnishd to compile the VCL code + (either from a file specified with -f or the + built-in default), print the resulting C code and exit. + + + + When processing a backend response using chunked + encoding, if a chunk header crosses a read buffer boundary, + read additional bytes from the backend connection until the + chunk header is complete. + + + + A new ping_interval run-time parameter + controls how often the management process checks that the + worker process is alive. + + + + A bug which would cause the worker process to + dereference a NULL pointer and crash if the + backend did not respond has been fixed. + + + + In some cases, such as when they are used by AJAX + applications to circumvent Internet Explorer's over-eager disk + cache, it may be desirable to cache POST + requests. However, the code path responsible for delivering + objects from cache would only transmit the response body when + replying to a GET request. This has been + extended to also apply to POST. + + This should be revisited at a later date to allow VCL + code to control whether the body is delivered. + + + + Varnish now respects Cache-control: + s-maxage, and prefers it to Cache-control: + max-age if both are present. + + This should be revisited at a later date to allow VCL + code to control which headers are used and how they are + interpreted. + + + + When loading a new VCL script, the management process + will now load the compiled object to verify that it links + correctly before instructing the worker process to load + it. + + + + A new -P command-line options has been + added which causes varnishd to create a PID + file. + + + + The sendfile_threshold run-time parameter's + default value has been set to infinity after a variety of + sendfile()-related bugs were discovered on + several platforms. + + + + + varnishlog + + + When grouping log entries by request, + varnishlog attempts to collapse the log entry for + a call to a VCL function with the log entry for the + corresponding return from VCL. When two VCL calls were made + in succession, varnishlog would incorrectly omit + the newline between the two calls (see ). + + + + New -D and -P command-line + options have been added to daemonize and create a pidfile, + respectively. + + + + + varnishncsa + + + The formatting callback has been largely rewritten for + clarity, robustness and efficiency. + + If a request included a Host: header, + construct and output an absolute URL. This makes + varnishncsa output from servers which handle + multiple virtual hosts far more useful. + + + + + Documentation + + + The documentation—especially the VCL + documentation—has been greatly extended and improved. + + + + + Build system + + + The name and location of the curses or + ncurses library is now correctly detected by the + configure script instead of being hardcoded into + affected Makefiles. This allows Varnish to build correctly on + a wider range of platforms. + + + + Compatibility shims for clock_gettime() are + now correctly applied where needed, allowing Varnish to build + on MacOS X. + + + + The autogen.sh script will now correctly + detect and warn about automake versions which are + known not to work correctly. + + + + + Property changes on: trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml ___________________________________________________________________ Name: svn:keywords + Id Added: trunk/varnish-cache/doc/changes-1.0.4.xml =================================================================== --- trunk/varnish-cache/doc/changes-1.0.4.xml 2007-05-16 21:08:43 UTC (rev 1440) +++ trunk/varnish-cache/doc/changes-1.0.4.xml 2007-05-17 11:48:35 UTC (rev 1441) @@ -0,0 +1,16 @@ + + + +]> + + + Varnish + 1.0.4 + + + + + + + Property changes on: trunk/varnish-cache/doc/changes-1.0.4.xml ___________________________________________________________________ Name: svn:keywords + Id Added: trunk/varnish-cache/doc/changes-html.xsl =================================================================== --- trunk/varnish-cache/doc/changes-html.xsl 2007-05-16 21:08:43 UTC (rev 1440) +++ trunk/varnish-cache/doc/changes-html.xsl 2007-05-17 11:48:35 UTC (rev 1441) @@ -0,0 +1,74 @@ + + + +]> + + + + + + + + + + <xsl:call-template name="title"/> + + +

+ + + +
+ + + Change log for&space; + + &space; + + + + +

+ Changes between&space; + + &space;and&space; + +

+ +
+ + +

+ +

+
    + +
+
+ + +
  • + +
  • +
    + + +

    + +

    +
    + + + + + http://varnish.projects.linpro.no/ticket/ + + + ticket # + + + +
    From des at projects.linpro.no Thu May 17 11:51:46 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 17 May 2007 13:51:46 +0200 (CEST) Subject: r1442 - trunk/varnish-cache Message-ID: <20070517115146.1F4811EC3FE@projects.linpro.no> Author: des Date: 2007-05-17 13:51:46 +0200 (Thu, 17 May 2007) New Revision: 1442 Removed: trunk/varnish-cache/svn2cl.xsl Log: We won't use this any more. Deleted: trunk/varnish-cache/svn2cl.xsl =================================================================== --- trunk/varnish-cache/svn2cl.xsl 2007-05-17 11:48:35 UTC (rev 1441) +++ trunk/varnish-cache/svn2cl.xsl 2007-05-17 11:51:46 UTC (rev 1442) @@ -1,405 +0,0 @@ - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &newl; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &newl; - - - - - &space;&space; - - - - &newl; - &newl; - - - - - - - &newl; - - - - - &space;&space; - - - - &newl;&newl; - - - - - - :&space; - - - - - [r - - ]&space; - - - - - - - &newl; - - - - - - - &newl; - - &space;*&space; - - - - - &newl;&space;&space;&space; - - - - - - - - - - - - - &space; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ,&space; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . - - - - - - - - - - - - - - - - - &space;&space;&space; - - - - - - - - - - &newl; - - - - - - - - - - - - - - - - - - &newl;&space;&space;&space; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &newl;&newl; - - - - - - - - - - - - - - - - - From des at projects.linpro.no Thu May 17 12:21:50 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 17 May 2007 14:21:50 +0200 (CEST) Subject: r1443 - branches/1.0 branches/1.0/bin/varnishd branches/1.0/debian branches/1.0/redhat trunk/varnish-cache Message-ID: <20070517122150.647E41EC2F5@projects.linpro.no> Author: des Date: 2007-05-17 14:21:50 +0200 (Thu, 17 May 2007) New Revision: 1443 Added: branches/1.0/doc/ Removed: branches/1.0/svn2cl.xsl Modified: branches/1.0/ branches/1.0/Makefile.am branches/1.0/bin/varnishd/varnishd.1 branches/1.0/configure.ac branches/1.0/debian/changelog branches/1.0/debian/varnish.default branches/1.0/redhat/varnish.initrc branches/1.0/redhat/varnish.spec branches/1.0/redhat/varnish.sysconfig branches/1.0/redhat/varnishlog.initrc trunk/varnish-cache/ChangeLog Log: Merged revisions 1437-1442 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r1437 | ssm | 2007-05-16 17:20:47 +0200 (Wed, 16 May 2007) | 1 line debian changelog, so far ........ r1438 | des | 2007-05-16 22:02:08 +0200 (Wed, 16 May 2007) | 7 lines Tweak some of the defaults: - bind to all interfaces - use a 1 gibibyte - remove hash setting, it's not safe - tweak some variable names and comments ........ r1439 | des | 2007-05-16 22:03:32 +0200 (Wed, 16 May 2007) | 2 lines Improve the descriptions of some of the options and parameters. ........ r1440 | ingvar | 2007-05-16 23:08:43 +0200 (Wed, 16 May 2007) | 6 lines * Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070516 - Wrapping up for 1.0.4 - Changes in sysconfig and init scripts. Syncing with files in trunk/debian ........ r1441 | des | 2007-05-17 13:48:35 +0200 (Thu, 17 May 2007) | 3 lines Add an XML+XSLT-based change log. Unlike the change logs for previous releases, this one was written by hand, which makes it user-readable. ........ r1442 | des | 2007-05-17 13:51:46 +0200 (Thu, 17 May 2007) | 2 lines We won't use this any more. ........ Property changes on: branches/1.0 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434 + /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434,1437-1442 Modified: branches/1.0/Makefile.am =================================================================== --- branches/1.0/Makefile.am 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/Makefile.am 2007-05-17 12:21:50 UTC (rev 1443) @@ -1,5 +1,5 @@ # $Id$ -SUBDIRS = include lib bin man etc +SUBDIRS = include lib bin man etc doc EXTRA_DIST = LICENSE autogen.sh debian redhat Modified: branches/1.0/bin/varnishd/varnishd.1 =================================================================== --- branches/1.0/bin/varnishd/varnishd.1 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/bin/varnishd/varnishd.1 2007-05-17 12:21:50 UTC (rev 1443) @@ -64,13 +64,17 @@ .Ar port . The .Ar address -can be a host name, an IPv4 dotted-quad, or an IPv6 address enclosed -in square brackets. +can be a host name +.Pq Dq localhost , +an IPv4 dotted-quad +.Pq Dq 127.0.0.1 , +or an IPv6 address enclosed in square brackets +.Pq Dq [::1] . If .Ar address is not specified, .Nm -will listen on all available interfaces. +will listen on all available IPv4 and IPv6 interfaces. If .Ar port is not specified, the default HTTP port as listed in @@ -107,6 +111,9 @@ .It Fl f Ar config Use the specified VCL configuration file instead of the builtin default. +See +.Xr vcl 7 +for details on VCL syntax. .It Fl h Ar type Ns Op , Ns Ar options Specifies the hash algorithm. See @@ -138,6 +145,9 @@ for a list of management commands. .It Fl t Ar ttl Specifies a hard minimum time to live for cached documents. +This is a shortcut for specifying the +.Va default_ttl +run-time parameter. .It Fl V Display the version number and exit. .It Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout @@ -146,31 +156,20 @@ but no more than .Ar max worker threads with the specified idle timeout. +This is a shortcut for specifying the +.Va thread_pool_min , +.Va thread_pool_max +and +.Va thread_pool_timeout +run-time parameters. .Pp -If only -.Ar min -is specified, -.Nm -will start -.Ar min -threads and will not kill idle threads. -.Pp -If both -.Ar min +If only one number is specified, +.Va thread_pool_min and -.Ar max -are specified, the number of threads is allowed to vary within the -specified range according to system load. -Idle threads are killed after -.Ar timeout -seconds. -.Pp -The default values are 1 for -.Ar min , -1000 for -.Ar max , -and 10 for -.Ar timeout . +.Va thread_pool_max +are both set to this number, and +.Va thread_pool_timeout +has no effect. .El .Ss Hash Algorithms The following hash algorithms are available: @@ -439,7 +438,9 @@ .Pp The default is 1. .It Va thread_pool_timeout -The time to wait before killing an idle worker thread. +The amount of time a worker thread can be idle before it is killed, +when the number of worker threads exceeds +.Va thread_pool_min . .Pp The default is 120 seconds. .It Va vcl_trace Modified: branches/1.0/configure.ac =================================================================== --- branches/1.0/configure.ac 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/configure.ac 2007-05-17 12:21:50 UTC (rev 1443) @@ -19,6 +19,7 @@ AC_PROG_INSTALL AC_PROG_LIBTOOL AC_PROG_MAKE_SET +AC_CHECK_PROGS(XSLTPROC, [xsltproc]) # Checks for libraries. save_LIBS="${LIBS}" @@ -130,6 +131,7 @@ bin/varnishncsa/Makefile bin/varnishstat/Makefile bin/varnishtop/Makefile + doc/Makefile etc/Makefile include/Makefile lib/Makefile Modified: branches/1.0/debian/changelog =================================================================== --- branches/1.0/debian/changelog 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/debian/changelog 2007-05-17 12:21:50 UTC (rev 1443) @@ -1,3 +1,17 @@ +varnish (1.0.4-1) unstable; urgency=low + + * New upstream version (Closes: #424560) + * Use the upstream default configuration file, renamed to default.vcl. + Default template in /etc/default/varnish does not use this, but a + commented-out alternative does. + * Changed init script. Use lsb init library functions, move more defaults + to /etc/default/varnish, to make init script simpler. + * Changed postrm, /var/lib/varnish disappeared on upgrade, making varnish + non-startable. + * Added example vcl for zope and plone. + + -- ssm Wed, 16 May 2007 13:50:08 +0200 + varnish (1.0.3-2) unstable; urgency=low * Added postrm to partially solve 400384 Modified: branches/1.0/debian/varnish.default =================================================================== --- branches/1.0/debian/varnish.default 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/debian/varnish.default 2007-05-17 12:21:50 UTC (rev 1443) @@ -1,5 +1,5 @@ # Configuration file for varnish -# +# # /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this # shell script fragment. # @@ -8,81 +8,74 @@ ## Alternative 1, Minimal configuration, no VCL # -# Listen on localhost:6081, administration on localhost:6082, and forward to -# content server on localhost:8080. Use a fixed size file storage. +# Listen on port 6081, administration on localhost:6082, and forward to +# content server on localhost:8080. Use a fixed-size cache file. # -DAEMON_OPTS="-a localhost:6081 \ +DAEMON_OPTS="-a :6081 \ -T localhost:6082 \ -b localhost:8080 \ - -s file,/var/lib/varnish/varnish_storage.bin,10485760" + -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 2, Configuration with VCL # -# Listen on localhost:6081, administration on localhost:6082, and forward to +# Listen on port 6081, administration on localhost:6082, and forward to # one content server selected by the vcl file, based on the request. Use a -# fixed size file storage. +# fixed-size cache file. # -# DAEMON_OPTS="-a localhost:6081 \ +# DAEMON_OPTS="-a :6081 \ # -T localhost:6082 \ # -f /etc/varnish/default.vcl \ -# -s file,/var/lib/varnish/varnish_storage.bin,10485760" +# -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 3, Advanced configuration # # See varnishd(1) for more information. -# +# # # Main configuration file. You probably want to change it :) # VARNISH_VCL_CONF=/etc/varnish/default.vcl -# +# # # Default address and port to bind to -# VARNISH_LISTEN_ADDRESS=0.0.0.0 +# # Blank address means all IPv4 and IPv6 interfaces, otherwise specify +# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets. +# VARNISH_LISTEN_ADDRESS= # VARNISH_LISTEN_PORT=6081 -# -# +# # # Telnet admin interface listen address and port # VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 # VARNISH_ADMIN_LISTEN_PORT=6082 -# -# -# # The minimum number of threads to start -# VARNISH_MIN_WORKER_THREADS=1 -# -# -# # Maximum number of worker threads or INF for unlimited -# VARNISH_MAX_WORKER_THREADS=2048 -# -# -# # Timeout value in seconds for threads to return -# VARNISH_WORKER_THREAD_TIMEOUT=10 -# -# -# # Hash algorithm to be used -# VARNISH_HASHOPTION=classic -# -# -# # Maximum size of the backend storagefile in bytes -# VARNISH_BACKEND_STORAGE_SIZE=10240000 -# VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin -# -# +# +# # The minimum number of worker threads to start +# VARNISH_MIN_THREADS=1 +# +# # The Maximum number of worker threads to start +# VARNISH_MAX_THREADS=1000 +# +# # Idle timeout for worker threads +# VARNISH_THREAD_TIMEOUT=120 +# +# # Cache file location +# VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin +# +# # Cache file size: in bytes, optionally using k / M / G / T suffix, +# # or in percentage of available disk space using the % suffix. +# VARNISH_STORAGE_SIZE=1G +# # # Backend storage specification -# VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}" -# -# -# # Set default ttl in secounds +# VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}" +# +# # Default TTL used when the backend does not specify one # VARNISH_TTL=120 -# +# # # DAEMON_OPTS is used by the init script. If you add or remove options, make # # sure you update this section, too. # DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ -# -h ${VARNISH_HASHOPTION} \ # -f ${VARNISH_VCL_CONF} \ # -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ # -t ${VARNISH_TTL} \ -# -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ -# -s ${VARNISH_BACKEND_STORAGE}" +# -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ +# -s ${VARNISH_STORAGE}" # Copied: branches/1.0/doc (from rev 1442, trunk/varnish-cache/doc) Modified: branches/1.0/redhat/varnish.initrc =================================================================== --- branches/1.0/redhat/varnish.initrc 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/redhat/varnish.initrc 2007-05-17 12:21:50 UTC (rev 1443) @@ -13,17 +13,22 @@ RETVAL=0 PROCNAME=varnishd +PIDFILE=/var/run/varnish.pid +LOCKFILE=/var/lock/subsys/varnish +# Include varnish defaults . /etc/sysconfig/varnish -if [ "$DAEMON" = "" ]; then DAEMON="/usr/sbin/varnishd"; fi -DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ - -h ${VARNISH_HASHOPTION} \ - -f ${VARNISH_VCL_CONF} \ - -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ - -t ${VARNISH_TTL} \ - -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ - -s ${VARNISH_BACKEND_STORAGE}" +DAEMON="/usr/sbin/varnishd" + +# $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one +# have to set up a backend. +if [ "$DAEMON_OPTS" = "" ]; then + echo "No values specified in DAEMON_OPTS. Please read the varnishd(1)" + echo "manpage and put configuration options in /etc/sysconfig/varnish" + exit 1 +fi + mkdir -p /var/run/varnish 2>/dev/null # Open files (usually 1024, which is way too small for varnish) @@ -34,14 +39,14 @@ case "$1" in start) echo -n "Starting varnish HTTP accelerator: " - daemon $DAEMON "$DAEMON_OPTS" + daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} sleep 1 pkill -0 $PROCNAME RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success - touch /var/lock/subsys/varnish + touch $LOCKFILE else echo_failure fi @@ -49,19 +54,19 @@ ;; stop) echo -n "Stopping varnish HTTP accelerator: " - killproc $DAEMON + killproc -p $PIDFILE $DAEMON RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success - rm -f /var/lock/subsys/varnish + rm -f $LOCKFILE $PIDFILE else echo_failure fi echo ;; status) - status $PROCNAME + status -p $PIDFILE $PROCNAME RETVAL=$? ;; restart|reload) @@ -70,7 +75,7 @@ RETVAL=$? ;; condrestart) - if [ -f /var/lock/subsys/varnish ]; then + if [ -f $PIDFILE ]; then $0 stop $0 start RETVAL=$? Modified: branches/1.0/redhat/varnish.spec =================================================================== --- branches/1.0/redhat/varnish.spec 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/redhat/varnish.spec 2007-05-17 12:21:50 UTC (rev 1443) @@ -60,7 +60,7 @@ %{__make} %{?_smp_mflags} -sed -e ' s/8080/80/g ' etc/vcl.conf > redhat/vcl.conf +sed -e ' s/8080/80/g ' etc/default.vcl > redhat/default.vcl %install rm -rf %{buildroot} @@ -75,7 +75,7 @@ mkdir -p %{buildroot}/var/lib/varnish mkdir -p %{buildroot}/var/log/varnish -%{__install} -D -m 0644 redhat/vcl.conf %{buildroot}%{_sysconfdir}/varnish/vcl.conf +%{__install} -D -m 0644 redhat/default.vcl %{buildroot}%{_sysconfdir}/varnish/default.vcl %{__install} -D -m 0644 redhat/varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish %{__install} -D -m 0644 redhat/varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish %{__install} -D -m 0755 redhat/varnish.initrc %{buildroot}%{_sysconfdir}/init.d/varnish @@ -92,9 +92,9 @@ %{_var}/log/varnish %{_mandir}/man1/*.1* %{_mandir}/man7/*.7* -%doc INSTALL LICENSE README redhat/README.redhat redhat/vcl.conf ChangeLog +%doc INSTALL LICENSE README redhat/README.redhat redhat/default.vcl ChangeLog %dir %{_sysconfdir}/varnish/ -%config(noreplace) %{_sysconfdir}/varnish/vcl.conf +%config(noreplace) %{_sysconfdir}/varnish/default.vcl %config(noreplace) %{_sysconfdir}/sysconfig/varnish %config(noreplace) %{_sysconfdir}/logrotate.d/varnish %{_sysconfdir}/init.d/varnish @@ -135,6 +135,11 @@ %postun libs -p /sbin/ldconfig %changelog +* Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070516 +- Wrapping up for 1.0.4 +- Changes in sysconfig and init scripts. Syncing with files in + trunk/debian + * Fri May 11 2007 Ingvar Hagelund - 1.0.svn-20070511 - Threw latest changes into svn trunk - Removed the conversion of manpages into utf8. They are all utf8 in trunk Modified: branches/1.0/redhat/varnish.sysconfig =================================================================== --- branches/1.0/redhat/varnish.sysconfig 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/redhat/varnish.sysconfig 2007-05-17 12:21:50 UTC (rev 1443) @@ -1,54 +1,87 @@ +# Configuration file for varnish # -# Default variables for varnish +# /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this +# shell script fragment. # -# The main daemon binary -VARNISHD=/usr/sbin/varnish +# Maximum number of open files (for ulimit -n) +NFILES=131072 -# VCL Configuration file. This is the "main configuration file" -VARNISH_VCL_CONF=/etc/varnish/vcl.conf +# This file contains 4 alternatives, please use only one. +## Alternative 1, Minimal configuration, no VCL +# +# Listen on port 6081, administration on localhost:6082, and forward to +# content server on localhost:8080. Use a fixed-size cache file. +# +DAEMON_OPTS="-a :6081 \ + -T localhost:6082 \ + -b localhost:8080 \ + -s file,/var/lib/varnish/varnish_storage.bin,1G" -# Default address and port to bind to. -# To make varnish accept normal http traffic, -# change the listen port to 80 -VARNISH_LISTEN_ADDRESS=0.0.0.0 -VARNISH_LISTEN_PORT=6081 +## Alternative 2, Configuration with VCL +# +# Listen on port 6081, administration on localhost:6082, and forward to +# one content server selected by the vcl file, based on the request. Use a +# fixed-size cache file. +# +# DAEMON_OPTS="-a :6081 \ +# -T localhost:6082 \ +# -f /etc/varnish/default.vcl \ +# -s file,/var/lib/varnish/varnish_storage.bin,1G" -# Telnet admin interface listen address and port -VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 -VARNISH_ADMIN_LISTEN_PORT=6082 +## Alternative 3, Advanced configuration +# +# See varnishd(1) for more information. +# +# # Main configuration file. You probably want to change it :) +# VARNISH_VCL_CONF=/etc/varnish/default.vcl +# +# # Default address and port to bind to +# # Blank address means all IPv4 and IPv6 interfaces, otherwise specify +# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets. +# VARNISH_LISTEN_ADDRESS= +# VARNISH_LISTEN_PORT=6081 +# +# # Telnet admin interface listen address and port +# VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 +# VARNISH_ADMIN_LISTEN_PORT=6082 +# +# # The minimum number of worker threads to start +# VARNISH_MIN_THREADS=1 +# +# # The Maximum number of worker threads to start +# VARNISH_MAX_THREADS=1000 +# +# # Idle timeout for worker threads +# VARNISH_THREAD_TIMEOUT=120 +# +# # Cache file location +# VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin +# +# # Cache file size: in bytes, optionally using k / M / G / T suffix, +# # or in percentage of available disk space using the % suffix. +# VARNISH_STORAGE_SIZE=1G +# +# # Backend storage specification +# VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}" +# +# # Default TTL used when the backend does not specify one +# VARNISH_TTL=120 +# +# # DAEMON_OPTS is used by the init script. If you add or remove options, make +# # sure you update this section, too. +# DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ +# -f ${VARNISH_VCL_CONF} \ +# -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ +# -t ${VARNISH_TTL} \ +# -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ +# -s ${VARNISH_STORAGE}" +# -# The minimum number of threads to start -VARNISH_MIN_WORKER_THREADS=1 - -# Maximum number of worker threads -VARNISH_MAX_WORKER_THREADS=1000 - - -# Timeout value in seconds for threads to return -VARNISH_WORKER_THREAD_TIMEOUT=10 - - -# Hash algorithm to be used -VARNISH_HASHOPTION=classic - - -# Maximum size of the backend storagefile in bytes -VARNISH_BACKEND_STORAGE_SIZE=10240000 -VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin - - -# Backend storage specification -VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}" - - -# Set default ttl in secounds -VARNISH_TTL=120 - -# The Maximum number of open files (ulimit) -# Default : 131072 (system default is usually 1024) -NFILES=131072 +## Alternative 4, Do It Yourself. See varnishd(1) for more information. +# +# DAEMON_OPTS="" Modified: branches/1.0/redhat/varnishlog.initrc =================================================================== --- branches/1.0/redhat/varnishlog.initrc 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/redhat/varnishlog.initrc 2007-05-17 12:21:50 UTC (rev 1443) @@ -14,24 +14,11 @@ RETVAL=0 PROCNAME=varnishlog -. /etc/sysconfig/varnish +DAEMON="/usr/bin/varnishlog" +PIDFILE="/var/run/varnish/varnishlog.pid" +LOCKFILE="/var/lock/subsys/varnishlog" +LOGFILE="/var/log/varnish/varnish.log" -if [ "$LOGDAEMON" = "" ] -then - DAEMON="/usr/bin/varnishlog" -else - DAEMON="$LOGDAEMON" -fi - -if [ "$LOGPIDFILE" = "" ] -then - PIDFILE="/var/run/varnish/varnishlog.pid" -else - PIDFILE="$LOGPIDFILE" -fi - -if [ "$LOGFILE" = "" ]; then LOGFILE="/var/log/varnish/varnish.log"; fi - DAEMON_OPTS="-a -w ${LOGFILE} -D -P $PIDFILE" mkdir -p /var/run/varnish 2>/dev/null @@ -40,14 +27,14 @@ case "$1" in start) echo -n "Starting varnish logging daeon: " - daemon $DAEMON "$DAEMON_OPTS" + daemon --pidfile $PIDFILE $DAEMON "$DAEMON_OPTS" sleep 1 pkill -0 $PROCNAME RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success - touch /var/lock/subsys/varnishlog + touch $LOCKFILE else echo_failure fi @@ -55,19 +42,19 @@ ;; stop) echo -n "Stopping varnish logging daemon: " - killproc $DAEMON + killproc -p $PIDFILE $DAEMON RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success - rm -f /var/lock/subsys/varnishlog + rm -f $LOCKFILE $PIDFILE else echo_failure fi echo ;; status) - status $PROCNAME + status -p $PIDFILE $PROCNAME RETVAL=$? ;; restart|reload) @@ -76,7 +63,7 @@ RETVAL=$? ;; condrestart) - if [ -f /var/lock/subsys/varnishlog ]; then + if [ -f $PIDFILE ]; then $0 stop $0 start RETVAL=$? Deleted: branches/1.0/svn2cl.xsl =================================================================== --- branches/1.0/svn2cl.xsl 2007-05-17 11:51:46 UTC (rev 1442) +++ branches/1.0/svn2cl.xsl 2007-05-17 12:21:50 UTC (rev 1443) @@ -1,405 +0,0 @@ - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &newl; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &newl; - - - - - &space;&space; - - - - &newl; - &newl; - - - - - - - &newl; - - - - - &space;&space; - - - - &newl;&newl; - - - - - - :&space; - - - - - [r - - ]&space; - - - - - - - &newl; - - - - - - - &newl; - - &space;*&space; - - - - - &newl;&space;&space;&space; - - - - - - - - - - - - - &space; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ,&space; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . - - - - - - - - - - - - - - - - - &space;&space;&space; - - - - - - - - - - &newl; - - - - - - - - - - - - - - - - - - &newl;&space;&space;&space; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &newl;&newl; - - - - - - - - - - - - - - - - - Modified: trunk/varnish-cache/ChangeLog =================================================================== --- trunk/varnish-cache/ChangeLog 2007-05-17 11:51:46 UTC (rev 1442) +++ trunk/varnish-cache/ChangeLog 2007-05-17 12:21:50 UTC (rev 1443) @@ -1,6806 +1,114 @@ -2006-08-11 08:40 des +Change log for Varnish 1.0.4 - * trunk/varnish-cache/svn2cl.xsl: +Changes between 1.0.3 and 1.0.4 - Widen left and right margins, and add a blank line between the paths and - the message. +varnishd -2006-08-11 08:35 des + ? The request workflow has been redesigned to simplify request processing and + eliminate code duplication. All codepaths which need to speak HTTP now + share a single implementation of the protocol. Some new VCL hooks have been + added, though they aren't much use yet. The only real user-visible change + should be that Varnish now handles persistent backend connections correctly + (see ticket #56). - * trunk/varnish-cache/svn2cl.xsl: + ? Support for multiple listen addresses has been added. - Print the message separately from the paths to avoid strange wrapping. + ? An "include" facility has been added to VCL, allowing VCL code to pull in + code fragments from multiple files. -2006-08-11 08:34 des + ? Multiple definitions of the same VCL function are now concatenated into one + in the order in which they appear in the source. This simplifies the + mechanism for falling back to the built-in default for cases which aren't + handled in custom code, and facilitates modularization. - * trunk/varnish-cache/svn2cl.xsl: + ? The code used to format management command arguments before passing them on + to the child process would underestimate the amount of space needed to hold + each argument once quotes and special characters were properly escaped, + resulting in a buffer overflow. This has been corrected. - This is the XSL stylesheet used to generate the ChangeLog. + ? The VCL compiler has been overhauled. Several memory leaks have been + plugged, and error detection and reporting has been improved throughout. + Parts of the compiler have been refactored to simplify future extension of + the language. -2006-08-11 08:25 des + ? A bug in the VCL compiler which resulted in incorrect parsing of the + decrement (-=) operator has been fixed. - * trunk/varnish-cache/Makefile.am: + ? A new -C command-line option has been added which causes varnishd to + compile the VCL code (either from a file specified with -f or the built-in + default), print the resulting C code and exit. - Include LICENSE and autogen.sh in the dist tarball. + ? When processing a backend response using chunked encoding, if a chunk + header crosses a read buffer boundary, read additional bytes from the + backend connection until the chunk header is complete. -2006-08-11 08:25 des + ? A new ping_interval run-time parameter controls how often the management + process checks that the worker process is alive. - * trunk/varnish-cache/lib/libcompat/Makefile.am: + ? A bug which would cause the worker process to dereference a NULL pointer + and crash if the backend did not respond has been fixed. - Don't install libcompat.a. + ? In some cases, such as when they are used by AJAX applications to + circumvent Internet Explorer's over-eager disk cache, it may be desirable + to cache POST requests. However, the code path responsible for delivering + objects from cache would only transmit the response body when replying to a + GET request. This has been extended to also apply to POST. -2006-08-11 08:24 des + This should be revisited at a later date to allow VCL code to control + whether the body is delivered. - * trunk/varnish-cache/INSTALL, trunk/varnish-cache/README: + ? Varnish now respects Cache-control: s-maxage, and prefers it to + Cache-control: max-age if both are present. - Add a README and installation instructions. + This should be revisited at a later date to allow VCL code to control which + headers are used and how they are interpreted. -2006-08-11 07:35 phk + ? When loading a new VCL script, the management process will now load the + compiled object to verify that it links correctly before instructing the + worker process to load it. - * trunk/varnish-cache/include/http_headers.h: + ? A new -P command-line options has been added which causes varnishd to + create a PID file. - Don't filter Cache-Control out in replies from backend. + ? The sendfile_threshold run-time parameter's default value has been set to + infinity after a variety of sendfile()-related bugs were discovered on + several platforms. -2006-08-11 07:35 phk +varnishlog - * trunk/varnish-cache/bin/varnishd/tcp.c: + ? When grouping log entries by request, varnishlog attempts to collapse the + log entry for a call to a VCL function with the log entry for the + corresponding return from VCL. When two VCL calls were made in succession, + varnishlog would incorrectly omit the newline between the two calls (see + ticket #95). - Fix protocol family selection logic to also work on - a FreeBSD machine with now IPv6. - - Remember to also free the addrinfo in case of success. + ? New -D and -P command-line options have been added to daemonize and create + a pidfile, respectively. -2006-08-11 07:33 phk +varnishncsa - * trunk/varnish-cache/bin/varnishd/varnishd.c: + ? The formatting callback has been largely rewritten for clarity, robustness + and efficiency. - Bail if we don't get a listening socket. + If a request included a Host: header, construct and output an absolute URL. + This makes varnishncsa output from servers which handle multiple virtual + hosts far more useful. -2006-08-11 07:12 phk +Documentation - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: + ? The documentation?especially the VCL documentation?has been greatly + extended and improved. - Missed one: Only include compat headers if necessary +Build system -2006-08-11 07:11 phk + ? The name and location of the curses or ncurses library is now correctly + detected by the configure script instead of being hardcoded into affected + Makefiles. This allows Varnish to build correctly on a wider range of + platforms. - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/flint.sh, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/tcp.c: + ? Compatibility shims for clock_gettime() are now correctly applied where + needed, allowing Varnish to build on MacOS X. - Pull in ../../config.h when running flexelint. - - Only include compat headers if we need them. + ? The autogen.sh script will now correctly detect and warn about automake + versions which are known not to work correctly. -2006-08-11 07:03 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Fix indentation - -2006-08-11 07:02 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Remove unused variable. - -2006-08-11 07:01 phk - - * trunk/varnish-cache/bin/varnishd/flint.sh: - - Point at KQUEUE version of acceptor by default. - -2006-08-11 07:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Fix an assert so it actually has a chance of firing: (an unsigned is - always >= 0) - -2006-08-10 13:03 des - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Rewrite pass_chunked(). - -2006-08-10 11:48 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Got the requesttime right this time. - - I am noticing free()'s that are freeing empty variables/pointers. Have - to find where is happens. - Also noticing IP adresses not set correctly. - - Still load of debugcode. - -2006-08-10 11:10 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Updated to work with new inner workings (ReqStart, ReqEnd, sbuf - replacement etc). - - Code now compiles. - -2006-08-10 08:56 des - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - FreeBSD needs for IPPROTO_IPV6 and IPV6_V6ONLY. - -2006-08-10 07:38 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Added some more meat to the program. Loads of debug code still on. - - Next step is to add the correct time. It's a bit tricky, and I haven't - gotten it right just yet. - -2006-08-09 14:49 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/configure.ac: - - Add an epoll()-based acceptor for Linux 2.6. Simple empirical tests - indicate - that epoll() performs significantly better than poll() (less CPU usage). - -2006-08-09 12:38 des - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Clear reference to backend when we release our VCL reference. - -2006-08-09 11:24 des - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - Add support for using separate backends for separate virtual hosts: - - - remove the obj.backend variable, which is not connected to anything. - - define a req.backend variable and implement l/r functions for it - - complete / correct support for setting / comparing backend values - -2006-08-09 11:22 des - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Cosmetic: redefine HTTP_HDR_* as an enum and rename MAX_HTTP_HDRS to - HTTP_HDR_MAX. - -2006-08-09 09:36 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Rewrite open_tcp(): use only one listening socket. Try for a combined - IPv6 / IPv4 socket; if IPv6 is not available, fall back to an IPv4 socket. - -2006-08-08 14:52 des - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - While FreeBSD defaults to MAP_SHARED, Linux requires either MAP_SHARED or - MAP_PRIVATE to be specified. Do so. - -2006-08-08 14:00 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/configure.ac: - - Autodetect the need to link against libdl for dlopen(). - -2006-08-08 12:57 des - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat/setproctitle.h, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/setproctitle.c: - - Add a setproctitle() stub to libcompat. - -2006-08-08 12:57 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - #include "compat/srandomdev.h" for srandomdev() - -2006-08-08 12:55 des - - * trunk/varnish-cache/include/compat/vis.h, - trunk/varnish-cache/lib/libcompat/vis.c: - - Expand keywords. - -2006-08-08 12:46 des - - * trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/configure.ac: - - #include for fstatfs if it is available. - -2006-08-08 12:45 des - - * trunk/varnish-cache/configure.ac: - - Now that we define _GNU_SOURCE, the asprintf() / vasprintf() hack is no - longer required. - -2006-08-08 12:42 des - - * trunk/varnish-cache/configure.ac: - - Defining _GNU_SOURCE gives us native asprintf() and strptime() on glibc - systems, and has no effect on FreeBSD. - -2006-08-08 12:31 des - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishtop/Makefile.am, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat/vis.h, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/vis.c: - - Bring in FreeBSD's version of vis(3), strvis(3) and strvisx(3). - -2006-08-08 12:15 des - - * trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat/srandomdev.h, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/srandomdev.c: - - Add a simple srandomdev() implementation inspired by the one in FreeBSD. - -2006-08-08 09:15 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - The correct header for poll() is , not like the Linux - man page says (poll() is an XSI extension in SUSv[23]) - -2006-08-08 07:47 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/configure.ac: - - Autodetect the availability of kqueue() and / or poll(). - -2006-08-08 07:47 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - #include "libvarnish.h" for varnish_version(). - -2006-08-08 07:36 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add back sendfile support (under #ifdef HAVE_SENDFILE) but don't engage - it for small objects on the suspicion that it has highish setup cost. - -2006-08-08 07:17 des - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat, - trunk/varnish-cache/include/compat.h, - trunk/varnish-cache/include/compat/asprintf.h, - trunk/varnish-cache/include/compat/strlcat.h, - trunk/varnish-cache/include/compat/strlcpy.h, - trunk/varnish-cache/include/compat/vasprintf.h, - trunk/varnish-cache/lib/libcompat/asprintf.c, - trunk/varnish-cache/lib/libcompat/strlcat.c, - trunk/varnish-cache/lib/libcompat/strlcpy.c, - trunk/varnish-cache/lib/libcompat/vasprintf.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c: - - Split compat.h into one header per function to avoid issues with e.g. the - vasprintf() prototype needing even when it isn't used. - -2006-08-08 07:15 des - - * trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishstat/Makefile.am: - - varnish{ncsa,stat} also need librt. - -2006-08-08 07:03 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/configure.ac: - - Attempt to detect the availability of RSA's MD5 implementation, and the - need to link against libmd to get it. - Attempt to detect the need for linking against librt to get - clock_gettime(). - -2006-08-08 07:01 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Fix braino - -2006-08-08 06:39 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Default to 4096 buckets and 256 mutexes - -2006-08-08 06:38 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Use crc32 hash by default, MD5 is a compile time option - -2006-08-08 06:37 phk - - * trunk/varnish-cache/bin/varnishd/flint.lnt: - - lbv_assert never returns - -2006-08-07 21:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - 64bit changes - -2006-08-07 21:01 phk - - * trunk/varnish-cache/configure.ac: - - Add -Wformat and remove -fno-inline which disables it. - -2006-08-07 21:01 phk - - * trunk/varnish-cache/lib/libvarnish/assert.c: - - Fix printf format error - -2006-08-07 20:50 phk - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/configure.ac: - - Update to new shmlog tag - -2006-08-07 20:47 phk - - * trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Eliminate use of extensible printf - -2006-08-07 20:24 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Improve the "-d" and "-d -d" facilities. - - When we close a CLI and it had fd# 0 and/or fd#1, reopen these - as /dev/null so the will not be reused for the CLI pipe to the - child on next restart, otherwise stdout/stderr output from the - manager would get sent there and confuse the clients CLI reader. - - Don't double free a pointer to the CLI buffer. - - Accept non-zero results from cli_readres() errors are non-fatal. - - Use stderr more consistently for manager debugging. - -2006-08-07 18:33 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - An assert to catch silly errors. - -2006-08-07 17:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Rename SHMlog tags for consistency - XID -> ReqStart - ReqServTime -> ReqEnd - -2006-08-07 17:18 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Remove printf extensions used for development debugging - -2006-08-07 17:18 phk - - * trunk/varnish-cache/include/libvarnish.h: - - Make assert do the right thing - -2006-08-07 17:15 phk - - * trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Clean up #includes - -2006-08-07 17:10 phk - - * trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/assert.c: - - Call __assert() lbv_assert() instead. - -2006-08-07 17:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/lib/libvarnish/assert.c: - - quench warnings related to libvarnish.h - -2006-08-07 16:45 des - - * trunk/varnish-cache/configure.ac: - - Don't trust the documentation - when it says "additional headers", it - actually means "additional code to place before main() in the test program" - -2006-08-07 16:42 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishtester/varnishtester.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/assert.c: - - Add our own assert in libvarnish.h - - Include libvarnish.h from cache.h and mgt.h - -2006-08-07 16:29 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - #include "libvarnish.h" for varnish_version(). - -2006-08-07 16:26 des - - * trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c: - - #include "compat.h" for asprintf(). - -2006-08-07 16:24 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - vsb.h is not a system header. - -2006-08-07 16:23 des - - * trunk/varnish-cache/bin/varnishtop/varnishtop.c: - - #include "libvarnish.h" for varnish_version(). - -2006-08-07 16:23 des - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - #include "compat.h" for asprintf(). Sort includes. - -2006-08-07 16:20 des - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Define INFTIM if it isn't already. - -2006-08-07 16:20 des - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Spell SIZE_MAX correctly. - -2006-08-07 16:17 des - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - Define INFTIM if it isn't already. - -2006-08-07 16:17 des - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - #include for asprintf(). - -2006-08-07 16:15 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Handle CLI trouble with the childproc - -2006-08-07 16:14 phk - - * trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Add CLIS_COMMS errno (400) and return an error text as well. - -2006-08-07 16:11 des - - * trunk/varnish-cache/bin/varnishd/tcp.c, trunk/varnish-cache/configure.ac: - - Check whether we have accept filters before trying to use them. - -2006-08-07 16:05 phk - - * trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Handle read errors on the cli pipes. - -2006-08-07 15:54 des - - * trunk/varnish-cache/configure.ac: - - Improve descriptions of HAVE_ASPRINTF / HAVE_VASPRINTF. - -2006-08-07 15:54 phk - - * trunk/varnish-cache/lib/libvarnish/vsb.c: - - Quench warnings. - -2006-08-07 15:51 des - - * trunk/varnish-cache/include/compat.h, - trunk/varnish-cache/lib/libcompat/vasprintf.c: - - My idiocy knows no bounds. Make sure this actually builds. - -2006-08-07 15:47 des - - * trunk/varnish-cache/configure.ac: - - Improve detection of the presence and usability of asprintf() / - vasprintf(). - -2006-08-07 15:42 des - - * trunk/varnish-cache/include/compat.h: - - paste-o. - -2006-08-07 15:24 des - - * trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/compat.h, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/asprintf.c, - trunk/varnish-cache/lib/libcompat/strlcat.c, - trunk/varnish-cache/lib/libcompat/strlcpy.c, - trunk/varnish-cache/lib/libcompat/vasprintf.c: - - Add implementations of asprintf(3) and vasprintf(3). - -2006-08-07 15:09 des - - * trunk/varnish-cache/include/libvarnish.h: - - Relucantly include for time_t. We'll have to clean up our header - files at some point. - -2006-08-07 15:08 des - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Remove redundant definition of __assert(). - -2006-08-07 15:00 des - - * trunk/varnish-cache/include/libvarnish.h: - - TIM_{format,parse}() are used unconditionally, so declare them - unconditionally. - -2006-08-07 15:00 des - - * trunk/varnish-cache/bin/varnishd/cache.h: - - Sort includes, add for uint64_t. - -2006-08-07 14:55 des - - * trunk/varnish-cache/lib/libvcl/vcc_compile.c: - - Eliminate __unused. - -2006-08-07 14:52 des - - * trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Sort includes, add for uintptr_t. - -2006-08-07 12:42 des - - * trunk/varnish-cache/lib/libvarnish/vsb.3: - - Define str-Lb-libvarnish so ".Lb libvarnish" will work. This should be in - a shared file somewhere with some soelim magic in the Makefile, but don't - bother right now - the file isn't installed anyway. - -2006-08-07 12:35 des - - * trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/version.c: - - Add a -V option (display version and exit) to all programs. - -2006-08-07 11:09 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishtop/Makefile.am, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/cli_common.h, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/include/sbuf.h, trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vsb.h, - trunk/varnish-cache/lib/Makefile.am, trunk/varnish-cache/lib/libsbuf, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/cli_common.c, - trunk/varnish-cache/lib/libvarnish/vsb.3, - trunk/varnish-cache/lib/libvarnish/vsb.c, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Fold libsbuf into libvarnish, with s/sbuf/vsb/g. - -2006-08-07 10:46 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Timeout pipe connections after 600 seconds. - -2006-08-07 10:40 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Use a 600 second timeout, 120 second is too little. - -2006-08-07 09:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Set SO_SNDTIMEO to 120 seconds - -2006-08-07 08:42 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - First step of slow client handling: Lose the stevedore function - for sending and instead record the fd+off_t in the storage object. - - This eliminates sendfile from storage_file.c, next step is to put - it back in the generic code in cache_response.c - -2006-08-07 05:52 des - - * trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Update #include directives. - -2006-08-07 05:49 des - - * trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/miniobj.h, - trunk/varnish-cache/include/stats.h, - trunk/varnish-cache/include/varnish/assert.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/binary_heap.c, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvarnish/time.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_debug.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_log.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_util.c: - - Expand keywords. - -2006-08-07 05:49 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/cli_common.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Move common_cli.[ch] out of varnishd, and rename them to cli_common.[ch]. - -2006-08-07 05:47 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am: - - List headers in noinst_HEADERS instead of SOURCES. - -2006-08-07 00:21 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Fresh start after study of output from varnishlog -o. - - First off is IP adress logging and clearing. - -2006-08-06 17:00 des - - * trunk/varnish-cache: - - Add compile to svn:ignore. - -2006-08-06 16:55 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Make - -w - - work as expected. - -2006-08-06 15:02 des - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishtester/Makefile.am, - trunk/varnish-cache/bin/varnishtop/Makefile.am, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libsbuf/Makefile.am, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am, - trunk/varnish-cache/lib/libvcl/Makefile.am: - - Systematically include config.h. - -2006-08-06 14:33 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am: - - Forcibly include config.h. - -2006-08-06 13:51 des - - * trunk/varnish-cache/configure.ac: - - Change version to "trunk" until I can figure out a way to have it reflect - the current date. - -2006-08-06 13:49 des - - * trunk/varnish-cache/configure.ac: - - Include -pipe in CFLAGS. - Reduce optimization level to -O when debugging. - -2006-08-06 12:51 des - - * trunk/varnish-cache: - - Adjust directory properties. - -2006-08-06 12:49 des - - * trunk/varnish-cache/bin/varnishlog, - trunk/varnish-cache/bin/varnishncsa, - trunk/varnish-cache/bin/varnishstat, - trunk/varnish-cache/bin/varnishtester, - trunk/varnish-cache/bin/varnishtop, trunk/varnish-cache/lib/libcompat, - trunk/varnish-cache/lib/libsbuf, trunk/varnish-cache/lib/libvcl: - - Adjust directory properties. - -2006-08-06 12:26 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishstat/Makefile.am: - - Add missing headers and man pages. - -2006-08-06 12:26 des - - * trunk/varnish-cache/autogen.sh: - - We no longer have any CONFIG_SUBDIRS. - -2006-08-06 12:25 des - - * trunk/varnish-cache/include/Makefile.am: - - Add missing headers. - -2006-08-06 12:23 des - - * trunk/varnish-cache/Makefile.am: - - Umm, *really* retire libevent. - -2006-08-06 12:23 des - - * trunk/varnish-cache/Makefile.am, trunk/varnish-cache/configure.ac, - trunk/varnish-cache/contrib: - - Retire libevent. - -2006-08-06 12:20 des - - * trunk/varnish-cache/bin/Makefile.am, trunk/varnish-cache/configure.ac: - - Fully disconnect varnishtester. - -2006-08-06 00:44 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - I have realized that I have major structure problems. I will have to - study varnishlog output a bit more to understand it better. - - May wanna start clean again, and use hardearned knowledge to make - better and more robust structure. - -2006-08-05 22:43 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Checks show that my IP adress checker is very restrictive and probably - deletes other loglines. We still bleeds null lines also. - - This will have to be cleaned up. - -2006-08-05 22:12 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Loglines with no IP should no longer appear. That also cleared all - lines containing a null. Not sure if my check for IP is to harsly - implemented and cleans to much. - -2006-08-05 21:35 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Centralized the stringwriting at last, also started memory cleanup. - -2006-08-05 21:11 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Added user, loginname, statuscode (200, 304 etc.), byte and referer to - make a logline compliant. User and loginname is hardcoded. Referer and - User-agen is unclean. Timecode is not working. This version leaks - memory bigtime, and is not ready for alpha yet. - -2006-08-05 20:52 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - For consistency: Go to deliver state instead of delivering locally. - -2006-08-05 18:11 phk - - * trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: - - Make vcl methods call their defaults as a last resort. - - Fix the location table so it knows about the default code too. - -2006-08-05 17:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - And that is not a good idea either. - -2006-08-05 17:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - This was not a valid test. - -2006-08-05 17:04 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Add some undocumented code to look for something that worries me. - -2006-08-05 16:41 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Issue error message for CLI::start and CLI::stop if child is - not in a legal state for command. - -2006-08-05 16:32 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Also trap SIGTERM - -2006-08-05 16:31 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - More work on the debug stunt - -2006-08-05 15:55 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Plug memory leaks related to starting/stopping child. - -2006-08-05 15:40 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Replace client_should_run with a 5 state enum to avoid races if multiple - CLI sources yell at the same time. - -2006-08-05 15:38 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Bail if the cli pipe is not ready - -2006-08-05 15:38 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Polish the debugstunt and make it possible to avoid it. - -2006-08-05 15:35 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - We don't disturb ourselves. - -2006-08-05 14:24 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - More defensive coding and a couple of bugs less. - -2006-08-05 14:22 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - More defensive coding. - -2006-08-05 12:45 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Add a timeout to reads from the child CLI pipe so we don't hang - for ever. - -2006-08-05 12:24 phk - - * trunk/varnish-cache/bin/varnishd/flint.lnt: - - Improve. - -2006-08-05 12:24 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Style cleanup. - - remove two unused variables. - -2006-08-05 12:24 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Remove unused include - - Fix function arg type - -2006-08-05 12:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Make sanity check of binheap permanent and fix style accordingly. - -2006-08-05 12:23 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.c: - - Remove unused include - - free buffer on error. - -2006-08-05 12:22 phk - - * trunk/varnish-cache/bin/varnishd/cache_cli.c: - - Make sure we don't overflow the line buffer - - Remove unused #include - -2006-08-05 12:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Remove unused "ip" from backend. - - Make VCL_Load static, and give it a NULL check. - -2006-08-05 12:19 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.h: - - Cleanup unused stuff - -2006-08-05 12:19 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h: - - Remove prototypes for no longer existing functions - -2006-08-05 12:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Remove unused includes - -2006-08-05 12:17 phk - - * trunk/varnish-cache/bin/varnishd/flint.sh: - - don't search libevent for includes - -2006-08-05 12:17 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - style fix - -2006-08-05 12:16 phk - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Rename struct vcls to vclprog - -2006-08-05 11:44 phk - - * trunk/varnish-cache/bin/varnishd/cli_common.c: - - remove old file - -2006-08-05 11:16 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Change manager to use mgt_event.h instead of threads to be lazy thread - developer compatible. - - POSIX, no surprise, doesn't really tell what should happen to a threaded - process which forks and consequently implemenations vary somewhat, - from Solaris which seems to Do The Right Thing, via Linux where it - works "most of the time" and to FreeBSD which more or less actively - sabotages any such attempt. - - Grin and live with it... - -2006-08-05 11:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_cli.c: - - Remove pthread.h include, it's included in cache.h - -2006-08-05 11:12 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - Remove debugging printfs - -2006-08-05 11:08 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - More bugfixes - -2006-08-05 11:07 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Add assert - -2006-08-05 10:31 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h: - - bugfixes - -2006-08-05 09:27 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h: - - Add signal support. - -2006-08-05 08:49 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h: - - bugfixes - -2006-08-05 08:19 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h: - - Add a miniature event engine based on poll(2). - - It's general enough to find other uses, but right now it's only for - the manager process. - -2006-08-05 01:17 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Got the IP, Request and User-Agent sorted out. Working on the time - -2006-08-04 20:03 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Initialize all directions to "opposite" for -b and -c to avoid - spurious first entries. - -2006-08-04 19:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Use id for printing - -2006-08-04 19:36 phk - - * trunk/varnish-cache/include/stat_field.h: - - Stats field changes - -2006-08-04 19:36 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - More comprehensive performance stats and a few asserts, just in case. - -2006-08-04 11:10 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Now that we keep track of loaded VCLs in the manager, we might - as well allow their manipulation also when the child is not - running. - -2006-08-04 10:54 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/include/cli.h, trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl: - - Redo VCL program handling. - - Keep track of all loaded VCL programs in the manager and tell the - child to load them via VCL. - - Don't start he acceptor thread until a "start" command cones down - the CLI. - - XXX: Right now we leak stuff when a VCL program is dicarded - -2006-08-04 10:23 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Redo our management of compiled VCL programs: - - Take default_vcl out of heritage. - - Keep track of all compiled VCL files and delete them at - exit. - - After starting child, use CLI to load all vcl programs - and then issue "start" via the CLI. - - In the cacher, don't start the acceptor until we get - a start command. - -2006-08-04 09:19 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Move VCL compiler related stuff to mgt_vcc.c - -2006-08-04 09:06 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Remove old cli related stuff, it now lives elsewhere - -2006-08-04 09:06 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - reimplement CLI stats - -2006-08-04 07:21 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Implement CLI ping in manager, this is a "per hop" command. - - Add mgt_cli_askchild() function to poke the CLI interface to - the child. - - Use it to ping the child every second. - -2006-08-04 07:20 phk - - * trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h: - - Move cli_func_ping to common_cli - -2006-08-04 07:19 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - SIGCHLD has already been taken care of earlier. - -2006-08-04 06:53 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/include/cli.h: - - Change the CLI protocol in a subtle but useful way: - - The first line of the response has a fixed format ("%-3d %-8u\n") - and consequently fixed length (CLI_LINE0_LEN == 13). - - This makes parsing responses more efficient. Add a function - in common_cli to do so. - -2006-08-04 06:23 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - (Re)Implement passthru of cli commands, we can now talk with the - cache process again. - -2006-08-04 06:21 phk - - * trunk/varnish-cache/include/cli.h: - - Add CLIS_CANT status code for when something is valid but currently - impossible. - -2006-08-04 06:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_cli.c: - - Typo: write cli result to correct pipe. - -2006-08-03 23:42 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Placed a new sbuf_clear at a more strategic place. It got cluttered - when a host left without SessionClose of SessionReuse. - -2006-08-03 22:01 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Got a workaround for IP adress fetching. If we connect logger while - Varnish is running, we won't catch the IP from SessionOpen since it's - already done that. Workaround is to catch the IP from SessionReuse if - IP of session is NULL - -2006-08-03 19:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Fix copy&paste bug in fetch_chunked. - -2006-08-03 19:20 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Sanitycheck that the length of an object adds up, right when we - fetch it. - -2006-08-03 11:46 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Imlement stopping and restarting of child process. - - Not as useful as it will be yet, see ticket 22 - -2006-08-03 11:45 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Make the pipe-stunt debug process smarter. - -2006-08-03 10:37 phk - - * trunk/varnish-cache/bin/Makefile.am: - - Take varnishtester out of the loop until it can be de-libevented - -2006-08-03 10:37 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Add stop command as well. - -2006-08-03 10:16 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Think I have found a program structure that works. Filling in bits to - build logline. - -2006-08-03 09:45 phk - - * trunk/varnish-cache/Makefile.am, trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/bin/varnishtester/Makefile.am: - - Remove libevent from the picture. - -2006-08-03 09:45 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_common.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h, - trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Rip out the old CLI handling and start over, more or less. - - Still bits missing. - -2006-08-03 06:45 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.h: - - Rework the cache process CLI handling: - - We are only accepting CLI from the pipes in heritage, so simply - run a loop reading those, dispatching lines as we see them. - - Export CLI_cmds[] so that the management process can see it, - we might as well take advantage of the shared binary where we can. - -2006-08-02 22:53 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Added SessionReuse so I now write a logline for SessionClose and - SessionReuse. - -2006-08-02 22:33 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Starting to get the structure right (I think). Thx for the NULL on - each string Poul-Hennning :) - -2006-08-02 20:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Add an assert, just in case. - -2006-08-02 20:54 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Fix a bug when deleting items in the binheap - -2006-08-02 19:12 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - log StatAddr with fd=0 to avoid out-of-order confusion - -2006-08-02 18:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Allow ENOENT on removing kqueue events, a close will have drained - them already. - -2006-08-02 18:12 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Tell daemon(3) to not chdir in debugging mode so we can find our core - dumps. - -2006-08-02 17:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Enter pass mode through the front door. - -2006-08-02 17:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - More asserts, sp->vbc this time. - -2006-08-02 15:55 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Remember to clear sp->vbc - -2006-08-02 13:28 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Don my plumbers outfit and twist a lot of pipes into shape: - - When -d(ebug) is specified we fork before calling daemon. - - The parent process becomes a miniature cat(1) program which connects - stdin/stdout with the management process stdin/stdout. - - It also knows that SIGINT should be passed on to the management process - in order to make it DTRT. - - Any other cause of death for this "debugger" process will (once I - teach the CLI about it) not affect the running varnish and therefore - it will be possible to start varnish in debugging mode, tweak things - a bit and CTRL-D and leave it running in the properly daemon(3)'ed - background. - - The reason for this rather complicated bit of pipework is that we - can not call daemon(3) once we have started any threads (only the - calling thread survives) and we would loose our parent relationship - to the cache process also. - -2006-08-02 12:05 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Typo: Also monitor remote sockets with the poll based acceptor. - -2006-08-02 11:58 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c: - - Remove the libevent from the backend pool manager. - - Simplify the logic here while we're at it. - -2006-08-02 11:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Add include - -2006-08-02 11:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Remove unused struct. - -2006-08-02 10:53 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Simplify backend connection memory management. - -2006-08-02 10:40 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Replace libevent based acceptor with poll(2) based acceptor. - -2006-08-02 09:34 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Bite the bullet and write an alternate acceptor which uses kqueue - directly instead of libevent. - - Degeneralize the header reading code in cache_http.c which seems to - be cleaner anyway. - - An #ifdef at the top of cache_acceptor.c selects which implementation - you want: libevent or kqueue. - -2006-08-02 07:23 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Convert pipe to use poll(2) on the two filedescriptors it cares about - and eliminate the per-workerthread event engine entirely. - -2006-08-02 07:07 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c: - - I have nothing but circumstantial evidence that libevent is involved - in the current stack corruption I see, but we might as well avoid - using it where we can: - - Don't engage the eventengine when we talk to the backend, just call - read(2) directly. - -2006-08-02 04:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c: - - More miniobj paranoia - -2006-08-01 19:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - More miniobj checks - -2006-08-01 17:54 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - More miniobj checks - -2006-08-01 16:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/flint.lnt: - - More miniobj checks - -2006-08-01 16:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - more miniobj checks - -2006-08-01 15:09 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c: - - Flinting. - -2006-08-01 15:08 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Make 32bit limitation work better. - -2006-08-01 15:08 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Fixx off by one error. - -2006-08-01 14:53 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Add miniobj checks om SMF and STORAGE - -2006-08-01 12:38 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - This is getting too longhaired: Give backend connections another - http header which we can use to build the object headers in. - -2006-08-01 12:04 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Experiment: don't use req's workspace to build object http header. - -2006-08-01 09:39 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Record timestamp when we have received completed HTTP request header, - and define this as the "start of request timestamp". - - Define "end of request timestamp" as when we are ready to transmit - HTTP header back. - - SHMlog the start and difference between start and stop with ReqServTime - tag. - - Keep track of idle sessions using CLOCK_MONOTONIC to avoid trouble - here should our clock get stepped. - -2006-07-31 22:21 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Added some more toying with the data. All is still a mess, and I am - not sure of structure yet. PHK is also doing changes in areas that - will be needed. - -2006-07-31 22:09 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Always NUL terminate shmlog entries. - -2006-07-31 21:49 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Create three groups of seven SHMlog tags: - - {Rx,Tx,Obj}{Request,Response,Status,URL,Protocol,Header,LostHeader} - - And log http header munching accordingly. - -2006-07-31 21:46 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Remove unused variable - -2006-07-31 21:37 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - addr might be NULL if we are called from the prefetcher. - -2006-07-31 21:04 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add http_ClrHeader() and cure an unintended bug-oid its use exposes: - we checked if the request is a GET long after we should have. - -2006-07-31 20:38 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add a http_SetResp() function for constructing HTTP responses (like 304). - - Eliminate the header index from http_SetHeader() which is no unused. - -2006-07-31 20:27 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Log the headers we store in the object under ObjHeader so that - we don't get two confusing batches of TxHeader in the sessions logentries. - -2006-07-31 19:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Fix the dot-graph - -2006-07-31 14:50 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Initial commit of real structure. This code will print the User-Agent. - -2006-07-31 07:26 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Introduce http_SetHeader() for setting a http header to a const string, - no need to waste time printf'ing in this case, and no need to waste - workspace. - -2006-07-31 07:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Don't fill more than half the workspace with received data, we need to - have space for composing the reply as well. - - Without this fix, the entire workspace could be filled with pipelined - requests and we would have no space to compose the reply. - -2006-07-31 06:36 des - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishncsa, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.1, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/configure.ac: - - Clone varnishncsa off of varnishlog. Anders will hack on it to produce - NCSA-style (common / combined) logs. - -2006-07-31 06:24 des - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Unbreak build. - -2006-07-28 13:41 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - "HEAD" has 4 characters. - -2006-07-24 10:13 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - remove this file (again) - -2006-07-22 22:01 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - reorg a little bit. - -2006-07-22 21:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Eliminate redundant args from stevedore->send() - - Have WRK_Write() and friends return number of bytes (we can't use - WRK_Flush() as that may act on both header and body). - - Collect more stats. - -2006-07-22 20:57 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h: - - Add per address, per session and total statistics. - - We (will) collect data in unlocked per workerthread accumulators - and whenever the workerthread leaves the session, we charge the - bill to the srcaddr (issuing a StatAddr shmrecord), to the session - and to the global counters in the stats struct. - - When sessions die we issue a StatSess shmrecord. - - StatAddr and StatSess has the same format: - address - port (always zero for StatAddr) - duration (seconds) - #sessions - #requests - #pipe - #pass - #fetch - #hdrbytes - #bodybytes - -2006-07-22 16:55 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Make sure there always is a Host: header in fetch requests. - - We fill it in with backend.hostname, but this may not be optimal - (direct IP# etc etc) so VCL should be able to override it. - -2006-07-22 16:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Action pass from vcl_hit() needs to go to STP_PASS - -2006-07-22 16:15 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Always use GET and HTTP/1.1 against the backend for fetch - -2006-07-22 13:58 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - exit after error - -2006-07-22 12:00 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: - - Implement regexp matching of strings in VCL. - - For now we default to REG_EXTENDED, but it might make sense - to let the user control this flag and the case sensitivity. - - Another concern is the stringification of regexps, it may lead - to backslash madness. Maybe we should define '...' string types - also and do no backslash substitution in those at all. - -2006-07-22 10:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: - - Change the acl syntax slightly: the ( ... ) should enclose all of - the rule (ie: also ! and /mask if present). - - Implement matching for IPv4. - - Acl tests are shmlogged as follows (doc candidate): - - shmlog tag: VCL_actl - - "NO_MATCH $acl" - client did not match access list $acl - "FAIL $acl $rule" - getaddrinfo(3) failed on $rule which had a '!' - "MATCH $acl $rule" - client matched $rule - "NEG_MATCH $acl $rule" - client matched negated (!) $rule - -2006-07-22 10:35 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - Store the socket address in the session - -2006-07-22 09:38 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl: - - VCL compiler: - add two sbufs for "init" and "fini" actions. - - VCL ACLs: Change syntax and implementation as follows. - - ACL Syntax now works the following way: - - acl $name { - ! ( "myhost.com" ) ; - "10.0.0.1" /8 ; - } - - The '!' means not. If the address matches the rest of the rule - the address does NOT match the acl and the search terminates here. - - Enclosing the string in paranthesis means that the rule will be ignored - if the string cannot be converted to an address (with getaddrinfo). - - When a string can not be looked up, and is not enclosed in a - paranthesis, a positive rule (ie: without !) will not match and a - negative rule (with !) will match. - - A mask can always be supplied, no matter the style of the string - given, so it is possible to do things like: - - { "fw.ourcompany.dom" / 24 } - - Which means "any host on the same /24 subnet as fw.ourcompany.dom". - - - Unfortunately getaddrinfo() does not return a TTL for the results, - in the future we may want to use some kind of timeout to refresh - the lookups. - -2006-07-22 08:02 phk - - * trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/Makefile.am, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - Split IP/ACL compilation into vcc_acl.c - -2006-07-21 22:12 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Unless the user specifies an explicit size, don't use more than 2GB - on 32 bit architectures to avoid running out of address room - - Make FlexeLint happy. - -2006-07-21 21:57 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Make FlexeLint happier - -2006-07-21 21:42 phk - - * trunk/varnish-cache/autogen.phk: - - Drop this one now. - -2006-07-21 21:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Implement TTL adjustment from VCL - - Log in shmem where the TTL came from (doc-candidate): - - 696613561 RFC 900 1153517009 1153517014 1153517914 900 0 - | | | | | | | | - | | | | | | | age - | | | | | | max-age - | | | | | Expires: header - | | | | Date: header - | | | "now" - | | TTL relative to "now" - | who set the TTL - xid of object - - or - - 696613561 VCL 20 1153517009 - | | | | - | | | "now" - | | TTL relative to "now" - | who set the TTL - xid of object - -2006-07-21 21:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - More VRT work. - - Use macros for trivial objects which are just a field in a struct. - -2006-07-21 21:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vrt.h: - - Update VRT to minimal functional level again - -2006-07-21 20:51 phk - - * trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - Use const char* for safety - -2006-07-21 20:45 phk - - * trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/include/miniobj.h, - trunk/varnish-cache/include/stat_field.h, - trunk/varnish-cache/include/stats.h, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h: - - Update - -2006-07-21 20:44 phk - - * trunk/varnish-cache/include/vrt_obj.h: - - This file is generated. - -2006-07-21 20:43 phk - - * trunk/varnish-cache/lib/libvcl/Makefile.am, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Automate generation of tables and prototypes for the objects which - VCL programs can manipulate. - -2006-07-21 18:12 phk - - * trunk/varnish-cache/lib/libvcl/Makefile.am, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c, - trunk/varnish-cache/lib/libvcl/vcc_token_defs.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_priv.h, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Move things over to the correct "VCC" prefix. - - Split some stuff into separate files while we're at it. - -2006-07-21 16:25 phk - - * trunk/varnish-cache/include/http_headers.h: - - update comment - -2006-07-21 16:15 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Properly log TTL calculation to shmem - -2006-07-21 16:06 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Fix formatting of responses. - -2006-07-21 16:05 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Log TTL calculation on the right fd - -2006-07-21 15:25 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Work on logtailer api a bit: - - By default, start at the last entry in shared memory. To dump the - entire segment from the start, specify '-d' option. - - Terminate programs when '-r $file' reaches EOF - -2006-07-21 12:18 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/flint.lnt: - - Cleanup - -2006-07-21 12:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Magic check on struct vbe - -2006-07-21 12:06 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Better name - -2006-07-21 11:55 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/stat_field.h: - - Convert fetch, insert and deliver to use new HTTP header munging code. - - Remove sbuf from workerthread, it is only used in the Error handling - now and it will probably not even survive that in the long run. - -2006-07-21 10:44 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Make pipe use the new http manipulation. - -2006-07-21 09:32 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/http_headers.h: - - HTTP header munging part (N of M) - - NB: Only pass mode (lightly) tested right now. - - Give up on the three element array per header and use a two element struct - instead, it reduces obfuscation and removes risk of pointer fandango. - - Introduce #defined filtercontrol in http_headers.h, use them in a new - field. Only Pass is there for now. - - Use the http-workspace for building headers instead of sbuf. - - Move uiovec handling to cache_pool.c where it more naturally belongs - and so we can use it on both backends and sessions. - - Add http header munging functiosn for copying, printf'ing, filtering and - writing headers. - -2006-07-21 07:18 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Rename shmlog tags for headers to RxHeader and TxHeader that's more - logical. - - Rename http_Init() to http_Setup() to avoid clash with HTTP_Init(). - - Remove unused variable - -2006-07-20 22:08 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Yet another refinement to the way we store and deal with HTTP headers. - - Record a triplet of {start, data, end} for all HTTP data items. - - This represents a regrettable uglification of the sourcecode, but - most of it compiles out to constants and the runtime benefits will - be worth it. - - Generate H_FOO magic strings for all the headers we know about. - These strings have a length as first char and always ends in ':'. - - Also genereate H_FOO format strings in VCL compiler. - - Mandate (with assert) that header references happen using H_FOO strings. - - Make number of allowed HTTP headers a compile time constant (32) - but make the workspace a run-time variable (4096). - - Introduce new SHM tag for dumping aborted HTTP protocol requests. - -2006-07-20 15:10 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Add XXX comment - -2006-07-20 14:46 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/include/stat_field.h: - - Keep an eye on deathrow - -2006-07-20 14:40 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - More asserts - -2006-07-20 14:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - We need to check the TTL here also, if a (sequence of) slow client(s) - manages to hold the document referenced, the prefetcher may never - get lucky with it and it will linger here much past last sell date. - -2006-07-20 13:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Only reference srcaddr on first request on session - -2006-07-20 13:39 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Be more paranoid about srcaddr - -2006-07-20 13:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - upd - -2006-07-20 13:29 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/include/stat_field.h: - - Keep track of active source addresses - -2006-07-20 12:03 phk - - * trunk/varnish-cache/bin/varnishtop/varnishtop.c: - - Add -1 option that stops comparison after first field. - - Useful with commands like: - - varnishtop -i header -1 - varnishtop -i srcaddr -1 - - where the variable part of the entry is less relevant. - -2006-07-20 10:10 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Show also average since start - -2006-07-20 09:58 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Hmm, that was a bad idea. - -2006-07-20 09:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Loop till we have everything. - -2006-07-20 09:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Implement "If-Modified-Since" conditional queries - -2006-07-20 08:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Remove explicit worker thread arguments. - -2006-07-20 08:25 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Move the delivery functions from acceptor to response - -2006-07-19 21:16 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/stat_field.h: - - Rework the worker thread pool logic slightly, we were leaking - threads before. - -2006-07-19 21:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/include/stats.h: - - Include a "start_time" timestamp in the stats and teach varnishstats - to print it in curses mode. - - Some polishing and cleanup. - -2006-07-19 20:07 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Use insert_pass in vcl_fetch() so we cache the uncacheability. - -2006-07-19 20:06 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Don't explode on trim's to zero size. - - Real fix should (maybe) be to callers - -2006-07-19 19:49 phk - - * trunk/varnish-cache/bin/varnishtop/varnishtop.c: - - Update only once per second. - -2006-07-19 19:48 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Make sure width and precision arguments to printf %*.*s are ints. - -2006-07-19 19:47 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Don't panic on NULL srcaddr, but revisit later when we know the - details. Is it the Prefetcher ? - -2006-07-19 19:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Delete the right list item. - -2006-07-19 19:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Don't bother determining if we should close if we already have done so. - Also: we may not have valid headers if cache_http.c threw a 400. - -2006-07-19 19:43 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Make sure hp->v is NUL terminated. - -2006-07-19 12:37 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Use miniobj.h to catch pointer trouble - -2006-07-19 12:36 phk - - * trunk/varnish-cache/include/miniobj.h: - - Add miniobj.h for debugging - -2006-07-19 11:53 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Avoid the Error path for now. - -2006-07-19 11:11 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - handle 302 for now. - -2006-07-19 08:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Properly zero the worker structure when we start a thread. - -2006-07-18 13:47 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - eliminate debugging - -2006-07-18 13:19 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Delete binheap root by it's index. - - Expect a refcount of one (the one holding the object in the hash) - -2006-07-18 13:18 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Fix the Parent calculation - -2006-07-18 12:46 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Set the index of deleted elements to zero - -2006-07-18 12:40 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Move the root index from zero to one - -2006-07-18 12:29 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Remove the deref/unbusy stuff from FetchBody() it's done in central.c - -2006-07-18 12:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - Assert that object is busy when we call unbusy - -2006-07-18 12:27 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Use a void * for http_Read()'s buffer - -2006-07-18 10:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Braino this time. - -2006-07-18 10:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - typo - -2006-07-18 10:45 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Add http_Read() which reads from a socket but soaks up any prefeched - tail first and use it all the places where this logic was explicit - before. - - Fix Refcounting on objects when we insert/deliver - -2006-07-18 10:32 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Use bigger buffersizes for pass mode - - Terminate the sbuf with the reply headers properly. - -2006-07-18 09:02 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c: - - Retire the http_GetReq(), http_GetURL() and http_GetProto() accessor - functions now that struct http is out of the closet. - -2006-07-18 08:52 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - polish - -2006-07-18 08:51 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - zero means 'all' to http_GetTail() - -2006-07-14 13:54 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - use space to separate host and port in -b - -2006-07-14 13:52 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Use space to separate host and port in backend spec. - - Polish usage message a bit. - -2006-07-14 13:33 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/steps.h: - - When during a lookup we encounter a busy object, queue the session on - the objects waitinglist and disembark the worker thread so it can do - something sensible in the mean time. - - This feature is unimportant in normal operation, but crucial to - resource management if a popular URL suddenly takes a long time to - reply from the backend. - - Without this bit if semi-nasty code, we would tie up one worker - thread per client while waiting for the backend to come to it's - senses. - -2006-07-14 12:47 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c: - - Have the acceptor launch the session into STP_RECV - -2006-07-14 12:45 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Use the fact that we have the worker thread in struct sess now. - - Move initial and final processing into cnt_recv() and cnt_done() - -2006-07-14 12:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Have the states tell us if we are done yet with their return value, - so that we can implement disembarking the worker thread of the object - is busy. - -2006-07-14 12:22 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/include/shmlog.h: - - Put a starttime in shmem so varnishstat can show average rates. - -2006-07-14 12:12 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Flexelint'ing, found a spurious ';' - -2006-07-14 12:05 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/include/shmlog.h: - - More SHM creation polishing - -2006-07-14 11:44 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Better and more paranoid SHMEM creation logic - -2006-07-14 11:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - propset Id - -2006-07-14 11:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h: - - Change "client" to "srcaddr", it's more descriptive. - - Add srcaddr management and start charging bytes to the srcaddr. - -2006-07-14 10:34 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Rework the way we do ascii representations of addresses - -2006-07-14 10:16 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - Move session management to new file (cache_session, SES prefix) in - preparation of adding client tracking. - - Move the iovec's from the session to the worker and give the session - a pointer to the worker so we can avoid passing it around as argument. - -2006-07-12 23:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/flint.sh, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - More Flexelinting - -2006-07-12 22:52 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/mgt_child.c: - - More flexelinting. - - No bugs so far. - -2006-07-12 22:07 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Flexelint harder. - -2006-07-12 22:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Give this file a flexelinting - -2006-07-12 22:01 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - Improve the INCOMPL() macro. - -2006-07-12 20:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - More polishing. - -2006-07-12 19:28 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Move sessmtx to cache_vcl.c and call it vcl_mtx. - - Clean up naming for consistency while here. - -2006-07-12 15:07 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h: - - Implement "insert_pass" mode where we cache that an entity must be passed. - -2006-07-12 14:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Make Pass possible from vcl_hit() - -2006-07-12 13:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/steps.h, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Enable Id keyword - -2006-07-12 13:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - First stab at implementing pass in vcl_miss() - -2006-07-12 13:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - Add explanation for locking, some minor polishing. - -2006-07-12 12:04 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h: - - Hash on both URL and Host header. If no host header, hash on URL twice. - -2006-07-12 11:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Make Pass work again - -2006-07-12 11:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Make pipe work again - -2006-07-12 08:56 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Fix CLI "config.load" - -2006-07-12 08:44 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Always insert a backend when vcl is compiled. - - Respect '#' comments in script file. - -2006-07-12 08:34 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Teach the VCL compiler about default functions, so that users will - not have to copy&paste the default methods if they have no special - requirements for a particular method. - - No such facility exists for backends, so a backend description is - now the minumum VCL program. - - When we initialize the VCL compiler we hand it a piece of source code - with the "default code", this must include definitions of all methods - named with a "default_" prefix (ie: "default_vcl_recv" etc). - - During compilation we always compile this piece of source code in (after - the user supplied VCL source). - - If the user did not provide a particular method, the default method is - used instead. The user can also call the default method directly, - for instance by: - - sub vcl_recv { - if (req.http.Expect) { - error; - } - call default_vcl_recv; - } - - Later on, this could be expanded to allow other subroutines to be - included in the default VCL for the users calling convenience. - -2006-07-12 07:45 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Pause after 'vcl' command - -2006-07-11 21:35 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - EOF detection in libevent is buggy ?? Add exit cmd. - - Pause after cli until we see "OK" - -2006-07-11 21:30 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - add a req command, various adjustments - -2006-07-11 21:04 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Add Pause() and Resume() to pace script execution - -2006-07-11 21:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - Add a printf when cached is ready for the benefit of varnishtester - -2006-07-11 20:49 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - open and close commands - -2006-07-11 20:37 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - A vcl keyword for loading a new config - -2006-07-11 19:29 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Add "cli" to tell varnishd things - -2006-07-11 19:16 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - If the first char of the serve string is '!', close connection after - sending string. - -2006-07-11 19:10 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Add a server facility to act as backend for varnish - -2006-07-11 18:21 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Minimal ability to start and stop a varnishd - -2006-07-11 18:16 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Give 'exit' CLI command some bite. we may want to be more careful - later on. - -2006-07-11 17:53 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Unbuffer stdout/stderr - -2006-07-11 17:23 phk - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishtester, - trunk/varnish-cache/bin/varnishtester/Makefile.am, - trunk/varnish-cache/bin/varnishtester/varnishtester.c, - trunk/varnish-cache/configure.ac: - - Add stub varnishtester program - -2006-07-11 16:31 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Start the cache process automatically, I've gotten tired of typing - "start" :-) - -2006-07-11 16:25 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Allow backend to be specified as "host:port" to -b - -2006-07-11 16:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - add short descriptive comments to each state - -2006-07-11 16:10 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Distribute code from FetchSession almost correctly - -2006-07-11 16:03 phk - - * trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add "insert_pass" action in VCL - -2006-07-11 15:54 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Make things work again by stuffing the old functions into the new - state engine. - -2006-07-11 15:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - This commit breaks warnish temporarily: - - Insert the new master state engine. - - A dot(1) graph is embedded in the source code and can be extracted - with: - - sed -n '/^DOT/s///p' cache_center.c | dot -Tps > /tmp/_.ps - -2006-07-11 13:31 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/steps.h: - - Add enum for major procesing steps - -2006-07-11 12:31 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Start centralizing the flow of requests through varnish so we get - one source file with the highest level of policy. - -2006-07-11 12:30 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Make -b and -c less nonsensical when not specified - -2006-07-11 12:00 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Pipe requests which come with an Expect header. - - XXX: document that - error 417 "expectation failed" - might be a more sensible policy. - -2006-07-11 11:41 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.1: - - Document -b and -c, and bump date. - -2006-07-11 11:36 phk - - * trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Add -b[ackend] and -c[lient] generic options to logtailers - -2006-07-11 07:38 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add 500 messages. - -2006-07-11 07:30 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/stat_field.h: - - Split http_Dissect() into http_DissectRequest() and http_DissectResponse() - -2006-07-11 06:30 des - - * trunk/varnish-cache/bin/varnishd/varnishd.1: - - Add cross-references and a commented-out STANDARDS section. - -2006-07-11 06:28 des - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add a note to update varnishlog(1) whenever this list changes. - -2006-07-11 06:27 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.1: - - Add cross-references. - -2006-07-11 06:26 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.1: - - Document the -C, -I, -X, -i, -x options. - Add a list of log entry tags. - Add cross-references to varnishd(1) and varnishstat(1). - -2006-07-10 21:54 phk - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishtop, - trunk/varnish-cache/bin/varnishtop/Makefile.am, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/configure.ac: - - Add varnishtop log-tailer. - - - Try these: - - varnishtop -i url - - varhishtop -i header -C -I '^user-agent:' - - varhishtop -i header -C -I '^user-agent:' -X MSIE - - varhishtop -i header -C -I '^user-agent:.*MSIE' - - varhishtop -i header -C -I '^user-agent:.*java' - - You can also run them on the logfiles from the live test: - - zcat _vlog21.gz | varnishtop -r - -i header ... - - - -2006-07-10 21:49 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Fix so that both -I and -X can be specified - -2006-07-10 20:49 phk - - * trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Implement -C, -I and -X generic options - -2006-07-10 20:27 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Add tag names array to libvarnishapi, everybody is going to need it. - - Implement -i tag[,tag ...] and -x tag[,tag ...] generic arguments. - -2006-07-10 19:54 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Improve libvarnishapi interface to shared memory: - - Add function VSL_OpenStats() which directly returns a pointer - to the varnish_stats structure. - - Add opaque VSL_data structure as handle to the log-tailer functions. - - Add generic argument parsing function for all log-tailers. - - Add support for generic "-r " option. - -2006-07-10 15:02 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/stat_field.h: - - More statistics about worker threads. - -2006-07-10 14:52 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h: - - Rewrite the worker thread pool code. - - Assign prefix WRK to the worker pool. - - Introduce a struct workreq since the prefetcher (when it happens) will - not have a session to pass in. - - The worker threads get a cond_var each and are hung from a list in - most recently used order. - - When a request is queued and the worker thread list is not empty, - tickle the cond_var of the first one. - - If no threads were availble the max number of threads is not reached, - try to start another worker thread. - - If the max was reached or the start filed (likely due to out of memory) - indicate overflow and let the existing pool deal with it. - - Create only the minimum requested number of threads initially. - - Allow specification of the timeout before a dynamic worker thread commits - suicide to be specified with -w. - - Default parameters are -w1,UINT_MAX,10 {min, max, timeout} - -2006-07-10 13:59 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - use explicit eventbase. - -2006-07-10 13:58 phk - - * trunk/varnish-cache/contrib/libevent/event.c: - - Don't ever set current_base in our version of libevent in order to flush - out any bugs it might cause. - -2006-07-10 13:48 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Dump errno and strerror in assert - -2006-07-10 12:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Rework the "connect to backend logic". - - Avoid calling getaddrinfo() for every connect by catching the result - in the backend structure. - - Minimize number of socket/connect calls by caching the last good - address in the backend structure. - - If all addresses in the cached getaddrinfo() result fails, call - getaddrinfo() again (to catch DNS changes) and try the list again. - -2006-07-10 11:24 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Move sockaddr->ascii conversion to tcp.c - - shmlog both ends of backend connections. - -2006-07-10 10:56 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.h, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/shmlog.c: - - Be more consistent. - - cache_shmlog.c contains stuff for both cache and mgt, so remove the - cache_ prefix. - - Rename cache_shmlog.h to common.h and put joint stuff there. - -2006-07-10 10:31 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - put backend session linkage in shmemlog for pipe and pass - -2006-07-10 10:06 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Polish HTTP reception a little bit - -2006-07-10 10:05 phk - - * trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Drop the max length of first line, it's too expensive to enforce. - -2006-07-10 09:52 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Fix cosmetic warning - -2006-07-10 09:51 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Silence cosmetic warning. - -2006-07-10 09:48 phk - - * trunk/varnish-cache/lib/libvarnish/time.c, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Fix cosmetic warnings - -2006-07-10 09:47 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.h, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Fix a bunch warnings, all cosmetic. - - I'm using __unused for now, if we need to use something different - we can do a find/replace. - -2006-07-10 09:28 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Silence some warnings - -2006-07-10 09:07 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/include/stat_field.h: - - Allocate struct http as part of the session allocation. - - Remove http_New() and http_Delete() - -2006-07-10 08:41 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add heritage.mem_http_headers which is the maximum number of headers - we recognize. - - Add http_Init() which initializes struct http given sufficient space. - - Respect heritage mem_* values in http_New() (while we still have it) - - Allocate backend connections (vbe_conn) with super allocation with - space for http and workspace. - -2006-07-10 08:10 phk - - * trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Put three memory allocation hints into heritage: - - mem_http_1_line (512) - Maximum length of the reqeust/response line of a HTTP message - There is no point in filling the entire buffer with junk if - we get a preposterously long first line. - mem_http_header (4096) - Maximum length of entire HTTP header. If we overflow this - we return 400. - mem_workspace (currently 0) - In the future this will be the space we use for constructing - headers to send and edits done from VCL. - -2006-07-10 07:54 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Take the vbe_conn (backend connection) structure out of the closet. - -2006-07-10 07:07 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Turn a comment into english - -2006-07-10 07:04 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - More sensible order of pointers - -2006-07-09 21:21 phk - - * trunk/varnish-cache/include/http_headers.h: - - Don't pass cache-control through. - -2006-07-09 21:01 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Add a -h opt which modifies -o to remove "trivial" entries. - - Trivial are - {GET,HEAD} which gets a hit and returns 200 - {GET,HEAD} which gets a miss, fetches, inserts and returns 200 - -2006-07-09 09:16 des - - * trunk/varnish-cache/configure.ac: - - Don't use braces where they aren't needed. - Let automake know about config.h. - Bump version number to mark that we have passed the first live test. - -2006-07-09 07:13 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/lib/libvcl/Makefile.am: - - List header files so they are included in the distribution tarball. - -2006-07-09 06:35 des - - * trunk/varnish-cache/configure.ac: - - Use the modern version of AM_INIT_AUTOMAKE, allowing automake to deduce the - correct distribution name. - -2006-07-08 20:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - A few edits for FlexeLint - -2006-07-08 20:19 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Sanitize #includes a bit in the cache process by moving fundamental - #includes to cache.h - -2006-07-08 20:18 phk - - * trunk/varnish-cache/bin/varnishd/flint.lnt: - - Silence a bogus warning - -2006-07-08 19:54 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Move struct http into cache.h - - The original reasoning for having it private to cache_http.c was - to avoid pollution with event.h related structures but since that - pollution is happening other ways anyway, the cost is too high. - - Include pthread.h, sys/time.h, and event.h from cache.h - -2006-07-08 19:46 des - - * trunk/varnish-cache/configure.ac: - - Add --enable-debugging-symbols which enables debugging sysmbols and - disables - inlining and builtins. - -2006-07-08 19:27 des - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Fix "set backend.port". - -2006-07-08 19:25 des - - * trunk/varnish-cache/autogen.des: - - My version. - -2006-07-08 19:25 des - - * trunk/varnish-cache/autogen.phk: - - Expand keywords. - -2006-07-07 08:40 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Close gracefully in pipe mode - -2006-07-07 07:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Set SO_LINGER to zero - -2006-07-07 07:25 phk - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Tell why bind(2) fails - -2006-07-07 07:22 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Pipe anything different from HEAD & GET - -2006-07-07 07:22 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Don't filter headers in Pipe mode - -2006-07-07 07:22 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Fix pipe mode - -2006-07-07 07:22 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Remove debugging printf - -2006-07-07 07:15 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Time idle TCP connections out after 30 seconds - -2006-07-07 06:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Dump our buffer as Debug if we have HTTP header trouble. - - Issue 400 for HTTP header buffer overflow. - -2006-07-07 06:27 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Strvis(3) debug data. - -2006-07-06 22:33 phk - - * trunk/varnish-cache/include/http_headers.h: - - Filter out Content-Range headers. - -2006-07-06 21:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Always log the numeric code as "Status" - -2006-07-06 21:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Log the found objects XID when we have a hash-hit. - -2006-07-06 21:56 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add shmem tag for Hits - -2006-07-06 21:47 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Refuse all requests without a protocol field with a 400 - - Implement a function to say "400" with. - -2006-07-06 21:04 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add cache_response for yelling at clients - -2006-07-06 21:03 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Also flush ordered after the long timeout. - -2006-07-06 21:00 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Strengthen HTTP parsing - -2006-07-06 20:29 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Make sure the grim reaper doesn't touch busy objects either. - -2006-07-06 20:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - The grim reaper needs to wait for objects refcount to drop to zero. - -2006-07-06 20:23 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Improvements to flush things at timeout and at the end etc. - -2006-07-06 13:40 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Silence typical broken client connection messages and move the - interesting ones to shmem - -2006-07-06 13:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Fix braino in Pass handling - -2006-07-06 13:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Skip space before request/response - -2006-07-06 13:02 des - - * trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.1: - - Add a rudimentary man page. - -2006-07-06 11:18 phk - - * trunk/varnish-cache/autogen.phk: - - My version. - -2006-07-06 10:18 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Add exponential hitrate displays (with -c) - -2006-07-06 09:31 des - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.1: - - Add a rudimentary man page. - -2006-07-06 09:31 des - - * trunk/varnish-cache/bin/varnishd/varnishd.1: - - Expand keywords - -2006-07-06 09:13 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/varnishd.1: - - Add a rudimentary man page. - -2006-07-06 09:08 phk - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Only complain if accept_filters fail - -2006-07-06 09:06 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Remove debugging code. - -2006-07-06 09:00 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Add -r file and -w file options. - - These read/write from/to a binary file. - -2006-07-06 08:45 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Increas shmem size to 8M - -2006-07-06 08:45 phk - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Add accept filters - -2006-07-06 08:43 des - - * trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Portability: don't use non-portable mmap(2) flags. - -2006-07-06 08:43 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Portability: Linux does not have SO_NOSIGPIPE. - -2006-07-06 08:41 des - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/lib/libvarnish/argv.c: - - Portability: cast unused parameters to void instead of marking them - __unused. - -2006-07-06 08:32 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - 404 handling - -2006-07-06 08:07 des - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Use instead of to get both the prototype for - ioctl(2) and the definition of FIONREAD. - -2006-07-05 14:40 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Fix off by one - -2006-07-05 14:40 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - printf format - -2006-07-05 13:54 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Calculate rate as signed. - -2006-07-05 13:44 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Assert non-null first - -2006-07-05 13:19 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Send "Connection: close" if not HTTP/1.1 - -2006-07-05 13:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/include/stat_field.h: - - Add more stats - -2006-07-05 13:09 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Some asserts to guard against trouble. - -2006-07-05 12:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Another pipeline fix: don't clobber a pipelined partial header - -2006-07-05 11:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Don't lead http header - -2006-07-05 11:09 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Free the session memory correctly - -2006-07-05 10:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - Free the right header. - -2006-07-05 10:55 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - Don't leak objects headers - -2006-07-05 10:01 phk - - * trunk/varnish-cache/include/http_headers.h: - - Suppress Accept-Ranges for now. - -2006-07-05 09:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Create an X-Varnish header and put the XID there. - -2006-07-05 09:56 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Send headers with sendfile - -2006-07-05 09:44 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Add Age and Via header to responses. - - Change arguments to vca_write_obj() (It should really be - "send_repsonse()" ?) - Store received age and time entered into cache in object. - Generate Age: and Via: headers as part of response. - -2006-07-05 09:32 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Unify logging in the response handling - -2006-07-05 09:11 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - log responsecode and length - -2006-07-05 09:10 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Log reponse code and object length - -2006-07-05 09:08 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add Length tag - -2006-07-05 08:08 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Show also rate in curses display - -2006-07-05 07:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Be more conservative about wraparound and take them up front in all cases. - -2006-07-04 22:08 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Implement our TTL calculation. - - A first quick check against the weird timestamps from the VG frontend - squids indicates sensible behaviour. - -2006-07-04 21:34 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Long comment describing how TTL calculation will be done. - - Review encouraged. - -2006-07-04 20:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Fix HEAD requests: - - Make modes to http_BuildSbuf descriptive enums. - Send GET to backend also for HEAD requests. - Don't return body for HEAD requests. - -2006-07-04 19:36 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Fix pipelining. - - A braino in http_Dissect() resulted in an off-by-one error - (protected with assert now) - - Move any remaning bytes in buffer to front and check for - a complete header before arming the eventloop on the - session. - -2006-07-04 14:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Make room for protective terminating NUL - -2006-07-04 14:19 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - retry backend open, log diagnostics - -2006-07-04 14:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - load VCL earlier - -2006-07-04 14:18 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Lock with a mutex - -2006-07-04 13:45 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Shorter sleeps: 1s -> 50msec - -2006-07-04 13:44 phk - - * trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Fix off by one error during wraparound. - -2006-07-04 09:28 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Close non HTTP/1.1 request connections - -2006-07-04 09:21 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Add missing '%' - -2006-07-03 19:45 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - My workaround for the missing OFF_T_MAX definition was not safe, - use a hardcoded "1<<30" which is. - -2006-07-03 19:35 phk - - * trunk/varnish-cache/contrib/libevent/event.c: - - I have grumbled about the evilness of "current_base" before, and this just - proves the point: If two threads call event_init() at the same time, - they will both stomp on the same memory via current_base, and in all - likelyhood, neither of them will manage to get the job done properly. - - Instead work on a local variable and don't assign to current_base - until the setup is complete. - - This should be submitted to Niels Provos - -2006-07-03 18:35 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Handle IPv6 address -> string conversion too - -2006-07-03 18:03 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Close race condition - -2006-07-03 17:59 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Better arg checking - -2006-07-03 15:01 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - more asserts - -2006-07-03 14:39 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - avoid const poison - -2006-07-03 14:39 phk - - * trunk/varnish-cache/bin/varnishd/cache_ban.c: - - Include pthread.h - -2006-07-03 14:37 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - s/unsigned/size_t/ - -2006-07-03 14:36 phk - - * trunk/varnish-cache/bin/varnishd/hash_simple_list.c: - - s/init/start/ - -2006-07-03 12:41 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add another hash-method with better real-world survival chances: A classic - bucketed hash table of lists. Hash is MD5. Number of buckets and number - of mutexes can be configured at command line. - -2006-07-03 08:30 des - - * trunk/varnish-cache/configure.ac: - - Replace --enable-wall and --enable-pedantic with - --enable-developer-warnings, - which is roughly equivalent to FreeBSD's WARNS level 5 or 6. - -2006-07-01 05:44 phk - - * trunk/varnish-cache/include/http_headers.h: - - Mark more headers as not end-to-end - -2006-06-30 20:22 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Forgot to add shmlog.c (reminded by des@) - -2006-06-30 20:21 phk - - * trunk/varnish-cache/include/queue.h: - - Add TAILQ_FOREACH_SAFE() - -2006-06-30 20:17 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - move all policy to rfc2616.c - -2006-06-30 13:44 des - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/include/stats.h: - - Consistently use our own copy of queue.h. - -2006-06-30 11:20 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Fix object length double accounting in chunked fetch - -2006-06-30 09:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Delete compiled VCL file after we tried to load it. - -2006-06-29 19:19 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Log objects banned to shmlog - -2006-06-29 19:06 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Track objects heap-position - -2006-06-29 17:09 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_main.c: - - Add the ability to instantly ban/purge all cached objects matching - a given regexp. - -2006-06-29 15:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Improve shm-logging of VCL activity - -2006-06-29 14:37 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Tag objects with their origin session xid and log it when we clean up. - -2006-06-29 13:04 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Add a unique transaction-ID to each request, and register it in the - shmlog so we can match backend transactions with client transactions. - -2006-06-28 21:38 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Convince flexelint that we know what we do with some asserts - -2006-06-28 21:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Put a mutex around the shmlog writes, I've seen my first race. - -2006-06-28 21:18 phk - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Add a -o argument which sorts the log into transactions before output, - this is a fair bit easier to chew through than the raw log (the default) - -2006-06-28 21:03 phk - - * trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Use shmlog api from libvarnishapi - -2006-06-28 20:58 phk - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Use SHMLOG api in libvarnishapi - -2006-06-28 20:58 phk - - * trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am: - - Add SHMLOG opening and walking functions to libvarnishapi - -2006-06-28 17:46 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Be more consistent about which headers we send back. - - Start 5 threads in the worker pool. - -2006-06-28 16:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Construct our own Content-length header, no matter which of the - three (straight, chunked, eof) modes we used to fetch the object. - -2006-06-28 16:58 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Don't finish the sbuf in mode 3 - -2006-06-28 16:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Assert that the lengths of the storage for the object add up. - -2006-06-28 16:57 phk - - * trunk/varnish-cache/include/http_headers.h: - - Don't pass Content-Lenght through, we build it ourselves - -2006-06-28 16:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Pass fd to shmemlog - -2006-06-28 16:19 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - add tag for generated headers - -2006-06-28 16:19 phk - - * trunk/varnish-cache/include/http_headers.h: - - Don't pass If-* headers to backend - -2006-06-28 16:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c: - - Apply correct fd in Shmemlog - -2006-06-28 16:04 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Fix buglets, include test-driver. - -2006-06-28 11:29 phk - - * trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Give varnishstat a "-c" option to use curses to continously refresh - -2006-06-28 11:21 phk - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishstat, - trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/configure.ac: - - Add varnishstat program - -2006-06-28 10:31 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - 304's don't have a body - -2006-06-28 10:30 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Implement ->trim() - -2006-06-28 09:39 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/stat_field.h: - - More stats counters - -2006-06-28 09:21 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/stat_field.h, - trunk/varnish-cache/include/stats.h: - - Add statistics counter support. - - stat_field.h defines the counter fields with name, type, (printf)format - and description. - - stats.h defines a structure with these fields. - - shmlog.h makes the structure part of the shared memory logs header. - - Implent the "stats" CLI word in the management process. - -2006-06-26 19:25 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Call VCL to decide discard/prefetch for near-expiry objects. - - Put discard objects on deathrow where they will be culled from - in sequence. - - (prefetch not implemented yet) - -2006-06-26 19:24 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - A temporary hack to deal with very old Date: headers until we figure - out what's going on. - -2006-06-26 19:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Implement HTTP/1.0 style fetching. - -2006-06-26 17:06 phk - - * trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Another little tweak - -2006-06-26 16:31 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Dump numeric handling also, until we figure out trouble. - -2006-06-26 16:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - typo - -2006-06-26 16:19 phk - - * trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Make this work again: record the stevedore in the storage object. - -2006-06-26 14:33 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c: - - Start releasing objects when they expire - -2006-06-26 14:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c: - - Move a bit more responsibility into the hash-slinger to get a cleaner - interface. - -2006-06-26 08:58 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c: - - Now that we approach the time where objects have to be destroyed again, - we need to move the data structures into the right shape. - - Push hashing into cache_hash.c - - Add objhead structure to hold the various hits for "Vary:" headers. - -2006-06-24 22:11 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - A little bit more work on the expiry/prefetch thing. - -2006-06-24 21:54 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Use ttl=0 as a "invalid TTL" flag. - - Mark objects with ttl=0 uncachable. - - Add cacheable objects to the expiry heap - - Start an expiry thread which polls the root element once per second - -2006-06-24 21:42 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Truncate TTLs in the past to now. - -2006-06-24 21:09 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - Autogenerate prototypes for method calling functions - -2006-06-24 21:07 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add a "timeout" method to VCL, it can return "fetch" or "discard". - -2006-06-24 20:50 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add a token type "METHOD", we use it for reference counting. - - Add a reference to the first backend {} we encounter, it is the default. - Add a reference to all backends assigned explicitly. - Add a reference to all methods. - - Enable reference check, complain if: backend, function or acl is defined - but not used, or used but not defined. - -2006-06-24 20:12 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Collapse multiline Fc and Fh calls where they fit - -2006-06-24 20:09 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - More printf sanitation: Create to convenience functions for output to the - fh and fc sbufs. - -2006-06-24 19:50 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Cave in and use printf format extensions for printing tokens. - Both Linux and FreeBSD supports them anyway. - -2006-06-24 19:41 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add more shmemlog tags: - one for each VCL method to record the return - one for errors - one for linking a client session to a backend connection - Use them sensibly. - Put VCL name of backend into struct backend to improve log messages - -2006-06-22 16:17 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Improve the VCL compiler in various ways: - - Generate the methods and their legal returns with the tcl script. - - Add consistency checks to make sure methods don't use illegal returns, - and also check called subrourtines. - - Add consistency check to complain about recursive subroutine calls. - - Add consistency check to complain about unused or undefined subroutines. - -2006-06-21 10:28 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_main.c: - - Add (empty) source file for expiry/pretech code - -2006-06-21 10:21 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Start to respect TTL - -2006-06-21 10:13 phk - - * trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add "-t default_ttl" option. 120 seconds by default. - -2006-06-21 09:58 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Quench some debugging - -2006-06-21 08:09 phk - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/binary_heap.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add a binary heap implementation for keeping track of objects expiry time. - -2006-06-20 19:49 phk - - * trunk/varnish-cache/include/vrt.h: - - typo - -2006-06-20 19:38 phk - - * trunk/varnish-cache/lib/libvcl/flint.lnt, - trunk/varnish-cache/lib/libvcl/flint.sh: - - FlexeLint files - -2006-06-20 19:37 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - FlexeLint cleanups - -2006-06-20 19:31 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Polish things to silence FlexeLint a bit - -2006-06-20 11:39 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl: - - Rename vcl_lang.h to vcl.h and include practically nowhere. - - Remove #include bogohandling in vcl_gen_fixed_token.tcl - -2006-06-20 10:31 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - At the expense of some complexity and a small runtime overhead, - isolate the compiled code from the internal structures of the cache - process through of VRT functions. - -2006-06-20 09:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Work towards making struct sess opaque to the generated code. - -2006-06-20 09:28 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Rename the VCL compilers public functions to VCC prefix - -2006-06-20 09:25 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Get rid of VCL_FARGS and VCL_PASS_ARGS macros. - - Generate VGC prefixes instead of VCL. - -2006-06-20 09:15 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl: - - Start putting some structure in the sources relating to VCL handling: - - Split the runtime support for compiled varnish programs out and give it the - prefix "VRT". - - Start using the prefix "VGC" for generated code. - - Prefix "VCC" will be for the compiler and "VCL" for calling the - compiled and - loaded functions. - -2006-06-18 10:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Output line+pos for counts. - -2006-06-18 10:19 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Insert a count-point after each conditional. - -2006-06-18 10:16 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Get the sense of string compares right. - -2006-06-18 10:12 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - debug printf for max-age - -2006-06-18 10:10 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Implement req.request properly - -2006-06-18 10:04 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Pass if we spot an Authenticate or Cookie header - -2006-06-18 10:03 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Add VCL function for getting HTTP header - -2006-06-18 10:02 phk - - * trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add support for investigating random HTTP headers. - -2006-06-18 09:16 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Add wrappers around VCL methos so logging and checking of returned handling - can be centralized. - - Remove old handling callbacks. - - Call hit/miss methods instead of lookup method. - -2006-06-18 09:14 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - add explicit "lookup" to recv method - -2006-06-18 09:11 phk - - * trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Correctly handle \ sequences in .h files in vcl_gen_fixed_token.tcl - - Make handling a named enum, and use it as a bitmap. - - Add "lookup" reserved word - - Add VCL_done() macro to use in compiled code to set handling and drop - the per-handling callbacks (apart from VCL_error()) - -2006-06-18 07:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add "deliver" keyword to VCL compiler. - - Split vcl_lookup() in vcl_hit() and vcl_miss() - -2006-06-16 10:22 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Initial http_GetHdrField() function. - - Improve chunked encoding, allocate big storage chunks and trim the - last one at the end, instead of one storage chunk for each chunk - the remote server sends. - - Call RFC2616 policy code. - - Store headers from backend in cache and return to client. - -2006-06-16 10:20 phk - - * trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add header field to object - -2006-06-16 10:19 phk - - * trunk/varnish-cache/include/http_headers.h: - - Supress Transfer-Encoding - -2006-06-16 10:18 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - The beginnings of rfc2616 policy implemenation. - -2006-06-16 10:17 phk - - * trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Add trim method to storage backends so chunked encoding can be - stored efficiently. - -2006-06-16 10:16 phk - - * trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/time.c: - - Add time parse/format functions to libvarnish - -2006-06-15 08:04 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - less noise - -2006-06-15 08:04 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - Less noise - -2006-06-14 09:57 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - start examining HTTP status codes from backend - -2006-06-14 09:39 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Add vca_write_obj() which writes an sbuf (as) HTTP header and the - object from the sessions to the client. - -2006-06-14 09:25 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Clean up session messages a bit - -2006-06-14 09:23 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add HttpError tag - -2006-06-14 09:03 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Sanitize close/recycle session logic a bit. - -2006-06-14 08:53 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_main.c: - - Initialize the cache_acceptor.c/VCA in the same manner as other parts. - -2006-06-14 07:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Give storage backends a "send" method. - - Let storage_file use sendfile(2) for it. - -2006-06-14 06:58 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Complete the storage_file method. - -2006-06-13 20:09 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Default to "file" stevedore from now on. - -2006-06-13 20:06 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Be more aggressive about mmap'ing memory. The size_t thing is a bogus - constraint in FreeBSD and we shouldn't really listen to it. - - On my laptop I can mmap 2422MB file this way. - - This may be so aggressive that it leaves insufficient address space for - malloc/threadstacks and other issues. - - If we find a way to pick up a platform/architecture specific limit, we - can enforce that along the way. - - For now people can just specify a saner and smaller "-sfile" size. - -2006-06-13 13:47 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - mmap as much as the file as we are able to when the cache process opens - the stevedore. - - This should probably be (fine-)tuned later on as it might be too aggressive - when faced with user errors. - - Also, might it be possible to mmap() more than MAX_SIZE_T bytes if - it is done in multiple calls ? - -2006-06-13 13:14 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Calculate the size of the backing store file. - - A size can be specified in absolute terms (suffix: k, m, g, t supported), - but also as a percentage of the filesystems free space (suffix '%'). - - If the specified size is larger than an off_t can cope, we bisect - repeatedly until it can. - - If the size exceeds the available space of the filesystem, we truncate - to 80% of the free space. - - Then round down to an integral number of blocks, sized by the larger - of the filesystem blocksize and the pagesize. - - This was tricker than I'd expected... - -2006-06-13 13:10 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Clone the stevedore before calling its init function and be more precise - about any optional arguments. - -2006-06-13 08:05 phk - - * trunk/varnish-cache/bin/varnishd/_stevedore.h, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/stevedore.h: - - After having a strong cup of tea: don't name files with leading underscore - even though that's how FreeBSD's kernel does it. In my private world - a leading underscore means "junk file, remove at your pleasure". - -2006-06-13 08:02 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Clone the malloc stevedore to the file stevedore - -2006-06-13 07:59 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Remember to tell getopt about -s - -2006-06-13 07:57 phk - - * trunk/varnish-cache/bin/varnishd/_stevedore.h, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Put more meat on the stevedore (storage backend) interface: - - Pull the struct definition into _stevedore.h and include this from - cache.h and mgt.h, they both need to be able to see it. - - Add the stevedore pointer as an argument to the stevedore alloc function - so multiple stevedores is possible later on. - - Add the stevedore pointer to the storage object, so freeing it again is - possible. - - Add -s argument processing to select a given stevedore, call it's ->init - method and pass the stevedore in the heritage. - - In the cache process pick stevedore out from heritage, call its open - method. - -2006-06-13 07:26 phk - - * trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Use NULL init method - -2006-06-13 07:25 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - Allow for NULL init methods for hash and stevedore - -2006-05-01 12:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Use vca_write/vca_flush - -2006-05-01 12:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Use vca_write/vca_flush - -2006-05-01 12:51 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Use vca_write/vca_flush - -2006-05-01 12:45 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Add vca_write() and vca_flush(), two functions which will attempt to - use writev() if possible. - - vca_flush() must be called before any memory previosly given to - vca_write is overwritten, and after the last call to vca_write() - -2006-05-01 12:28 phk - - * trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/flint.sh: - - Add FlexeLint files - -2006-05-01 12:27 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - bandaid for name-clash - -2006-05-01 12:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Keep track of how many connections we have open - -2006-05-01 12:27 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - add missing extern - -2006-05-01 10:55 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Add INCOMPL() macro to mark missing code. - - Add http_HdrIs() to check if we have a given header and if we do - if it has a given value. - - Use it. - - Ignore SIGPIPE since SO_NOSIGPIPE doesn't work reliably, (but set - it on accepted TCP connections anyway). - - Update passing to match fetching, including a chunked encoding method. - -2006-05-01 07:54 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Add yet another thread with an event engine to monitor idle backend - connections and clean them out if the backend closes. - -2006-05-01 07:53 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Centralize "Connection: close" handling from the backend. - - Loop until we have the entire chunk in chunked encoding - -2006-04-25 09:32 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - test backend connections at allocation time. - - General bush-wacking in the fetch code. - -2006-04-25 09:31 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Fix argument to http_BuildSbuf - -2006-04-25 09:30 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Keep alive often enough - -2006-04-25 08:17 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Make width colum wider and decimal - -2006-04-25 08:17 phk - - * trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add new shmlog tags and handling states - -2006-04-25 08:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Implement a rudimentary chunked Transfer-Encoding - -2006-04-25 07:10 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - reset header count before we dissect - -2006-04-25 07:04 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Track backend connections in shmem log - -2006-04-25 06:52 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Add an end pointer so allocation size can be changed on the fly - -2006-04-25 06:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Move shmlog entry, remove debugging - -2006-04-25 06:16 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Redo http header storage and processing - -2006-04-24 19:10 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add an indecisive comment - -2006-04-24 19:09 phk - - * trunk/varnish-cache/include/http_headers.h: - - Sort and annotate - -2006-04-19 06:38 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Loop until we have read it all - -2006-04-19 06:34 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Implement enough of FetchSession and DeliverSession that we can actually - deliver a cached object. - -2006-04-18 08:23 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add busyflag and strorage link to objects. - - Initialize default hasher and stevedore. - - Give each workerthread an object pointer to be kept populated with - a template object for when lookups miss and need to insert one. - - Add libmd to get MD5, (choice of hash-algorithm to be revisited later) - - Implement lookup, begin on fetch. - -2006-04-18 07:34 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Add trivial malloc backed storage backend. - -2006-04-12 08:58 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_priv.h, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Implement the three function VCL model in the compiler. - -2006-04-12 08:56 phk - - * trunk/varnish-cache/include/http_headers.h: - - Add ETag: header - -2006-04-11 08:28 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Beginnings of the object lookup stuff: A simple list based - implementation to get things moving. - -2006-04-06 10:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Close or recycle backend connections as appropriate - -2006-04-06 10:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Add VBE_RecycleFd() function to recycle backend connections - -2006-04-06 09:59 phk - - * trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Pass Content-Encoding header - -2006-04-06 09:38 phk - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Output the fd in decimal instead of hex. - - Do Id Keyword - -2006-04-06 09:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Rename hdr_end to a more sensible rcv_ptr which points to the first - unaccounted for character in the buffer. - - Do Id Keyword - -2006-04-06 09:30 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add shmlog tags for pipe and pass handling - -2006-04-06 09:11 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Log tag for session reuse. - - Do Id Keyword - -2006-04-06 09:10 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Recycle sessions instead of retiring them. - -2006-04-06 09:09 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Prune the bits we used from the input buffer before we recycle the - session. - -2006-04-06 09:09 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Add a vca_recycle_session() function which sticks a session back into - the acceptors event engine. - - Do Id keyword - -2006-04-06 09:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Don't log the terminating NUL on response proto field. - -2006-04-06 08:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Add an assert, remove debugging. - -2006-04-06 08:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Respect VCL choice of handling - - Do Id keyword - -2006-04-06 08:16 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Don't attempt to restart child process (yet). - - Add Id Keyword handling - -2006-04-06 08:15 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - It's cheaper to pipe than to pass, so if the client indicates - "Connection: close", pipe instead of passing. - -2006-04-06 07:50 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Use HttpdBuildSbuf() - - Enable Id keyword - -2006-04-06 07:50 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Add a function to (re)build a HTTP request or response into an sbuf. - - Enable Id keyword - -2006-04-05 10:33 phk - - * trunk/varnish-cache/autogen.sh: - - Eliminate leaked developer hacks. - -2006-04-05 09:40 phk - - * trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Account for the last byte of the header. - -2006-04-04 10:35 des - - * trunk/varnish-cache/configure.ac, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/strlcat.c, - trunk/varnish-cache/lib/libcompat/strlcpy.c: - - I can't get AM_CONDITIONAL to work properly, so use a bigger hammer. - -2006-04-04 10:09 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/mgt_child.c: - - More portability changes: include config.h and compat.h, get rid of - __unused. - -2006-04-04 10:08 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am: - - Link in libcompat, and libsbuf is now static. - -2006-04-04 10:08 des - - * trunk/varnish-cache/lib/libsbuf/Makefile.am: - - Make libsbuf static. - -2006-04-04 10:07 des - - * trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat.h, - trunk/varnish-cache/lib/Makefile.am, - trunk/varnish-cache/lib/libcompat, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/strlcat.c, - trunk/varnish-cache/lib/libcompat/strlcpy.c: - - Add a libcompat with strlcat() and strlcpy() from OpenBSD. - -2006-04-04 09:05 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Get pass-through working for the first request. - - Now we can start to play with multi-request sessions and all that. - -2006-04-04 08:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add HTTP response headers and processing. - -2006-04-04 07:46 phk - - * trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/cli.c: - - Reverse constification of Argv functions. After cascading through all - the CLI functions we hit the fact that the evbuffer functions in libevent - are not properly constified. - - It's better to deconst the error messages and just "let it be known" that - argv[0] is const (or NULL). - -2006-04-04 07:30 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Get "Pass" mode moving - -2006-04-04 07:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Make the "receive a HTTP protocol header" code generic - -2006-04-04 07:27 phk - - * trunk/varnish-cache/include/vcl_lang.h: - - Add a session callback pointer to struct sess. - -2006-04-04 07:26 phk - - * trunk/varnish-cache/bin/varnishd/cli_event.c: - - Use bufferevent_base_set() from libevent - -2006-04-04 07:24 phk - - * trunk/varnish-cache/contrib/libevent/event.h: - - Add a missing prototype until libevent people catch up. - -2006-04-04 07:24 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add a Debug shmemlog tag. - -2006-04-04 07:24 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Portability tweaks: use our own sbuf.h and queue.h; get rid of - __DECONST; get - rid of digittoint() (which is pointless since ISO C guarantees that digits - are consecutive in the execution character set); get rid of __unused. - - Also fix a buglet in argv.c's BackSlash() (parsing of octal numbers), and - constify the array passed around by ParseArgv() and FreeArgv(). - -2006-04-03 14:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Move memset further up. - -2006-04-03 14:20 des - - * trunk/varnish-cache/Makefile.am, trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/configure.ac, trunk/varnish-cache/contrib/Makefile.am: - - Hook up libevent to the build. Note that this should be made - conditional at - some later date. - -2006-04-03 14:04 des - - * trunk/varnish-cache/contrib/libevent/WIN32-Code/provos at badschwartau.provos.org.12766: - - - GC - -2006-04-03 12:05 des - - * trunk/varnish-cache/contrib/libevent/sample/Makefile.in, - trunk/varnish-cache/contrib/libevent/test/Makefile.in: - - Remove generated files which were committed by mistake. - -2006-04-03 11:59 des - - * trunk/varnish-cache/contrib/libevent/Makefile.am, - trunk/varnish-cache/contrib/libevent/README, - trunk/varnish-cache/contrib/libevent/WIN32-Code/win32.c, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/libevent.dsp, - trunk/varnish-cache/contrib/libevent/buffer.c, - trunk/varnish-cache/contrib/libevent/configure.in, - trunk/varnish-cache/contrib/libevent/devpoll.c, - trunk/varnish-cache/contrib/libevent/epoll.c, - trunk/varnish-cache/contrib/libevent/evbuffer.c, - trunk/varnish-cache/contrib/libevent/event.3, - trunk/varnish-cache/contrib/libevent/event.c, - trunk/varnish-cache/contrib/libevent/event.h, - trunk/varnish-cache/contrib/libevent/event_rpcgen.py, - trunk/varnish-cache/contrib/libevent/event_tagging.c, - trunk/varnish-cache/contrib/libevent/http.c, - trunk/varnish-cache/contrib/libevent/http.h, - trunk/varnish-cache/contrib/libevent/kqueue.c, - trunk/varnish-cache/contrib/libevent/log.h, - trunk/varnish-cache/contrib/libevent/poll.c, - trunk/varnish-cache/contrib/libevent/rtsig.c, - trunk/varnish-cache/contrib/libevent/select.c, - trunk/varnish-cache/contrib/libevent/signal.c, - trunk/varnish-cache/contrib/libevent/strlcpy.c, - trunk/varnish-cache/contrib/libevent/test/Makefile.am, - trunk/varnish-cache/contrib/libevent/test/regress.c, - trunk/varnish-cache/contrib/libevent/test/regress.h, - trunk/varnish-cache/contrib/libevent/test/regress.rpc, - trunk/varnish-cache/contrib/libevent/test/regress_http.c, - trunk/varnish-cache/contrib/libevent/test/test-weof.c, - trunk/varnish-cache/contrib/libevent/test/test.sh: - - Update from libevent CVS trunk. - -2006-04-03 11:05 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Segregate http header fields into a separate structure, we will - reuse them a few places by the looks of it. - - Add VCA_UNKNOWNHDR (=10) fields for unknown HTTP headers. - If more headers arrive than that, they're lost (and logged as such). - -2006-04-03 11:03 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - How I wish people would think more ahead when writing libraries like - libevent. The entire "implicit event engine" api assumption stinks. - - Deal with it better. - -2006-04-03 09:02 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - A little step for humanity but a big step for varnish: - - Implement pipe-through mode and see the first web-pages actually - pass through varnish. - -2006-04-03 07:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Call the init function when the VCL code is loaded. - We may want to postpone this to use time later on. - -2006-04-03 07:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add 5 dummy fields to the http headers, we will need them subsequently. - -2006-03-31 08:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl: - - Use http_headers.h to define session fields for headers and to parse - them out of the header. - -2006-03-31 08:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Add missing pthread.h includes - -2006-03-31 08:25 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Use http_headers.h to define HTTP header tags for logging - -2006-03-31 08:24 phk - - * trunk/varnish-cache/include/http_headers.h: - - Reusable macro definition of HTTP headers. We will need these - several different places in the sources. - -2006-03-30 11:16 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - get us closer to a connection to the backend - -2006-03-30 10:56 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Rework the compilation of backend specifications in order to be able - to check the provided hostname/portname at compile time. - -2006-03-30 09:26 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add the beginning of a backend connection pool - -2006-03-30 08:05 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Promote the poll mutex to be a session mutex so that we can use it - for the VCL reference as well, this saves locking operations. - - Call the atual VCL code when we get the request. - -2006-03-30 07:05 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Integrate the VCL code closer in the cache process: The passed - argument will be the session structure. - - Add the pool of worker threads (cache_pool). With a unitary nature - of the VCL code, the HTTP parsing can be postponed to the worker thread. - - This actually helps us with CPU cache locality as it will reduce the - amount of memory allocated on one CPU but freed on another. - -2006-03-27 14:12 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add config.load, config.inline and config.use commands. - -2006-03-27 14:11 phk - - * trunk/varnish-cache/include/libvcl.h: - - Forgot to add this one. Prototypes for the VCL compiler. - -2006-03-27 14:10 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Add VCL_CompileFile() function. - -2006-03-27 13:59 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Just return if there is nothing to wait for. We get SIGCHLD'ed on - the popen child process. - -2006-03-27 13:57 phk - - * trunk/varnish-cache/include/cli_priv.h: - - Add a macro which we can #ifdef - -2006-03-27 12:27 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Build default VCL from "-b backend_IP" option and pass it to client - via heritage. - -2006-03-27 11:51 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - edge closer towards being a nice member of society - -2006-03-27 11:22 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Experimentally pull in VCL program - -2006-03-27 11:21 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_priv.h: - - Actually generate a shared object - -2006-03-27 11:21 phk - - * trunk/varnish-cache/include/vcl_lang.h: - - Stuff VCL programs needs to know about. - -2006-03-27 09:02 phk - - * trunk/varnish-cache/configure.ac: - - add libvcl - -2006-03-27 09:01 phk - - * trunk/varnish-cache/lib/libvcl/Makefile, - trunk/varnish-cache/lib/libvcl/Makefile.am: - - Put under control of auto* tools - -2006-03-27 09:01 phk - - * trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Newly generated code - -2006-03-27 09:00 phk - - * trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl: - - Don't generate sparse array code. - -2006-03-24 10:46 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/include/shmlog_tags.h: - - More complete HTTP parsing and logging. - -2006-03-24 10:23 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Change session memory management to avoid pollution - - Add fledling httpd parsing - -2006-03-24 10:22 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Add a VSLR() variant which logs a byte range without spending time in - sprintf - -2006-03-24 09:45 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Log remote IP#:port on session open - -2006-03-24 09:14 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - put symbolic names on the tags - -2006-03-24 09:05 phk - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog, - trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/configure.ac: - - Add a minimal log tailer. - -2006-03-24 08:43 phk - - * trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/shmlog_tags.h: - - Move the SHM tags into a resuable .h file. - - Minor nits - -2006-03-23 15:31 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add shared memory log setup and stuffer function in the child process. - - Log whenever we get a CLI ping - -2006-03-23 12:20 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Now we're starting to get somewhere: Accept connections and assemble - a HTTP request. - -2006-03-23 08:45 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Open TCP sockets - -2006-03-17 13:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Make it possible to suspend and resume a cli connection while we wait - for response from the child (or otherwise). - - Add a generic "pass-through" handler for cli requests we just pass on - to the child. - -2006-03-17 10:03 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add multiplexing for the mgt->child cli connection and get ping/pong - working across it. - - The management process will now keep the child process watchdog from - expiring. - -2006-03-16 12:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/cli.c: - - cleanup - -2006-03-16 10:48 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Expand the empty shell a bit. - - Add CLI handler on stdin (for now, in production only if - debug is specified). - - Implement help, verbos, ping and start. - - start forks the child process, sets up listeners on its stdout/stderr - (where nothing should arrive in production). - - Add SIGCHLD handler to reap and restart the child. - - Add shell "main" for the child: Set up a CLI handler on the pipes - passed as heritage. - - Add ping command and keepalive timeout. - -2006-03-16 10:46 phk - - * trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h: - - Functions to handle the CLI with event(3)'s buffer events. - - This may eventually belong in a library for wider use. - -2006-03-16 09:02 phk - - * trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvcl/Makefile: - - Generic and public stuff for CLI protocol handling. - -2006-03-16 08:30 phk - - * trunk/varnish-cache/include/cli.h: - - add min+max argument counts - -2006-03-15 20:34 phk - - * trunk/varnish-cache/include/cli.h: - - Add definitions pertaining to the ascii-protocol which will be used - multiple different places in the varnish architecture. - -2006-03-14 12:54 des - - * trunk/varnish-cache/contrib, trunk/varnish-cache/contrib/libevent, - trunk/varnish-cache/contrib/libevent/Makefile.am, - trunk/varnish-cache/contrib/libevent/README, - trunk/varnish-cache/contrib/libevent/WIN32-Code, - trunk/varnish-cache/contrib/libevent/WIN32-Code/config.h, - trunk/varnish-cache/contrib/libevent/WIN32-Code/misc.c, - trunk/varnish-cache/contrib/libevent/WIN32-Code/misc.h, - trunk/varnish-cache/contrib/libevent/WIN32-Code/provos at badschwartau.provos.org.12766, - trunk/varnish-cache/contrib/libevent/WIN32-Code/win32.c, - trunk/varnish-cache/contrib/libevent/WIN32-Prj, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/event_test, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/event_test/event_test.dsp, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/event_test/test.txt, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/libevent.dsp, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/libevent.dsw, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/signal_test, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/signal_test/signal_test.dsp, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/time_test, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/time_test/time_test.dsp, - trunk/varnish-cache/contrib/libevent/acconfig.h, - trunk/varnish-cache/contrib/libevent/buffer.c, - trunk/varnish-cache/contrib/libevent/compat, - trunk/varnish-cache/contrib/libevent/compat/sys, - trunk/varnish-cache/contrib/libevent/compat/sys/_time.h, - trunk/varnish-cache/contrib/libevent/compat/sys/queue.h, - trunk/varnish-cache/contrib/libevent/compat/sys/tree.h, - trunk/varnish-cache/contrib/libevent/configure.in, - trunk/varnish-cache/contrib/libevent/devpoll.c, - trunk/varnish-cache/contrib/libevent/epoll.c, - trunk/varnish-cache/contrib/libevent/epoll_sub.c, - trunk/varnish-cache/contrib/libevent/evbuffer.c, - trunk/varnish-cache/contrib/libevent/event-internal.h, - trunk/varnish-cache/contrib/libevent/event.3, - trunk/varnish-cache/contrib/libevent/event.c, - trunk/varnish-cache/contrib/libevent/event.h, - trunk/varnish-cache/contrib/libevent/evsignal.h, - trunk/varnish-cache/contrib/libevent/kqueue.c, - trunk/varnish-cache/contrib/libevent/log.c, - trunk/varnish-cache/contrib/libevent/log.h, - trunk/varnish-cache/contrib/libevent/poll.c, - trunk/varnish-cache/contrib/libevent/rtsig.c, - trunk/varnish-cache/contrib/libevent/sample, - trunk/varnish-cache/contrib/libevent/sample/Makefile.am, - trunk/varnish-cache/contrib/libevent/sample/Makefile.in, - trunk/varnish-cache/contrib/libevent/sample/event-test.c, - trunk/varnish-cache/contrib/libevent/sample/signal-test.c, - trunk/varnish-cache/contrib/libevent/sample/time-test.c, - trunk/varnish-cache/contrib/libevent/select.c, - trunk/varnish-cache/contrib/libevent/signal.c, - trunk/varnish-cache/contrib/libevent/test, - trunk/varnish-cache/contrib/libevent/test/Makefile.am, - trunk/varnish-cache/contrib/libevent/test/Makefile.in, - trunk/varnish-cache/contrib/libevent/test/bench.c, - trunk/varnish-cache/contrib/libevent/test/regress.c, - trunk/varnish-cache/contrib/libevent/test/test-eof.c, - trunk/varnish-cache/contrib/libevent/test/test-init.c, - trunk/varnish-cache/contrib/libevent/test/test-time.c, - trunk/varnish-cache/contrib/libevent/test/test-weof.c, - trunk/varnish-cache/contrib/libevent/test/test.sh: - - Add Niels Provos's libevent 1.1a. - -2006-03-14 12:00 des - - * trunk/varnish-cache/include/hash.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/include/queue.h, - trunk/varnish-cache/include/sbuf.h, trunk/varnish-cache/include/tree.h: - - Set the correct property (svn:keywords, not svn:keyword) - -2006-03-14 11:57 des - - * trunk/varnish-cache/lib/libsbuf/Makefile.am, - trunk/varnish-cache/lib/libsbuf/sbuf.3, - trunk/varnish-cache/lib/libsbuf/sbuf.c: - - Add a man page, and set the correct property (svn:keywords, not - svn:keyword) - -2006-03-14 09:31 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add some trivial bits while I think about the hard ones - -2006-03-14 09:15 phk - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/argv.c: - - Add a function to break a command line like string into an argv[]. - This will be useful for the various text based protocols etc. - -2006-03-13 14:23 des - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/hash.h, - trunk/varnish-cache/include/queue.h, trunk/varnish-cache/include/tree.h: - - Add hash.h, queue.h and tree.h from NetBSD-CURRENT. - -2006-03-13 14:14 des - - * trunk/varnish-cache/configure.ac, trunk/varnish-cache/include/sbuf.h, - trunk/varnish-cache/lib/Makefile.am, trunk/varnish-cache/lib/libsbuf, - trunk/varnish-cache/lib/libsbuf/Makefile.am, - trunk/varnish-cache/lib/libsbuf/sbuf.c: - - Add libsbuf, based on the latest sbuf code from FreeBSD-CURRENT. - -2006-03-13 13:30 phk - - * trunk/varnish-cache/autogen.sh: - - Pick up the gnu-autotools binary directory if we spot one. This - makes life on FreeBSD somewhat easier. - -2006-03-13 12:37 phk - - * trunk/varnish-cache/lib/Makefile.am, trunk/varnish-cache/lib/libvcl, - trunk/varnish-cache/lib/libvcl/Makefile, - trunk/varnish-cache/lib/libvcl/sample.vcl, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_priv.h, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add first cut of VCL compiler to the tree. - - The Makefile is a temporary shim until I get the auto* stuff working. - - The sample.vcl is a small mock-up to test the compiler. - - Some of the .h files needs to move other places in the fullness of time. - - But other than that... - -2006-03-02 10:32 des - - * trunk/varnish-cache: - - Ignore generated files; generated with the following command: - - svk propset svn:ignore "$(svk status | awk '/^\?/ { print $2 }')" . - -2006-03-02 10:31 des - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/varnish, - trunk/varnish-cache/include/varnish/assert.h, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am, - trunk/varnish-cache/lib/libvarnishapi/varnish_debug.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_log.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_util.c: - - Untested & undocumented login code. I don't have time to continue working - on it right now, but I want it in the tree so phk doesn't start duplicating - my effort. - -2006-03-02 10:29 des - - * trunk/varnish-cache/bin/varnishd: - - Add varnishd to ignore list. - -2006-02-27 14:21 des - - * trunk/varnish-cache/include: - - Ignore generated files. - -2006-02-27 14:21 des - - * trunk/varnish-cache/lib, trunk/varnish-cache/lib/libvarnish, - trunk/varnish-cache/lib/libvarnishapi: - - Ignore generated files. - -2006-02-27 14:21 des - - * trunk/varnish-cache/bin, trunk/varnish-cache/bin/varnishd: - - Ignore generated files. - -2006-02-27 11:10 des - - * trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am: - - Correct libtool idiom: run libtoolize after aclocal, and use LTLIBRARIES - instead of LIBRARIES. - -2006-02-27 09:55 des - - * trunk/varnish-cache/LICENSE: - - Don't forget the license! - -2006-02-24 14:35 des - - * trunk/varnish-cache/Makefile.am, trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/bin, trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishd, - trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/configure.ac, trunk/varnish-cache/include, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/varnishapi.h, trunk/varnish-cache/lib, - trunk/varnish-cache/lib/Makefile.am, - trunk/varnish-cache/lib/libvarnish, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnishapi, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am: - - Source tree structure as agreed. - -2006-02-22 14:31 des - - * trunk/varnish-cache, trunk/varnish-doc, trunk/varnish-proto, - trunk/varnish-tools: - - Additional subdivisions. - From des at projects.linpro.no Thu May 17 12:25:00 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 17 May 2007 14:25:00 +0200 (CEST) Subject: r1444 - branches/1.0 Message-ID: <20070517122500.CD1931EC2AF@projects.linpro.no> Author: des Date: 2007-05-17 14:25:00 +0200 (Thu, 17 May 2007) New Revision: 1444 Modified: branches/1.0/ChangeLog Log: Regenerate. Modified: branches/1.0/ChangeLog =================================================================== --- branches/1.0/ChangeLog 2007-05-17 12:21:50 UTC (rev 1443) +++ branches/1.0/ChangeLog 2007-05-17 12:25:00 UTC (rev 1444) @@ -1,10526 +1,114 @@ -2007-02-20 08:49 des +Change log for Varnish 1.0.4 - * branches/1.0/configure.ac: +Changes between 1.0.3 and 1.0.4 - Bump version number. +varnishd -2007-02-20 08:47 des + ? The request workflow has been redesigned to simplify request processing and + eliminate code duplication. All codepaths which need to speak HTTP now + share a single implementation of the protocol. Some new VCL hooks have been + added, though they aren't much use yet. The only real user-visible change + should be that Varnish now handles persistent backend connections correctly + (see ticket #56). - * branches/1.0/ChangeLog: + ? Support for multiple listen addresses has been added. - Regenerate + ? An "include" facility has been added to VCL, allowing VCL code to pull in + code fragments from multiple files. -2007-02-20 08:47 des + ? Multiple definitions of the same VCL function are now concatenated into one + in the order in which they appear in the source. This simplifies the + mechanism for falling back to the built-in default for cases which aren't + handled in custom code, and facilitates modularization. - * branches/1.0, branches/1.0/redhat/varnish.initrc: + ? The code used to format management command arguments before passing them on + to the child process would underestimate the amount of space needed to hold + each argument once quotes and special characters were properly escaped, + resulting in a buffer overflow. This has been corrected. - r36059 at cat (orig r1243): des | 2007-02-20 09:46:24 +0100 - Correct misunderstanding regarding -w. + ? The VCL compiler has been overhauled. Several memory leaks have been + plugged, and error detection and reporting has been improved throughout. + Parts of the compiler have been refactored to simplify future extension of + the language. -2007-02-20 08:47 des + ? A bug in the VCL compiler which resulted in incorrect parsing of the + decrement (-=) operator has been fixed. - * branches/1.0, branches/1.0/include/stat_field.h: + ? A new -C command-line option has been added which causes varnishd to + compile the VCL code (either from a file specified with -f or the built-in + default), print the resulting C code and exit. - r35540 at cat (orig r1240): phk | 2007-01-30 13:17:58 +0100 - Forgotten commit: - - Update backend stats fields - + ? When processing a backend response using chunked encoding, if a chunk + header crosses a read buffer boundary, read additional bytes from the + backend connection until the chunk header is complete. -2007-02-20 08:47 des + ? A new ping_interval run-time parameter controls how often the management + process checks that the worker process is alive. - * branches/1.0, branches/1.0/bin/varnishd/varnishd.c: + ? A bug which would cause the worker process to dereference a NULL pointer + and crash if the backend did not respond has been fixed. - r35539 at cat (orig r1239): phk | 2007-01-29 23:06:33 +0100 - Things you didn't know about C, #7212: - - There is no sane way to get sscanf to tell you how many characters - were consumed, if you want to allow a variable number of arguments. - - The special format %n is patently useless for this, because you - have to insert it at every conceiveable point in the string and - that presumes full explicit whitespace markup. - - Parse -w argument "by hand", to catch illegal input like "1,INF,15" - - Tripped over by: Stein Ove Rosseland - - Fixes: ticket #82 - - + ? In some cases, such as when they are used by AJAX applications to + circumvent Internet Explorer's over-eager disk cache, it may be desirable + to cache POST requests. However, the code path responsible for delivering + objects from cache would only transmit the response body when replying to a + GET request. This has been extended to also apply to POST. -2007-02-20 08:46 des + This should be revisited at a later date to allow VCL code to control + whether the body is delivered. - * branches/1.0, branches/1.0/bin/varnishd/cache_backend.c, - branches/1.0/bin/varnishd/cache_vrt.c: + ? Varnish now respects Cache-control: s-maxage, and prefers it to + Cache-control: max-age if both are present. - r34134 at cat (orig r1238): phk | 2007-01-22 14:24:42 +0100 - Expend a lock on keeping the backend statistics consistent. - Rename the fields to make more sense - - + This should be revisited at a later date to allow VCL code to control which + headers are used and how they are interpreted. -2007-02-20 08:46 des + ? When loading a new VCL script, the management process will now load the + compiled object to verify that it links correctly before instructing the + worker process to load it. - * branches/1.0, branches/1.0/bin/varnishd/cache.h, - branches/1.0/bin/varnishd/cache_backend.c, - branches/1.0/bin/varnishd/cache_vrt.c, branches/1.0/include/vrt_obj.h, - branches/1.0/lib/libvcl/flint.lnt, - branches/1.0/lib/libvcl/vcc_compile.c, - branches/1.0/lib/libvcl/vcc_gen_obj.tcl, - branches/1.0/lib/libvcl/vcc_obj.c: + ? A new -P command-line options has been added which causes varnishd to + create a PID file. - r34133 at cat (orig r1237): phk | 2007-01-22 13:31:52 +0100 - The getaddrinfo(3) API does not tell us the TTL value learned from DNS - so we have to add our own stuff for that. - - Without some kind of TTL, we would hit the DNS server once per failed - attempt to connect to the backend. - - If the backend were down, we could hit it a LOT. - - In the VCL code: - - backend foobar { - [...] - set backend.dnsttl = 20s; - } - - will assign a TTL for DNS lookups of this backends hostname+port - combination, we will not hit the DNS server more often that this. - - The default is set at 30 seconds, short enough to make things are - workable in a load-balancing-via-DNS setups, yet long enough to not - pound the DNS server flat in case of backend failures. - - NOTE that as long as we succeed in connecting to the backend we - do not perform new DNS lookups. That will have to be revisited - along with possible load-balancing schemes for the backend(s). - - + ? The sendfile_threshold run-time parameter's default value has been set to + infinity after a variety of sendfile()-related bugs were discovered on + several platforms. -2007-02-20 08:46 des +varnishlog - * branches/1.0, branches/1.0/bin/varnishd/shmlog.c: + ? When grouping log entries by request, varnishlog attempts to collapse the + log entry for a call to a VCL function with the log entry for the + corresponding return from VCL. When two VCL calls were made in succession, + varnishlog would incorrectly omit the newline between the two calls (see + ticket #95). - r34132 at cat (orig r1236): phk | 2007-01-22 12:46:25 +0100 - Use struct assignment to overcome volatile poisoning. - + ? New -D and -P command-line options have been added to daemonize and create + a pidfile, respectively. -2007-02-20 08:46 des +varnishncsa - * branches/1.0, branches/1.0/bin/varnishd/cache_backend.c: + ? The formatting callback has been largely rewritten for clarity, robustness + and efficiency. - r34131 at cat (orig r1235): phk | 2007-01-22 12:15:57 +0100 - Cache the workspace size from params so it doesn't change under us. - + If a request included a Host: header, construct and output an absolute URL. + This makes varnishncsa output from servers which handle multiple virtual + hosts far more useful. -2007-02-20 08:46 des +Documentation - * branches/1.0, branches/1.0/bin/varnishd/heritage.h, - branches/1.0/bin/varnishd/varnishd.c: + ? The documentation?especially the VCL documentation?has been greatly + extended and improved. - r34130 at cat (orig r1234): phk | 2007-01-22 12:15:27 +0100 - Make params volatile so changes are discovered. - +Build system -2007-02-20 08:46 des + ? The name and location of the curses or ncurses library is now correctly + detected by the configure script instead of being hardcoded into affected + Makefiles. This allows Varnish to build correctly on a wider range of + platforms. - * branches/1.0, branches/1.0/autogen.sh: + ? Compatibility shims for clock_gettime() are now correctly applied where + needed, allowing Varnish to build on MacOS X. - r34129 at cat (orig r1233): phk | 2007-01-22 09:43:30 +0100 - Allow automake version 1.10 - + ? The autogen.sh script will now correctly detect and warn about automake + versions which are known not to work correctly. -2007-02-20 08:46 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_pass.c, - branches/1.0/bin/varnishd/common.h, - branches/1.0/bin/varnishd/storage_file.c, - branches/1.0/bin/varnishd/varnishd.c: - - r34127 at cat (orig r1231): phk | 2007-01-02 14:41:08 +0100 - Polish as result of flexelint run and record a couple of thoughts. - - -2007-02-20 08:46 des - - * branches/1.0, branches/1.0/bin/varnishd/storage_file.c: - - r34126 at cat (orig r1230): knutroy | 2006-12-18 16:58:59 +0100 - Fixed double declaraction error on systems having both - HAVE_SYS_STATVFS_H and HAVE_SYS_VFS_H. - - -2007-02-20 08:46 des - - * branches/1.0, branches/1.0/autogen.sh: - - r34125 at cat (orig r1229): des | 2006-12-05 12:42:39 +0100 - Better workaround for FreeBSD autotools brokenness. - - Pointy hat to: {ade,portsmgr}@freebsd.org - - -2007-02-20 08:46 des - - * branches/1.0, branches/1.0/bin/varnishd/storage_file.c: - - r34124 at cat (orig r1228): phk | 2006-12-05 10:41:16 +0100 - Make the statfs(3)/statvfs(3) dictomy actually work. - - -2007-02-20 08:46 des - - * branches/1.0, branches/1.0/autogen.sh: - - r34123 at cat (orig r1227): phk | 2006-12-05 09:48:27 +0100 - Add a FreeBSD workaround while des@ tries to get autocrap to DTRT under - FreeBSD also. - - -2007-02-20 08:46 des - - * branches/1.0, branches/1.0/bin/varnishd/storage_file.c, - branches/1.0/configure.ac: - - r34122 at cat (orig r1226): phk | 2006-12-05 09:47:43 +0100 - NetBSD Portability fix: - - Starting with 3.1, NetBSD uses statvfs and not statfs. - - Submitted by: Juan RP - - -2007-02-20 08:46 des - - * branches/1.0, branches/1.0/redhat/varnish.initrc, - branches/1.0/redhat/varnish.sysconfig: - - r34107 at cat (orig r1222): ingvar | 2006-11-08 10:03:40 +0100 - Removed the usage of -w in the initscript until that bug is fixed in - varnishd - -2007-02-20 08:46 des - - * branches/1.0, branches/1.0/bin/varnishd/varnishd.c: - - r33742 at cat (orig r1221): des | 2006-11-08 09:59:20 +0100 - Rewrite tackle_warg(): don't override the default max or timeout unless - the user asks; bail if max < min; fix usage string. - -2007-02-20 08:46 des - - * branches/1.0, branches/1.0/bin/varnishd/varnishd.c: - - r33741 at cat (orig r1220): des | 2006-11-08 09:49:57 +0100 - Remove printf() from signal handler. - Make the pipe-juggling code slightly more readable. - -2006-11-06 12:19 des - - * branches/1.0/ChangeLog: - - Regenerate. - -2006-11-06 12:07 des - - * branches/1.0, branches/1.0/debian/lintian-override: - - r33659 at cat (orig r1216): bahner | 2006-11-03 10:37:47 +0100 - Adding lintian-overrides for debian acceptance - - -2006-11-02 12:57 des - - * branches/1.0, branches/1.0/include/compat/vis.h, - branches/1.0/lib/libcompat/vis.c: - - r33651 at cat (orig r1208): des | 2006-11-02 13:57:11 +0100 - As per ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change, - remove the so-called advertising clause from these files' license, - making it compatible with the Debian Free Software Guidelines. As - these files were obtained from FreeBSD, this change was discussed - with and approved by the FreeBSD core team. - -2006-11-02 12:57 des - - * branches/1.0, branches/1.0/debian/changelog, branches/1.0/debian/dirs, - branches/1.0/debian/rules: - - r33291 at cat (orig r1207): bahner | 2006-10-23 14:21:17 +0200 - Lintian overrides for debian-acceptance - - -2006-11-02 12:57 des - - * branches/1.0, branches/1.0/debian/TODO, branches/1.0/debian/varnish.init: - - r33290 at cat (orig r1206): bahner | 2006-10-23 14:12:07 +0200 - Preliminary LSB compliance in init-scripts - - -2006-11-02 12:57 des - - * branches/1.0, branches/1.0/debian/changelog, - branches/1.0/debian/copyright: - - r33289 at cat (orig r1205): bahner | 2006-10-19 15:55:12 +0200 - Bumped version to 1.0.2 proper - Added wording regarding the origination of the source of - varnish with relation to debian. - - -2006-11-02 12:57 des - - * branches/1.0, branches/1.0/debian/control: - - r33288 at cat (orig r1204): bahner | 2006-10-19 15:44:27 +0200 - Reverted accidental reversion of dependencies - - -2006-11-02 12:57 des - - * branches/1.0, branches/1.0/redhat/varnish.spec: - - r33287 at cat (orig r1203): ingvar | 2006-10-19 14:55:20 +0200 - Added a vendor tag to the rpm package. - -2006-11-02 12:57 des - - * branches/1.0, branches/1.0/redhat, branches/1.0/redhat/README.redhat, - branches/1.0/redhat/TODO, branches/1.0/redhat/varnish.initrc, - branches/1.0/redhat/varnish.spec, branches/1.0/redhat/varnish.sysconfig: - - r33286 at cat (orig r1202): ingvar | 2006-10-19 14:43:29 +0200 - Added build scripts for Red Hat rpm package - -2006-10-19 09:21 des - - * branches/1.0, branches/1.0/debian/control: - - r33282 at cat (orig r1198): des | 2006-10-19 11:19:28 +0200 - Capitalize. - -2006-10-19 09:21 des - - * branches/1.0, branches/1.0/etc/vcl.conf: - - r33281 at cat (orig r1197): des | 2006-10-19 11:16:42 +0200 - Additional commentary - -2006-10-19 09:21 des - - * branches/1.0, branches/1.0/etc, branches/1.0/etc/vcl.conf: - - r33280 at cat (orig r1196): des | 2006-10-19 11:16:03 +0200 - Add sample VCL config. - -2006-10-18 14:32 des - - * branches/1.0/configure.ac: - - Bump version number. - -2006-10-18 14:31 des - - * branches/1.0/ChangeLog: - - Regenerate. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/man/vcl.7: - - r32907 at cat (orig r1155): des | 2006-10-17 14:44:48 +0200 - Additional details about global variables. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/debian/copyright: - - r32906 at cat (orig r1154): bahner | 2006-10-13 10:04:07 +0200 - Change debian/copyright to refer to Subversion - - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/debian/TODO, branches/1.0/debian/changelog, - branches/1.0/debian/dirs, branches/1.0/debian/varnish.default: - - r32905 at cat (orig r1153): bahner | 2006-10-13 09:59:54 +0200 - Changed storage location of backend storage to be FHS 2.3 compliant - - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/debian/control: - - r32904 at cat (orig r1152): bahner | 2006-10-12 19:14:41 +0200 - Added build dependency on libncurses-dev and a runtime dependency on - gcc >= 3.3. - Now compiles on pristine etch-systems - - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/debian/README.Debian, - branches/1.0/debian/TODO, branches/1.0/debian/changelog: - - r32903 at cat (orig r1151): bahner | 2006-10-12 19:05:59 +0200 - Cleaned up and remembered a todo item. - - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/debian/README.Debian, - branches/1.0/debian/TODO, branches/1.0/debian/changelog, - branches/1.0/debian/control, branches/1.0/debian/dirs, - branches/1.0/debian/rules, branches/1.0/debian/varnish.default, - branches/1.0/debian/varnish.init, branches/1.0/debian/vcl.conf: - - r32902 at cat (orig r1150): bahner | 2006-10-12 18:56:54 +0200 - Added init-scripts and configuration files for Debian. - - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/man/vcl.7: - - r32901 at cat (orig r1149): des | 2006-10-10 15:36:11 +0200 - Add an example based on VG's PURGE code. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/debian/changelog, branches/1.0/debian/control: - - r32900 at cat (orig r1148): bahner | 2006-10-10 15:01:42 +0200 - Bumped automake dependency to automake 1.9 - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/debian, branches/1.0/debian/TODO, - branches/1.0/debian/changelog, branches/1.0/debian/compat, - branches/1.0/debian/control, branches/1.0/debian/copyright, - branches/1.0/debian/dirs, branches/1.0/debian/docs, - branches/1.0/debian/rules: - - r32899 at cat (orig r1147): bahner | 2006-10-10 14:05:46 +0200 - Initial debian packaging - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/lib/libvarnish/cli_common.c: - - r32848 at cat (orig r1146): des | 2006-10-09 12:04:47 +0200 - Add before . - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_acceptor.c, - branches/1.0/bin/varnishd/cache_acceptor_epoll.c, - branches/1.0/bin/varnishd/cache_acceptor_kqueue.c, - branches/1.0/bin/varnishd/cache_acceptor_poll.c, - branches/1.0/bin/varnishd/cache_ban.c, - branches/1.0/bin/varnishd/cache_center.c, - branches/1.0/bin/varnishd/cache_pass.c, - branches/1.0/bin/varnishd/cache_pipe.c, - branches/1.0/bin/varnishd/cache_response.c, - branches/1.0/bin/varnishd/cache_vrt.c, - branches/1.0/bin/varnishd/cache_vrt_acl.c, - branches/1.0/bin/varnishd/cache_vrt_re.c, - branches/1.0/bin/varnishd/hash_simple_list.c, - branches/1.0/bin/varnishd/mgt_event.c, - branches/1.0/bin/varnishd/rfc2616.c, - branches/1.0/bin/varnishd/storage_malloc.c, - branches/1.0/bin/varnishstat/varnishstat.c, branches/1.0/configure.ac, - branches/1.0/include/Makefile.am, - branches/1.0/include/compat/clock_gettime.h, - branches/1.0/lib/libcompat/Makefile.am, - branches/1.0/lib/libcompat/clock_gettime.c: - - r32847 at cat (orig r1145): des | 2006-10-09 11:58:58 +0200 - Fix build on MacOS X: add a fake clock_gettime() and fix some includes. - - WARNING: varnish will build and run, but the lack of a monotonic clock - may lead to strange behaviour if the clock is stepped (rather than skewed) - while varnish is running. - - Thanks to Niklas Saers for providing a test environment. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_acceptor_epoll.c: - - r32845 at cat (orig r1143): des | 2006-10-06 17:37:32 +0200 - On Linux 2.6.8 and older, epoll_ctl(EPOLL_CTL_DEL) requires a poll_event - even though it is not used, and will return EFAULT if one is not provided. - - Also, instead of silently accepting EBADF from epoll_ctl(), check that - sp->fd != -1 before calling vca_del(). This can happen in some cases - where vca_pollsession() closes the session before returning. This way, - we will still get an assertion failure if epoll_ctl() fails for some - other (unexpected) reason. - - Thanks to airmax for his assistance in tracking this down. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_response.c: - - r32844 at cat (orig r1142): des | 2006-10-06 14:58:04 +0200 - The delivered document's age should be computed relative to the time of - the response, not the time of the request. If the document was not in - cache and the backend took a long time to respond, the document would - end up with a negative computed age, which when printed with %u would - appear as a large positive number (a few seconds short of either 2^32 - or 2^64 depending on the size of time_t). - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/bin/varnishd/varnishd.1: - - r32842 at cat (orig r1141): des | 2006-10-06 13:04:01 +0200 - Clarify the semantics of -d and -dd. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/autogen.sh: - - r32804 at cat (orig r1140): des | 2006-10-05 16:56:50 +0200 - Older versions of automake generate incorrect Makefiles, and automake's - own mechanism for specifying a required version doesn't seem to work. - Hack autogen.sh to check which version of automake is installed. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/autogen.sh: - - r32803 at cat (orig r1139): des | 2006-10-05 16:20:29 +0200 - Older versions of automake (such as 1.4, which is the default in Debian - and Ubuntu) do not understand --force[-missing], and we can do without. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/bin/varnishd/cache.h, - branches/1.0/bin/varnishd/cache_http.c, - branches/1.0/bin/varnishd/cache_pass.c: - - r32802 at cat (orig r1138): des | 2006-10-05 13:57:35 +0200 - RFC 2616 says "All 1xx (informational), 204 (no content), and 304 (not - modified) responses MUST NOT include a message-body," so - Content-Length: is not needed in these cases (and Apache does indeed - not include it). This causes PassBody() to call pass_straight() with - a NULL length argument, which waits until the connection is closed by - the server. PassBody() should not call pass_*() at all for responses - that are known to be bodyless. - - Submitted by: Dagfinn Ilmari Manns?ker - - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/bin/varnishd/mgt_vcc.c: - - r31768 at cat (orig r1137): des | 2006-10-05 11:52:30 +0200 - Reminder to keep the default VCL code in synch with the man page. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/man/vcl.7: - - r31767 at cat (orig r1136): des | 2006-10-05 11:51:51 +0200 - Mostly complete, still lacks a list of available objects. Hope to have - that done later today. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/bin/varnishlog/varnishlog.1, - branches/1.0/bin/varnishlog/varnishlog.c, - branches/1.0/bin/varnishncsa/varnishncsa.1, - branches/1.0/bin/varnishncsa/varnishncsa.c: - - r31766 at cat (orig r1135): des | 2006-10-05 11:50:40 +0200 - Reopen the output file on SIGHUP. Document same. Also document - varnishlog's request selection feature. - -2006-10-18 14:27 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_pass.c, - branches/1.0/bin/varnishd/cache_pipe.c: - - r31765 at cat (orig r1134): phk | 2006-10-02 16:08:49 +0200 - Also add missing Host: headers for Pass & Pipe - - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_pipe.c: - - r31764 at cat (orig r1133): phk | 2006-09-29 20:37:02 +0200 - Don't suffer if one side of a piped connection keeps blasting away. - - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/configure.ac: - - r31763 at cat (orig r1132): des | 2006-09-27 15:32:18 +0200 - Turn off all optimization when building with debugging symbols. - Apparently, - just -O is not enough to prevent gcc from optimizing away loop variables. - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/include/stat_field.h: - - r31762 at cat (orig r1131): des | 2006-09-27 09:43:21 +0200 - recyles -> recycles - - Ticket: #46 - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/lib/libvcl/vcc_token.c: - - r31761 at cat (orig r1130): des | 2006-09-26 16:34:39 +0200 - Add support for C++-style comments. - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishd/varnishd.1: - - r31760 at cat (orig r1129): des | 2006-09-26 16:27:18 +0200 - Document the run-time parameters. Bump date. - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishd/mgt_param.c: - - r31759 at cat (orig r1128): des | 2006-09-26 15:52:29 +0200 - Correct man page reference in send_timeout description. - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishd/varnishd.1: - - r31758 at cat (orig r1127): des | 2006-09-26 15:31:58 +0200 - Document management interface commands, and fix list markup. - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishd/Makefile.am: - - r31757 at cat (orig r1126): des | 2006-09-26 15:12:01 +0200 - Install varnishd into the sbin directory. - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_acceptor.c: - - r31756 at cat (orig r1125): des | 2006-09-26 15:10:36 +0200 - Ignore accept() failures if errno is EAGAIN - this is not likely to happen - on a production server, but it will on a test rig, and it may confuse and - alarm the admin. - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishncsa/varnishncsa.c: - - r31755 at cat (orig r1124): andersb | 2006-09-24 19:59:00 +0200 - Fixed: Compiles correctly, but has a 128 char long maximum for Remote - Username. - - - - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishncsa/varnishncsa.c: - - r31754 at cat (orig r1123): andersb | 2006-09-24 19:14:28 +0200 - Fixed: Correctly logging "-" when there is no User-Agent or Referer. - - Note: Still builds with warning. - - - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishncsa/varnishncsa.c: - - r31753 at cat (orig r1122): andersb | 2006-09-24 18:17:06 +0200 - Fixed: [] around time. NCSA logformat requires it. - Fixed: Status variable is not shown correctly. - Added: base64() decode of Remote User. - - Note: Getting compile warning. - - - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_fetch.c, - branches/1.0/bin/varnishd/cache_pass.c, - branches/1.0/bin/varnishd/cache_pipe.c: - - r31752 at cat (orig r1121): phk | 2006-09-23 21:30:29 +0200 - Always send X-Forwarded-for: header to backend. - - - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_pool.c: - - r31751 at cat (orig r1120): phk | 2006-09-23 18:45:26 +0200 - Linux sendfile returns number of bytes written. - - Detected by: Xing Li - - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishtop/varnishtop.1: - - r31750 at cat (orig r1119): des | 2006-09-22 14:37:55 +0200 - Remove leftovers from copy-paste. - - Spotted by: Anders Hanssen - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/bin/varnishd/varnishd.1, - branches/1.0/bin/varnishhist/varnishhist.1, - branches/1.0/bin/varnishlog/varnishlog.1, - branches/1.0/bin/varnishncsa/varnishncsa.1, - branches/1.0/bin/varnishstat/varnishstat.1, - branches/1.0/bin/varnishtop/varnishtop.1: - - r31745 at cat (orig r1114): des | 2006-09-20 18:33:24 +0200 - Add attribution, bump date. - -2006-10-18 14:26 des - - * branches/1.0, branches/1.0/Makefile.am, branches/1.0/configure.ac, - branches/1.0/man, branches/1.0/man/Makefile.am, branches/1.0/man/vcl.7: - - r31744 at cat (orig r1113): des | 2006-09-20 18:26:54 +0200 - Add an unfinished vcl(7) man page. - -2006-09-20 17:21 des - - * branches/1.0/ChangeLog: - - Regenerate. - -2006-09-20 17:17 des - - * branches/1.0/configure.ac: - - Bump version. - -2006-09-20 15:46 des - - * branches/1.0, branches/1.0/bin/varnishtop/varnishtop.1: - - r31740 at cat (orig r1109): des | 2006-09-20 17:43:57 +0200 - Correct the title, name and description which were copy-pasted from - varnishhist(1). - - Spotted by: Anders Hanssen - -2006-09-20 15:46 des - - * branches/1.0, branches/1.0/include/varnishapi.h: - - r31739 at cat (orig r1108): des | 2006-09-20 17:41:23 +0200 - Declare VSL_tags[] rather than define it. This allows Varnish to build - on MacOS. - -2006-09-20 15:46 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_pool.c: - - r31738 at cat (orig r1107): phk | 2006-09-20 16:52:07 +0200 - Examine queue length, not how many have passed through the queue over - all time. - - MFC: yes. - - -2006-09-20 09:49 des - - * branches/1.0/ChangeLog: - - Regenerate. - -2006-09-20 09:44 des - - * branches/1.0, branches/1.0/README: - - r31732 at cat (orig r1101): des | 2006-09-20 11:43:39 +0200 - Update. - -2006-09-20 09:44 des - - * branches/1.0, branches/1.0/bin/varnishd/cache_pool.c: - - r31731 at cat (orig r1100): phk | 2006-09-20 11:00:20 +0200 - When ditching sessions due to overflow, only ditch new sessions. - - - -2006-09-20 08:44 des - - * branches/1.0, branches/1.0/configure.ac: - - Branch 1.0 and set version number. - -2006-09-20 08:37 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/configure.ac: - - Trust autoconf to dtrt wrt libraries. - Prefer libthr to libpthread if it's available (i.e. on FreeBSD 6 and newer) - -2006-09-20 07:51 des - - * trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - Regenerate. - -2006-09-20 07:50 des - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/steps.h, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishhist/varnishhist.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/cli_common.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/compat/asprintf.h, - trunk/varnish-cache/include/compat/setproctitle.h, - trunk/varnish-cache/include/compat/srandomdev.h, - trunk/varnish-cache/include/compat/strlcat.h, - trunk/varnish-cache/include/compat/strlcpy.h, - trunk/varnish-cache/include/compat/strndup.h, - trunk/varnish-cache/include/compat/vasprintf.h, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h, - trunk/varnish-cache/include/stats.h, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/include/vcl.h, trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vsb.h, - trunk/varnish-cache/lib/libcompat/asprintf.c, - trunk/varnish-cache/lib/libcompat/setproctitle.c, - trunk/varnish-cache/lib/libcompat/srandomdev.c, - trunk/varnish-cache/lib/libcompat/strndup.c, - trunk/varnish-cache/lib/libcompat/vasprintf.c, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/assert.c, - trunk/varnish-cache/lib/libvarnish/binary_heap.c, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvarnish/cli_common.c, - trunk/varnish-cache/lib/libvarnish/crc32.c, - trunk/varnish-cache/lib/libvarnish/time.c, - trunk/varnish-cache/lib/libvarnish/version.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Whitespace, comment and attribution fixes. - -2006-09-19 05:39 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishhist/varnishhist.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/cli_common.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/compat/asprintf.h, - trunk/varnish-cache/include/compat/setproctitle.h, - trunk/varnish-cache/include/compat/srandomdev.h, - trunk/varnish-cache/include/compat/strlcat.h, - trunk/varnish-cache/include/compat/strlcpy.h, - trunk/varnish-cache/include/compat/strndup.h, - trunk/varnish-cache/include/compat/vasprintf.h, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/include/vrt.h, trunk/varnish-cache/include/vsb.h, - trunk/varnish-cache/lib/libcompat/strndup.c, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/assert.c, - trunk/varnish-cache/lib/libvarnish/binary_heap.c, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvarnish/cli_common.c, - trunk/varnish-cache/lib/libvarnish/crc32.c, - trunk/varnish-cache/lib/libvarnish/time.c, - trunk/varnish-cache/lib/libvarnish/version.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Remove doubled author information. - -2006-09-18 22:39 des - - * trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: - - Re-regenerate. - -2006-09-18 22:04 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: - - Typo - -2006-09-18 22:03 phk - - * trunk/varnish-cache/lib/libvarnishapi/base64.c: - - Quench warnings. - -2006-09-18 22:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/steps.h, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishhist/varnishhist.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/cli_common.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/include/miniobj.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h, - trunk/varnish-cache/include/stats.h, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/assert.c, - trunk/varnish-cache/lib/libvarnish/binary_heap.c, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvarnish/cli_common.c, - trunk/varnish-cache/lib/libvarnish/crc32.c, - trunk/varnish-cache/lib/libvarnish/time.c, - trunk/varnish-cache/lib/libvarnishapi/base64.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c, - trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: - - Assert my right to be identified as the author of this work. - - A couple of files were written by me previous to this project and - in the public domain. - -2006-09-18 21:51 phk - - * trunk/varnish-cache/bin/varnishtester: - - Remove this not-quite-a-prototype - -2006-09-18 21:50 des - - * trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: - - Regenerate to revert over-eager mechanical edits. - -2006-09-18 21:48 des - - * trunk/varnish-cache/bin/varnishd/mgt_event.h, - trunk/varnish-cache/bin/varnishtester/varnishtester.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h: - - Expand tags. - -2006-09-18 21:48 des - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/steps.h, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.1, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishhist/varnishhist.1, - trunk/varnish-cache/bin/varnishhist/varnishhist.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.1, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.1, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.1, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/bin/varnishtester/varnishtester.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.1, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/cli_common.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/compat/asprintf.h, - trunk/varnish-cache/include/compat/setproctitle.h, - trunk/varnish-cache/include/compat/srandomdev.h, - trunk/varnish-cache/include/compat/strlcat.h, - trunk/varnish-cache/include/compat/strlcpy.h, - trunk/varnish-cache/include/compat/strndup.h, - trunk/varnish-cache/include/compat/vasprintf.h, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/include/miniobj.h, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h, - trunk/varnish-cache/include/stats.h, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/include/vsb.h, - trunk/varnish-cache/lib/libcompat/asprintf.c, - trunk/varnish-cache/lib/libcompat/setproctitle.c, - trunk/varnish-cache/lib/libcompat/srandomdev.c, - trunk/varnish-cache/lib/libcompat/strndup.c, - trunk/varnish-cache/lib/libcompat/vasprintf.c, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/assert.c, - trunk/varnish-cache/lib/libvarnish/binary_heap.c, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvarnish/cli_common.c, - trunk/varnish-cache/lib/libvarnish/crc32.c, - trunk/varnish-cache/lib/libvarnish/time.c, - trunk/varnish-cache/lib/libvarnish/version.c, - trunk/varnish-cache/lib/libvarnishapi/base64.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c, - trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: - - Rendons ? C?sar ce qui lui appartient. - -2006-09-18 21:33 phk - - * trunk/varnish-cache/include/varnish: - - Remove unused directory - -2006-09-18 21:32 phk - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/varnish/assert.h: - - Remove unused file - -2006-09-18 21:30 phk - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/hash.h: - - Remove unused file - -2006-09-18 21:08 des - - * trunk/varnish-cache/bin/varnishd/varnishd.1, - trunk/varnish-cache/bin/varnishhist/varnishhist.1, - trunk/varnish-cache/bin/varnishlog/varnishlog.1, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.1, - trunk/varnish-cache/bin/varnishstat/varnishstat.1, - trunk/varnish-cache/bin/varnishtop/varnishtop.1: - - Licensify man pages as well. - -2006-09-18 20:27 des - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishhist/varnishhist.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/cli_common.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/compat/asprintf.h, - trunk/varnish-cache/include/compat/setproctitle.h, - trunk/varnish-cache/include/compat/srandomdev.h, - trunk/varnish-cache/include/compat/strlcat.h, - trunk/varnish-cache/include/compat/strlcpy.h, - trunk/varnish-cache/include/compat/strndup.h, - trunk/varnish-cache/include/compat/vasprintf.h, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/varnish/assert.h, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libcompat/asprintf.c, - trunk/varnish-cache/lib/libcompat/setproctitle.c, - trunk/varnish-cache/lib/libcompat/srandomdev.c, - trunk/varnish-cache/lib/libcompat/strndup.c, - trunk/varnish-cache/lib/libcompat/vasprintf.c, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/assert.c, - trunk/varnish-cache/lib/libvarnish/binary_heap.c, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvarnish/cli_common.c, - trunk/varnish-cache/lib/libvarnish/crc32.c, - trunk/varnish-cache/lib/libvarnish/time.c, - trunk/varnish-cache/lib/libvarnish/version.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c, - trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: - - Licensify. - -2006-09-18 19:47 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - More backend error conditions changed from assert to 503 - -2006-09-18 19:38 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Deal with backend connection errors while fetching the body. - - Eventually, VCL should get a say in this. - -2006-09-18 18:49 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/include/stat_field.h: - - Introduce three new params, to limit overflow queue length - and to force HTTP/1.1 protocol version. - -2006-09-18 17:18 phk - - * trunk/varnish-cache/include/http_headers.h: - - Don't copy the Age: header into the object. - -2006-09-18 15:24 des - - * trunk/varnish-cache/bin/varnishtop/Makefile.am, - trunk/varnish-cache/bin/varnishtop/varnishtop.1: - - Add man page. - -2006-09-18 14:54 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Off by one. - -2006-09-18 14:29 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Set worker idle timestamp to request end. - -2006-09-18 10:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/stat_field.h: - - Drop the n_wrk_busy statistics, it is too expensive to maintain - due to locking. - -2006-09-18 10:38 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Add a couple of XXX comments - -2006-09-18 10:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - typo - -2006-09-18 10:10 phk - - * trunk/varnish-cache/include/stat_field.h: - - Add stat field missing in last commit - -2006-09-18 10:10 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Make a global overflow queue so we don't risk parking requests - on workpools with no available threads. - -2006-09-18 09:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - eliminate redundant counter. - -2006-09-18 09:33 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Increase CLI respone timeout to 5 seconds and tell that - a ping has failed before we kill the child. - -2006-09-18 09:25 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.1: - - Correct the description of the second and third fields. - -2006-09-18 09:22 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.1, - trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Add a -w option to set the delay between updates. - -2006-09-18 09:00 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Make sure all threads don't end up in the same work queue - -2006-09-18 08:55 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.1: - - Add an explanation of the columns in the main display. - -2006-09-18 08:55 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Widen fields sufficiently to accomodate gigabit rates. - -2006-09-18 07:36 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Make flexelint happier - -2006-09-18 07:16 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Add a simple linear retry in five steps for backend connection. - -2006-09-18 07:11 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - braino - -2006-09-18 07:08 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Get shmlog records into more sensible order. - -2006-09-18 06:41 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Unify backend error handling - -2006-09-18 06:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Minor cleanups - -2006-09-17 21:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Revert these two for now. The expiry thread doesn't have - a worker structure. - -2006-09-17 20:26 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/include/stat_field.h: - - Use workerthres log buffer much more extensively - -2006-09-17 19:57 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/shmlog.c: - - Decontest the shared memory mutex: - - Add a log buffer to the worker threads, log a lot of stuff to that - and flush it into the "real" shmbuffer every so often. - -2006-09-17 19:31 phk - - * trunk/varnish-cache/include/tree.h: - - Part of this commit leaked into the previous commit: - - We don't use splay trees. - -2006-09-17 19:30 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/stat_field.h: - - Keep track of shmlog mutex contests - -2006-09-17 18:31 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Oops, off by one. - -2006-09-17 18:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Use the worker pools in round-robin fashion. - -2006-09-17 09:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Fix logic bug so we don't reap worker threads all the time. - -2006-09-17 09:06 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - Whitespace - -2006-09-17 09:06 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Make sure we get the error messages from a dying child. - -2006-09-17 08:44 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Set sockopts on the listen socket and probe the accepted socket (once) - to see which we do not need to set there because they are inherited. - - This could potentially save three syscalls per session. - -2006-09-17 08:39 des - - * trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/varnishd.1: - - Update the parameter list in the man page, and add reminders to keep the - lists in synch. - -2006-09-17 06:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - Possibly better logic. - -2006-09-16 22:32 phk - - * trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Embellish the parameter descriptions somewhat. - -2006-09-16 22:00 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Change statistics from gauge to counter - -2006-09-16 21:45 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - Duh! We need to count stats in per workerthread and summarize into - session, otherwise we cannot correctly summarize into srcaddr and global. - -2006-09-16 21:35 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - Preallocate a srcaddr per workerthread to speed up locked section. - - Remember to free preallocated storage in workerthread. - -2006-09-16 21:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - Account directly into the session. - -2006-09-16 21:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - use miniobj on srcaddr's - -2006-09-16 21:14 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - make flexelint marginally happier - -2006-09-16 21:05 phk - - * trunk/varnish-cache/bin/varnishd/mgt_param.c: - - twiddle explanations and defaults. - -2006-09-16 20:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Use srcaddr mutex for srcaddr stats update to reduce contention on stat_mtx - -2006-09-16 20:52 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Give the srcaddr stats an overhaul. - - Make the number of buckets a parameter (needs restart though). - - Make the ttl a parameter and have zero disable srcaddr accounting. - - Give each hash bucket its own mutex. - -2006-09-16 20:17 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - VCL configs change relatively seldom so we can cache the requests - VCL reference in the worker thread when the request is done and - with a cheap check reuse it for the next request handled by this - thread. - - This should reduce mutex contention. - -2006-09-16 19:54 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Make it possible to have multiple worker pools. - - The acceptor selects the pool based on filedescriptor modulus - number of pools. - - This is an attempt to reduce lock contention. - -2006-09-16 16:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - fix debug locks - -2006-09-16 15:54 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Wrap mutex more completely so that experimentation becomes easier. - -2006-09-16 15:52 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - wrap line - -2006-09-16 15:51 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - correctly round INT32_MAX down to page boundary - -2006-09-16 14:53 des - - * trunk/varnish-cache/bin/varnishtop/varnishtop.c: - - Rename -1 to -f, and add a -1 option meaning "once". It currently does not - work very well; it should use a non-curses method to display the ranking. - -2006-09-16 14:50 des - - * trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Add a non-blocking mode to the log reader. - -2006-09-16 14:21 des - - * trunk/varnish-cache/bin/varnishhist/Makefile.am, - trunk/varnish-cache/bin/varnishhist/varnishhist.1: - - Add a man page. - -2006-09-16 14:06 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.1: - - Umm, what have I been smoking? varnishstat is not a logger and does not - support VSL_ARGS. - -2006-09-16 13:08 des - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.1: - - Bring up-to-date. - -2006-09-16 13:06 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.1: - - Remove stray -a description. - -2006-09-16 13:02 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.1: - - Bring up-to-date. - -2006-09-16 13:02 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.1: - - Bump date and add cross-references to all log programs. - -2006-09-16 12:59 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - -c collides with one of the standard VSL options, so replace it with -1, - which has the opposite meaning (IMHO, the continuous display is the most - useful) - -2006-09-16 12:45 des - - * trunk/varnish-cache/include/varnishapi.h: - - Sort options correctly. - -2006-09-16 12:43 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.1: - - Bring up-to-date, and sort options correctly. - -2006-09-16 12:43 des - - * trunk/varnish-cache/bin/varnishd/varnishd.1, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Sort options correctly. - -2006-09-16 12:29 des - - * trunk/varnish-cache/bin/varnishtop/varnishtop.c: - - Fix usage string. - -2006-09-16 12:28 des - - * trunk/varnish-cache/bin/varnishhist/varnishhist.c: - - Add -V option, fix usage string. - -2006-09-16 12:28 des - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Add the ability to write to a file (it was previously documented but not - implemented). - Fix the usage string. - -2006-09-16 12:26 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Add a -a option to control append / overwrite when writing to a file. - Fix the usage string. - -2006-09-16 12:25 des - - * trunk/varnish-cache/include/varnishapi.h: - - Add a usage string for the standard VSL options. - -2006-09-16 12:23 des - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Tweak storage file size calculations. Avoid overflow when calculating 80% - of available storage on 32-bit Linux (most fields in struct statfs are long - instead of int64_t as in BSD) - -2006-09-16 11:34 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Just in case. - -2006-09-16 11:28 des - - * trunk/varnish-cache/lib/libvarnish/crc32.c, - trunk/varnish-cache/lib/libvarnishapi/base64.c: - - Expand keywords. - -2006-09-16 11:01 des - - * trunk/varnish-cache/bin/varnishd/varnishd.1: - - Bring up-to-date. Still lacks descriptions for management commands and - run-time parameters. - -2006-09-16 11:00 phk - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Forgot about embedded CLI commands here. - -2006-09-16 10:36 des - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - The buckets_per_mutex parameter was removed in r813. - -2006-09-16 09:49 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Use generic param setting stuff - -2006-09-16 09:38 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Make the listen depth a paramter. - - Clean up the paramter stuff even more. - -2006-09-16 09:06 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add -p param=value command line argument. - -2006-09-16 09:01 phk - - * trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Generalize parameter setting at start up. - - Give the managers main a struct cli and use that to call into - the paramter stuff for setting listen address. More params to follow. - - When setting the listen address, check that getaddrinfo() doesn't - hate it. - -2006-09-16 08:20 phk - - * trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Open and close the listen socket when we start and stop the child. - - Make the listen address a parameter. - -2006-09-16 07:49 phk - - * trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/include/cli.h: - - Rename the config.* CLI command family to vcl.*. It is more intuitive - that way and we may eventually want a config file for varnishd to - control obscure parameters. - -2006-09-16 07:44 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Make the shmlog'ing of vcl execution a parameter. - - VCL tracing is responsible for a very large fraction of the shmlog - records and will generally only be used for debugging of VCL code. - -2006-09-15 19:25 phk - - * trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am, - trunk/varnish-cache/lib/libvarnishapi/base64.c: - - Add a base64 decoder. - -2006-09-15 16:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/include/stat_field.h: - - Eliminate the session_grace thing, the inter-request interval is to - large in general (think RTT) for this to make sense, it costs a syscall - and if a delay is used, at least two context switches. - - We still capture sessions that do pipe-line avoiding the context switch - in that case, without incurring the syscall overhead. - -2006-09-15 16:10 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Remove the SessionReuse shmem tag, we have little or no benefit from - knowing this at the end of a request. - - Instead put the address + port in the ReqStart shmtag where it does - a lot of good. - -2006-09-15 10:30 phk - - * trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Disable session_grace for now. - - It is not clear if this is a benefit or not. There seems to be a - significant - (100msec ?) inter-request gap and seeting the grace period that long - means tying up worker threads doing basically nothing. - - Setting a short timeout (10msec) results in an extra system call which - practically never does anything good. - - Unless benefit is shown, this stuff should be removed again. - -2006-09-15 10:24 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - fix more stats - -2006-09-15 10:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c: - - Fix stats. - -2006-09-15 10:03 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Add missing SessionReuse log entries - -2006-09-15 10:01 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Improve portability: Since all log strings are NUL terminated we do not - need to use REG_STARTEND any more. - -2006-09-15 09:54 phk - - * trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Allow session_grace to be set to zero - -2006-09-15 09:43 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/include/stat_field.h: - - Try to avoid sending EOF'ed or ready sessions to the herder. - -2006-09-15 08:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Add XXX comment - -2006-09-15 08:43 phk - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Print '-' if we don't have an IP# on startup. - - Also skip IP# from SessionReuse records. - -2006-09-15 08:14 des - - * trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Fix sendfile() on Linux: - - - use the correct headers - - don't duplicate WRK_Flush() - - pass the offset correctly - -2006-09-15 08:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Avoid parking a worker thread on trailing space - -2006-09-15 07:37 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/steps.h: - - If after handling a request we find anything in our input buffer, - don't waste time putting the session on the herder, but go right - back and take the next request in the current worker thread. - -2006-09-15 07:14 phk - - * trunk/varnish-cache/bin/varnishncsa/flint.lnt, - trunk/varnish-cache/bin/varnishncsa/flint.sh, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Overhaul NCSA logging. - - Reduce memory footprint by only allocating space for a fd first time - we see it. Few if any servers will ever see 64k fd's in use. - - Move the sbuf into the logline structure for simplicity. - - Access the logline structure through a pointer instead of indexing - the array all the time. - - Reduce amount of malloc/free traffic for performance. - - Use the "cooked" SHMlog api where the length, fd, etc are broken out - as arguments for us. Pass the FILE* where we want the stuff to - go as private data (stdout for now). - - Add FlexeLint files. - - Now over to Anders again... - -2006-09-13 21:26 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Fixed timestamp so thats it's correct. PHK added a new variable to - ReqEnd that contains a correct endtime. - -2006-09-13 20:43 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Add the end time as timestamp to the ReqEnd SHM record. - - Vector failures of the the FIRST case via DONE as well to - avoid code duplication. - -2006-09-13 19:07 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Dike out Linux senfile, it doesn't work. - - Isolated by: Xing Li - -2006-09-12 21:21 phk - - * trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Double the default workspace for the benefit of Blackberris and other - low-bandwidth devices which for some reason include their entire - lifehistory in the HTTP requests. - -2006-09-12 21:02 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Made the code more robust but fixing a bug that caused coredumps. - Haven't seen dumps after fix. - - Cleared some unused variables. - -2006-09-12 20:50 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Distinguish the explanation for the first request from the one used - on subsequent requests. - -2006-09-12 20:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Fix timestamps in shm tag StatSess for sessions with no requests. - -2006-09-12 20:06 phk - - * trunk/varnish-cache/bin/varnishd/mgt_param.c: - - chunksize is in kilobytes - -2006-09-12 19:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - There may be error returns from kevent, don't assert there are none. - -2006-09-12 10:12 des - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Implement sendfile() support for Linux. - -2006-09-12 09:38 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - fix typo - -2006-09-11 23:30 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Getting somewhere. I now have a "full" logline. Apart from writing - usernames caught by the auth header, the logline is complete. - I have now cleared up my obvious memoryleaks also. - - The code looks like it has been through a shredder, and needs massive - cleaning before alpha. - -2006-09-11 17:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - If we have more threads than the max, kill one if we can. - -2006-09-11 15:12 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - remember to close pipes - -2006-09-11 14:50 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Use a pipe for synchronization instead. - -2006-09-11 14:34 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Redo the worker thread pool locking a bit, all the while cursing - pthreads deficient API design for it's shortcomings. - -2006-09-11 12:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - Embellish the mutex debugging a bit - -2006-09-11 11:55 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/include/libvarnish.h: - - Move LOCK/UNLOCK macros to cache.h where they belong. - -2006-09-11 10:35 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - Ignore kevent error return entries - -2006-09-11 10:16 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - Only expire when the timer fires - -2006-09-11 10:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - Piggy-back kevent changes on kevent wait call - -2006-09-11 10:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Avoid a startup-race - -2006-09-11 09:35 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Cleaned up User-Agent and Referer. Both should now work correct. As - far as I can see, I only have the timestamp left for a sane loggline. - -2006-09-11 09:16 des - - * trunk/varnish-cache/configure.ac: - - Check for sendfile(). - -2006-09-11 09:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Reduce syscall footprint of expiry and hangman - -2006-09-11 09:05 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Avoid a clock_gettime() call - -2006-09-11 09:00 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - braino in last commit. - -2006-09-11 08:58 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - Save more time() calls - -2006-09-11 08:53 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - A avoid a time(NULL) call - -2006-09-11 08:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/include/stat_field.h: - - Do stats on sendfile/write split. - - Add param for minimum size of object before we will sendfile it. - -2006-09-10 22:23 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Started to fix output of User-Agent. It was all over the place. Found - what I was doing wrong and fixed it. - - Should work with correct User-Agent now. - -2006-09-08 06:47 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Make the fetchers chunksize a parameter, but keep the default at 128k - -2006-09-08 05:58 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Add an extra bucket and make it clear how the number was chosen. - - Remove extra sanitychecking. - -2006-09-07 10:14 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Missing commit message from previous commit: - - Fix a logic bug which allowed storage objects to be trampled on: - the last bucket may contain object smaller than we want. - -2006-09-07 10:12 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Handle zero length storage objects correctly: Don't let them exist. - -2006-09-07 08:25 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Insert a bunch of asserts to try to catch anything going wrong - -2006-09-07 08:01 phk - - * trunk/varnish-cache/include/libvarnish.h: - - Pick up uint32_t from instead of - -2006-09-07 07:50 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Logging for status & response was swapped for generated errors. - -2006-09-07 07:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Remove debugging messages. - -2006-09-07 07:27 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/include/stat_field.h: - - Add stats counters for large and small free fragments. - - Remove debugging - -2006-09-07 07:17 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - remove "age", it was effectively unused. Revisit the idea later. - -2006-09-07 07:12 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Don't clear alloc, it will be done in due time. - -2006-09-07 07:09 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Split the freelist by size. - - Use 32 buckets for now, with a 4k pagesize that takes us to 128k - which matches the fetchers default chunksize. - -2006-09-07 05:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - Remove debug entry - -2006-09-07 05:40 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - Read more than one session pointer at a time from the pipe and - handle them all with one kevent call. - -2006-09-06 22:09 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Don't use binary address anyway, we only want the IP number part - and splitting that out of the binary part is not worth the - trouble. - -2006-09-06 22:02 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Account for header bytes in error and 304 responses. - - Remove unhelpful debug entry. - -2006-09-06 21:52 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Move some setup code to first state now that we have it. - -2006-09-06 21:41 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_main.c: - - Move a bunch of work from the acceptor thread to the worker thread - for better scaling. - -2006-09-06 21:15 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/crc32.c: - - Move CRC32 into libvarnish - - Use it for hashing srcaddr as well. Hash the sockaddr instead - of the ascii representation. - - Add a primitive mutex tracking facility which writes debug - records to the shmlog if enabled. - -2006-09-06 20:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Give the stats summation its own mutex - -2006-09-06 19:35 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Reduce traffic on the wrk_mtx, saving some syscalls along the way: - - Make a thread-reaper-thread which examines the tail end of the queue - and kicks threads which are too old so the wake up and die. - - This allows us to assume that a thread on the free queue is always - waiting on its condvar, so we don't need to hold the mutex when we - signal the condvar. - - As a result, the woken thread stands a chance to grab the mutex - and a little song and dance between the two threads is avoided. - -2006-09-06 19:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Grab the r_recv timestamp at the right time. - -2006-09-06 18:47 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Don't bother with SO_NOSIGPIPE, it doesn't always work and we - have ignored the signal anyway. - -2006-09-06 18:46 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c: - - Remove unused timestamp "t0" and save a syscall per request. - -2006-09-06 18:37 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - Save a systemcall by using the same timestamp twice. - -2006-09-06 18:32 phk - - * trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Give pool threads 120 second timeout, 10 was close to silly. - -2006-09-06 18:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c: - - Fix the poll acceptor, we need to cache the fd as sp->fd might - change to -1 under us. - -2006-09-06 11:21 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Fix buglet in -i/-x name matching - -2006-09-06 10:45 phk - - * trunk/varnish-cache/lib/libvcl/vcc_priv.h: - - Allow '-' in identifiers. - - For further study: should we accept RFC2616's definition of "token" ? - -2006-09-06 09:58 phk - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Mark responses with Set-Cookie as "pass" - -2006-09-06 09:54 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - Add support for inspecting response headers. - -2006-09-06 09:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c: - - Fix the same issue as in the kqueue acceptor: By the time we get - here the filedescriptor may already be closed, so accept EBADF. - - Reported by: Xing Li - -2006-09-06 07:37 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Fix a bug in chunked fetching: - - With very short chunks, in this case 3 characters, our buffer may - contain not only the chunk length and the chunk data, but also the - next chunk length. - - If the short chunk is the last chunk before the zero length chunk - at the end, unconditionally trying to fill the buffer before parsing - the length may hang because we already have everything there is to - have in the buffer. - - The fix is to always try to parse the buffer before adding to it. - - While here, tighten up and improve error checks of the code. - - Reported by: Xing Li - -2006-09-06 06:39 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - escape control characters in SLT_Debug as %XX - -2006-09-05 22:11 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Added more outputdata, fixed memory leaks (I think). - - Code still not Alpha ready, but I think most concepts work now. - -2006-08-24 07:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Go through all asserts and mark those which indicate missing code with - xxx or XXX. - -2006-08-24 07:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/include/libvarnish.h: - - Introduce LOCK() and UNLOCK() macros which does the right thing - with pthread_mutex_{lock,unlock}() - -2006-08-24 07:10 phk - - * trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/assert.c: - - Give xxxasserts their own backend with a different message. - -2006-08-24 06:58 phk - - * trunk/varnish-cache/include/libvarnish.h: - - Split assert into "static check" and "missing code" variants. - - The "missing code" variants have xxx prefix - - Introduce AN() (assert non-null) variant as well. - -2006-08-24 06:15 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - This is a workaround for what is probably a race in FreeBSD RELENG_6 - socket dismantling. - - There is no way that close(2) should ever be able to return EINVAL, - but we've seen it. - - Specifically assert on EBADF which is the check we're really after. - -2006-08-23 14:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Handle backend failure in pass mode - -2006-08-23 13:11 phk - - * trunk/varnish-cache/lib/libvarnishapi/varnish_debug.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_log.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_util.c: - - These are not used. - -2006-08-23 12:10 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - don't service cached objects the last second of their lifetime. - -2006-08-23 11:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Set response timestamp when we emit an error. - -2006-08-23 11:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Implement error in miss also - -2006-08-23 07:32 phk - - * trunk/varnish-cache/lib/libvcl/vcc_compile.c: - - unused variable. - -2006-08-23 07:30 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Handle backend connection error in pass mode with a 503 - -2006-08-23 07:29 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Fill shmem log with the reply - -2006-08-23 07:22 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - grammar police. - -2006-08-23 07:16 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: - - Teach RES_Error() about the canonical response code texts from - RFC2616. - - Add the XID as "guru meditation" in the error HTML. - -2006-08-23 06:55 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Move defaults from varnishd.c to mgt_param.c and use regular functions - for setting them. - - Collapse all the 'timeout' functions. - - Add pipe_timeout parameter. - -2006-08-23 06:53 phk - - * trunk/varnish-cache/lib/libvarnish/cli_common.c: - - If CLI is NULL, use stdout. - -2006-08-22 19:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Implement "error" in vcl_hit() - -2006-08-22 10:56 phk - - * trunk/varnish-cache/bin/varnishhist/varnishhist.c: - - Redraw must be checked when we update, we cannot trust - that we will actually have a timeout. - -2006-08-22 10:46 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Optimize shmlog writing: - - If we know the record length, only hold the mutex while we reserve - the space. Until we change the first byte, nothing bad can happen. - - XXX: a memory barrier is strictly speaking necessary before we assign - the first byte. - - If there are no '%' in the format string, treat as fixed length for - speed. - -2006-08-22 10:40 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Consistent naming of mutex - -2006-08-22 10:14 des - - * trunk/varnish-cache/bin/varnishhist/varnishhist.c: - - Allow the delay between screen updates to be specified with -w. - -2006-08-22 09:37 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Correct the error check for write(). - -2006-08-22 09:31 des - - * trunk/varnish-cache/lib/libcompat/strndup.c: - - Slight optimization: use strlcpy() to avoid calloc(). - -2006-08-22 09:30 phk - - * trunk/varnish-cache/bin/varnishhist/varnishhist.c: - - Swap the '|' and '#' symbols so '#' means "miss", that's much more - graphically useful. - -2006-08-22 09:16 phk - - * trunk/varnish-cache/bin/varnishhist/varnishhist.c: - - Use different marks for hit & miss - - Autoscale vertical axis. - -2006-08-22 08:55 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Eliminate the MD5 optional code. There is no sufficiently strong - statistical basis for using MD5 that will outweigh the performance - penalty or "IT USES THE BR0K3N MD5 ALGORITM" cries on slashdot. - - The only known artifact in CRC32 is that hashing it with a power - of two is slightly inefficient (a few percent in bucket length - standard deviation) if you have URLs with fixed width fields of - a limited charset (such as numeric) fields in them. - - Avoid this by checking the hash width specified for power of two, - and reduce it by one telling the user why. - - Using a hash width that is a prime number does provable advantage - over just not using power-of-two width. I have heard a mathematician - say that this is inherent in the design of the polynomia chosen - for CRC algorithms error (optimized for bit error detection) but - the actual math is way beyond me. - - Increase default hash width to 16383, which is probably still - smaller than it should be. - -2006-08-22 08:18 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/bin/varnishtester/varnishtester.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvarnish/assert.c, - trunk/varnish-cache/lib/libvarnish/cli_common.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Expand keywords. - -2006-08-22 08:17 des - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Allow an empty address if a port is specified; thus ":80" is a valid - listening address ("port 80 on all interfaces") - -2006-08-22 08:06 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Additional marginal improvement: - - Sort on length of key, then on digest. - -2006-08-22 07:52 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Rework the classic hasher to reduce lock contention and CPU usage. - - Make nbuckets=nhash mandatory. - - Order hash lists by the length of key instead of the key contents, - comparing the length is much faster. - - Also compare disgest before we take the expensive content compare. - - Use memcmp() for content compare instead of strcmp(). - - Use a two-pass algorithm for inserts to lower mutex contention. - -2006-08-22 07:24 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am: - - Add cache_acceptor.h to noinst_HEADERS. - -2006-08-22 07:11 des - - * trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat/strndup.h, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/strndup.c: - - Add strndup() to libcompat. - -2006-08-21 20:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Flexelint inpired cleanups - -2006-08-21 20:30 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Give VBE_ClosedFd() an argument to tell if the fd has already - been closed. - - Pipe does this and would panic otherwise. - -2006-08-21 20:25 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c: - - Fix these two up to current standard. - - Poll is tested, epoll isn't. - - While the three implementations share a lot of identical code - right now, I will wait a bit before unifying more of them, at - least until performance proves that this is the right way for - kqueue. - - XXX: they're really not acceptors any more, they're herders. - -2006-08-21 20:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Make it easier to experiement with acceptors by having a single - pointer to the one in use. - -2006-08-21 20:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - Remove unused #includes - -2006-08-21 19:05 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Add asserts. - - Return if we pass on directly. - -2006-08-21 18:55 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - Overhaul kqueue acceptor in light of todays learnings. - - Use the pipe trick to inject sessions into the system, as far as I - can tell it is cheaper because of the low rate it happens and the - high rate of mutex operations avoided. - - Ignore the timer event, but purge the list every time we wake up - to reduce lumpyness of timeout'ing. - - Centralize the polling of a session so we don't have the same two - messages spread out all over the place. - - Centralize the acceptor thread and send things directly to the worker - thread, leaving only the session-herder in the split out files. - - poll & epoll not yet updated accordingly. - -2006-08-21 17:49 phk - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Bandaid until Dag Erling does what's necessary - -2006-08-21 17:32 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Retire sessions if the workspace size changes, properly cache the - workspace size so we do not get caught unaware when it changes. - - Implement flip-flop free queue where SES_New() can read from - one of them without a lock, which frees happen to the other one - under lock. If the lock-less queue is empty, SES_New() flips - the two queues under lock and tries again. If that queue is - also empty call malloc(3). - -2006-08-21 17:26 des - - * trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Rename open_tcp() to TCP_open() and modify it to open only one socket of - the appropriate type for the address that was passed in. - - Introduce TCP_parse(), which extracts an address and port from a string of - the form "hostname:port", "i.p.v.4:port" or "[i:p:v:6]:port" (where "port" - can be either a decimal number or a service name). - - Use TCP_parse() to parse the argument to -a (listen address), -b (backend - address) and -T (telnet address). Eliminate -p (listen port). - - While there, rename a bunch of "fooflag" variables which aren't flags to - "foo_arg". - -2006-08-21 13:15 phk - - * trunk/varnish-cache/include/stat_field.h: - - Add n_sess_mem - -2006-08-21 13:15 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Increase client hash to 1k - - Cache used sessmem chunks on a private list and recycle from there, - no point in bothering malloc all the time. - -2006-08-21 12:57 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - When writing to a file, open it with O_APPEND rather than O_TRUNC. - -2006-08-21 12:55 des - - * trunk/varnish-cache/bin/varnishhist/Makefile.am, - trunk/varnish-cache/bin/varnishhist/varnishhist.c: - - Set properties. - -2006-08-21 12:54 des - - * trunk/varnish-cache/bin/varnishhist: - - Set properties. - -2006-08-21 12:12 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/steps.h: - - Create the possiblity for the the acceptor to send the session directly - to the workerpool instead of taking the detour around the session-herder. - - This saves a context switch and is presumabley a good idea because the - majority of sessions will have requst already in the pipeline. - - For accept filters it makes even more sense because we know this to - be the case. - -2006-08-21 11:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: - - Split the accepting and session-herding functionality into two threads, - this is totally free from a locking point of view, but will cost - in context switches. - -2006-08-21 11:11 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.h: - - Add file - -2006-08-21 11:05 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c: - - various cleanups. - -2006-08-21 10:59 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, - trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c: - - Break the acceptors out into their own files. - - The intent here is to compile in all acceptors supported on the - operating system and allow the user to select one at startup time. - -2006-08-21 09:51 phk - - * trunk/varnish-cache/bin/varnishhist/varnishhist.c: - - Adjusments to scale. - - Refresh 1/sec max - - Put more in the rolling buffer. - -2006-08-21 09:49 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Don't hose TIMER kevent with READ kevent - -2006-08-21 09:49 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - This assert is not warranted, a connection might disappear before - we get to it. - -2006-08-20 19:55 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Close another tiny race. - -2006-08-20 18:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Give the kevent acceptor another overhaul. - - On a number of fine points the kevent API behaves different from - what I would have expected. - - For instance EV_DISABLE/EV_ENABLE on a timer does not reset the - timer. - - This is a very defensive version and if that works, it can be optimized - some more. - -2006-08-20 16:35 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Heavy-duty work on kqueue acceptor. - -2006-08-20 16:35 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Add some debugging - -2006-08-20 16:34 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Remove unused variable. - -2006-08-20 15:12 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Use TxHeader for pipe backend. - -2006-08-20 15:12 phk - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Don't chat up non-running childs. - -2006-08-20 15:11 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Make sure the returns have some value. - -2006-08-20 15:11 phk - - * trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Assert that the cli status is valid - -2006-08-20 14:53 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - pid -1 is not our child - -2006-08-20 14:53 phk - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Fix malloc bug. - -2006-08-20 13:39 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - New defaults: - 5 sec session timeout - 60 sec thread pool timeout - -2006-08-20 13:38 phk - - * trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Make autostart a tweakable parameter, this is useful for debugging - -2006-08-20 12:15 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Pull out up to 20 kevents at time instead of just one. - -2006-08-20 11:19 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Respect lower pool limit dynamically - -2006-08-20 07:32 phk - - * trunk/varnish-cache/bin/varnishhist/varnishhist.c: - - Remember to open the shmlog - -2006-08-20 07:27 phk - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishhist, - trunk/varnish-cache/bin/varnishhist/Makefile.am, - trunk/varnish-cache/bin/varnishhist/varnishhist.c, - trunk/varnish-cache/configure.ac: - - Add varnishhist(1) a program that shows the responsetime as a curses - histogram. - -2006-08-20 07:27 phk - - * trunk/varnish-cache/bin/varnishd/mgt_param.c: - - Add note that send_timeout has DELAYED effect - -2006-08-20 07:26 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Make sure we have predictable column numbers by printing '-' if it - is neither classified as client or backend. - -2006-08-19 21:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Make the session timeout and send timeout tweakables. - -2006-08-19 21:32 phk - - * trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/include/cli.h: - - Implement the first load of tweable parameters - -2006-08-19 20:28 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_param.c, - trunk/varnish-cache/include/cli.h: - - Add two new CLI commands: param.set and param.show. - - Eliminate requirement that "help" be first, I was just lazy I guess. - -2006-08-19 20:16 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - cleanup - -2006-08-19 20:15 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - We have a number of adjustable parameters, things like "default TTL" which - should be adjustable at runtime. - - We need to make adjustments in such a way that a restart of the child also - uses the new paramters. - - We can either do this by parsing the CLI in both mgt+child and have both - update their private copy, or we can parse it only in one of them and - update a shared copy. - - We opt for the latter method. - - Add a "struct params" which holds the adjustable parameters and put on - in the shmlog segment, between struct shmloghead and the round-robin - buffer. - - Move parameters from heritage to params. - - We put it there without exposing it in struct shmloghead which is - the public view of the shared memory because we do not want to make - it a public API or even to tempt people to think that it is one. - - Now I just need to add the CLI functions to actually twiddle the - parameters. - -2006-08-19 19:46 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Don't re-mmap the shmlog in the child, we already did it in the management - process and the inherited copy is perfectly fine to use. - -2006-08-18 20:07 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Respect and clear TAG also on flush - -2006-08-18 19:53 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Do a better job on Connection: header processing in client requests. - - Add a flag field for each HTTP header and define a bit HDF_FILTER - to mean "filter this out", and initialize to zero all relevant - places. - - If HDF_FILTER is set, do not copy the header across when filtering. - - Run through Connection: header (if present) and set HDF_FILTER on - any header that matches a word in the contents. - - If we are not HTTP/1.1 and have no Connection header, we close - the session when this reqest is done. - - If we have a Connection header, we respect that. - -2006-08-18 19:10 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Set REG_NOSUB for speed - -2006-08-18 18:16 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Remember to clear match bit - -2006-08-18 18:14 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Make it possible to select which requests we want to see in - ordered mode. For instance - ./varnishlog -o rxurl foo - will only show requests that match the regexp "foo" on the rxurl field - -2006-08-18 18:00 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Turn the "invcl" array into a flag array so we can put more stuff there. - -2006-08-18 16:04 phk - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Deeper listenqueue for HTTP sockets - -2006-08-15 10:38 des - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Correct inverted test in If-Modified-Since logic. This should fix the - "stale front page" problem that has plagued VG. - -2006-08-15 10:36 des - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Fix a bug in previous commit: an extra CR LF was inserted after the Date - header in a 304 response. - -2006-08-15 07:55 des - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Better 304 responses: include a Date header, and send the correct - Last-Modified value. - -2006-08-13 11:38 des - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: - - Implement the "error" VCL keyword: - - - add fields to struct sess where VRT_error can store the error code and - message - - modify cnt_error() to pass these fields to RES_Error(), then clear them - - modify RES_Error() (and the entire chain) to accept a third argument - giving an explanation of the error. - - have RES_Error() reset the worker before writing the error document, to - make sure wfd is set. - - fixes: #4 - -2006-08-11 20:47 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - When -b and -c given, supress "other" messages. - -2006-08-11 20:46 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - fix formatting glitches in -o mode - -2006-08-11 20:43 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Also mark as client on ReqStart - -2006-08-11 20:34 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Make lack of -d option work as expected. - -2006-08-11 20:28 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Drop the -h option, it never really worked out. - - Use the new libvarnishapi facilities to structure code better. - -2006-08-11 20:24 phk - - * trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Improve the shmlog facilities. - - Move the sleeping and timing out into the library so we do not - have to repeat it in all apps. Should we ever find an app - that needs something else, we will cater for it then. - - Add VSL_Dispatch() which calls a (supplied) function (pointer) for each - record. Additional useful information is passed as arguments, such - as classification (backend/client/other) etc. - - Add a default handler for printing a record. - - Add VSL_Select() where the application can specify tags that are mandatory - and which should not be subject to -i/-x/-I/-X/-b/-c filtering. - - Be more frugal with memory. - -2006-08-11 14:45 des - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Dirty hack: strip the leading "::ffff:" from v4-to-v6-mapped addresses. - -2006-08-11 14:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt_re.c: - - Assert regexp != NULL - -2006-08-11 14:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt_re.c: - - A NULL pointer does not match a regexp - -2006-08-11 14:09 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Use 1:1 for hashbucket:mutex ratio - -2006-08-11 13:41 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add -T option. - -2006-08-11 11:23 phk - - * trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h: - - Use the already decoded CSTR where applicable and use - EncString() to encode strings for C source usage. - -2006-08-11 11:22 phk - - * trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Until we know of a legitimate use for them, consider non !isgraph() - %xx escapes an error. - -2006-08-11 10:47 phk - - * trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Don't recognize '\' as magic in CSTR tokens, use %xx escapes instead. - - Add decoded string element to struct token. - -2006-08-11 10:20 phk - - * trunk/varnish-cache/lib/libvcl/flint.lnt: - - Improve flexelint setup - -2006-08-11 10:17 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - More meat, and even more debug code. I am free()'ing stuff that does - not exsist. - - Strugling with the pointers and strings, since they obviously are - "bleeding" from one to another. - I take that as a clear sign of not allocating and freeing right. - -2006-08-11 08:41 des - - * trunk/varnish-cache/ChangeLog: - - Regenerate. - -2006-08-11 08:40 des - - * trunk/varnish-cache/svn2cl.xsl: - - Widen left and right margins, and add a blank line between the paths and - the message. - -2006-08-11 08:35 des - - * trunk/varnish-cache/svn2cl.xsl: - - Print the message separately from the paths to avoid strange wrapping. - -2006-08-11 08:34 des - - * trunk/varnish-cache/svn2cl.xsl: - - This is the XSL stylesheet used to generate the ChangeLog. - -2006-08-11 08:25 des - - * trunk/varnish-cache/Makefile.am: - - Include LICENSE and autogen.sh in the dist tarball. - -2006-08-11 08:25 des - - * trunk/varnish-cache/lib/libcompat/Makefile.am: - - Don't install libcompat.a. - -2006-08-11 08:24 des - - * trunk/varnish-cache/INSTALL, trunk/varnish-cache/README: - - Add a README and installation instructions. - -2006-08-11 07:35 phk - - * trunk/varnish-cache/include/http_headers.h: - - Don't filter Cache-Control out in replies from backend. - -2006-08-11 07:35 phk - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Fix protocol family selection logic to also work on - a FreeBSD machine with now IPv6. - - Remember to also free the addrinfo in case of success. - -2006-08-11 07:33 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Bail if we don't get a listening socket. - -2006-08-11 07:12 phk - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Missed one: Only include compat headers if necessary - -2006-08-11 07:11 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/flint.sh, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Pull in ../../config.h when running flexelint. - - Only include compat headers if we need them. - -2006-08-11 07:03 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Fix indentation - -2006-08-11 07:02 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Remove unused variable. - -2006-08-11 07:01 phk - - * trunk/varnish-cache/bin/varnishd/flint.sh: - - Point at KQUEUE version of acceptor by default. - -2006-08-11 07:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Fix an assert so it actually has a chance of firing: (an unsigned is - always >= 0) - -2006-08-10 13:03 des - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Rewrite pass_chunked(). - -2006-08-10 11:48 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Got the requesttime right this time. - - I am noticing free()'s that are freeing empty variables/pointers. Have - to find where is happens. - Also noticing IP adresses not set correctly. - - Still load of debugcode. - -2006-08-10 11:10 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Updated to work with new inner workings (ReqStart, ReqEnd, sbuf - replacement etc). - - Code now compiles. - -2006-08-10 08:56 des - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - FreeBSD needs for IPPROTO_IPV6 and IPV6_V6ONLY. - -2006-08-10 07:38 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Added some more meat to the program. Loads of debug code still on. - - Next step is to add the correct time. It's a bit tricky, and I haven't - gotten it right just yet. - -2006-08-09 14:49 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/configure.ac: - - Add an epoll()-based acceptor for Linux 2.6. Simple empirical tests - indicate - that epoll() performs significantly better than poll() (less CPU usage). - -2006-08-09 12:38 des - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Clear reference to backend when we release our VCL reference. - -2006-08-09 11:24 des - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - Add support for using separate backends for separate virtual hosts: - - - remove the obj.backend variable, which is not connected to anything. - - define a req.backend variable and implement l/r functions for it - - complete / correct support for setting / comparing backend values - -2006-08-09 11:22 des - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Cosmetic: redefine HTTP_HDR_* as an enum and rename MAX_HTTP_HDRS to - HTTP_HDR_MAX. - -2006-08-09 09:36 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Rewrite open_tcp(): use only one listening socket. Try for a combined - IPv6 / IPv4 socket; if IPv6 is not available, fall back to an IPv4 socket. - -2006-08-08 14:52 des - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - While FreeBSD defaults to MAP_SHARED, Linux requires either MAP_SHARED or - MAP_PRIVATE to be specified. Do so. - -2006-08-08 14:00 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/configure.ac: - - Autodetect the need to link against libdl for dlopen(). - -2006-08-08 12:57 des - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat/setproctitle.h, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/setproctitle.c: - - Add a setproctitle() stub to libcompat. - -2006-08-08 12:57 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - #include "compat/srandomdev.h" for srandomdev() - -2006-08-08 12:55 des - - * trunk/varnish-cache/include/compat/vis.h, - trunk/varnish-cache/lib/libcompat/vis.c: - - Expand keywords. - -2006-08-08 12:46 des - - * trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/configure.ac: - - #include for fstatfs if it is available. - -2006-08-08 12:45 des - - * trunk/varnish-cache/configure.ac: - - Now that we define _GNU_SOURCE, the asprintf() / vasprintf() hack is no - longer required. - -2006-08-08 12:42 des - - * trunk/varnish-cache/configure.ac: - - Defining _GNU_SOURCE gives us native asprintf() and strptime() on glibc - systems, and has no effect on FreeBSD. - -2006-08-08 12:31 des - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishtop/Makefile.am, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat/vis.h, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/vis.c: - - Bring in FreeBSD's version of vis(3), strvis(3) and strvisx(3). - -2006-08-08 12:15 des - - * trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat/srandomdev.h, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/srandomdev.c: - - Add a simple srandomdev() implementation inspired by the one in FreeBSD. - -2006-08-08 09:15 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - The correct header for poll() is , not like the Linux - man page says (poll() is an XSI extension in SUSv[23]) - -2006-08-08 07:47 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/configure.ac: - - Autodetect the availability of kqueue() and / or poll(). - -2006-08-08 07:47 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - #include "libvarnish.h" for varnish_version(). - -2006-08-08 07:36 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add back sendfile support (under #ifdef HAVE_SENDFILE) but don't engage - it for small objects on the suspicion that it has highish setup cost. - -2006-08-08 07:17 des - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat, - trunk/varnish-cache/include/compat.h, - trunk/varnish-cache/include/compat/asprintf.h, - trunk/varnish-cache/include/compat/strlcat.h, - trunk/varnish-cache/include/compat/strlcpy.h, - trunk/varnish-cache/include/compat/vasprintf.h, - trunk/varnish-cache/lib/libcompat/asprintf.c, - trunk/varnish-cache/lib/libcompat/strlcat.c, - trunk/varnish-cache/lib/libcompat/strlcpy.c, - trunk/varnish-cache/lib/libcompat/vasprintf.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c: - - Split compat.h into one header per function to avoid issues with e.g. the - vasprintf() prototype needing even when it isn't used. - -2006-08-08 07:15 des - - * trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishstat/Makefile.am: - - varnish{ncsa,stat} also need librt. - -2006-08-08 07:03 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/configure.ac: - - Attempt to detect the availability of RSA's MD5 implementation, and the - need to link against libmd to get it. - Attempt to detect the need for linking against librt to get - clock_gettime(). - -2006-08-08 07:01 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Fix braino - -2006-08-08 06:39 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Default to 4096 buckets and 256 mutexes - -2006-08-08 06:38 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Use crc32 hash by default, MD5 is a compile time option - -2006-08-08 06:37 phk - - * trunk/varnish-cache/bin/varnishd/flint.lnt: - - lbv_assert never returns - -2006-08-07 21:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - 64bit changes - -2006-08-07 21:01 phk - - * trunk/varnish-cache/configure.ac: - - Add -Wformat and remove -fno-inline which disables it. - -2006-08-07 21:01 phk - - * trunk/varnish-cache/lib/libvarnish/assert.c: - - Fix printf format error - -2006-08-07 20:50 phk - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/configure.ac: - - Update to new shmlog tag - -2006-08-07 20:47 phk - - * trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Eliminate use of extensible printf - -2006-08-07 20:24 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Improve the "-d" and "-d -d" facilities. - - When we close a CLI and it had fd# 0 and/or fd#1, reopen these - as /dev/null so the will not be reused for the CLI pipe to the - child on next restart, otherwise stdout/stderr output from the - manager would get sent there and confuse the clients CLI reader. - - Don't double free a pointer to the CLI buffer. - - Accept non-zero results from cli_readres() errors are non-fatal. - - Use stderr more consistently for manager debugging. - -2006-08-07 18:33 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - An assert to catch silly errors. - -2006-08-07 17:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Rename SHMlog tags for consistency - XID -> ReqStart - ReqServTime -> ReqEnd - -2006-08-07 17:18 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Remove printf extensions used for development debugging - -2006-08-07 17:18 phk - - * trunk/varnish-cache/include/libvarnish.h: - - Make assert do the right thing - -2006-08-07 17:15 phk - - * trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Clean up #includes - -2006-08-07 17:10 phk - - * trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/assert.c: - - Call __assert() lbv_assert() instead. - -2006-08-07 17:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/lib/libvarnish/assert.c: - - quench warnings related to libvarnish.h - -2006-08-07 16:45 des - - * trunk/varnish-cache/configure.ac: - - Don't trust the documentation - when it says "additional headers", it - actually means "additional code to place before main() in the test program" - -2006-08-07 16:42 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishtester/varnishtester.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/assert.c: - - Add our own assert in libvarnish.h - - Include libvarnish.h from cache.h and mgt.h - -2006-08-07 16:29 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - #include "libvarnish.h" for varnish_version(). - -2006-08-07 16:26 des - - * trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c: - - #include "compat.h" for asprintf(). - -2006-08-07 16:24 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - vsb.h is not a system header. - -2006-08-07 16:23 des - - * trunk/varnish-cache/bin/varnishtop/varnishtop.c: - - #include "libvarnish.h" for varnish_version(). - -2006-08-07 16:23 des - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - #include "compat.h" for asprintf(). Sort includes. - -2006-08-07 16:20 des - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Define INFTIM if it isn't already. - -2006-08-07 16:20 des - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Spell SIZE_MAX correctly. - -2006-08-07 16:17 des - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - Define INFTIM if it isn't already. - -2006-08-07 16:17 des - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - #include for asprintf(). - -2006-08-07 16:15 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Handle CLI trouble with the childproc - -2006-08-07 16:14 phk - - * trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Add CLIS_COMMS errno (400) and return an error text as well. - -2006-08-07 16:11 des - - * trunk/varnish-cache/bin/varnishd/tcp.c, trunk/varnish-cache/configure.ac: - - Check whether we have accept filters before trying to use them. - -2006-08-07 16:05 phk - - * trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Handle read errors on the cli pipes. - -2006-08-07 15:54 des - - * trunk/varnish-cache/configure.ac: - - Improve descriptions of HAVE_ASPRINTF / HAVE_VASPRINTF. - -2006-08-07 15:54 phk - - * trunk/varnish-cache/lib/libvarnish/vsb.c: - - Quench warnings. - -2006-08-07 15:51 des - - * trunk/varnish-cache/include/compat.h, - trunk/varnish-cache/lib/libcompat/vasprintf.c: - - My idiocy knows no bounds. Make sure this actually builds. - -2006-08-07 15:47 des - - * trunk/varnish-cache/configure.ac: - - Improve detection of the presence and usability of asprintf() / - vasprintf(). - -2006-08-07 15:42 des - - * trunk/varnish-cache/include/compat.h: - - paste-o. - -2006-08-07 15:24 des - - * trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/compat.h, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/asprintf.c, - trunk/varnish-cache/lib/libcompat/strlcat.c, - trunk/varnish-cache/lib/libcompat/strlcpy.c, - trunk/varnish-cache/lib/libcompat/vasprintf.c: - - Add implementations of asprintf(3) and vasprintf(3). - -2006-08-07 15:09 des - - * trunk/varnish-cache/include/libvarnish.h: - - Relucantly include for time_t. We'll have to clean up our header - files at some point. - -2006-08-07 15:08 des - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Remove redundant definition of __assert(). - -2006-08-07 15:00 des - - * trunk/varnish-cache/include/libvarnish.h: - - TIM_{format,parse}() are used unconditionally, so declare them - unconditionally. - -2006-08-07 15:00 des - - * trunk/varnish-cache/bin/varnishd/cache.h: - - Sort includes, add for uint64_t. - -2006-08-07 14:55 des - - * trunk/varnish-cache/lib/libvcl/vcc_compile.c: - - Eliminate __unused. - -2006-08-07 14:52 des - - * trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Sort includes, add for uintptr_t. - -2006-08-07 12:42 des - - * trunk/varnish-cache/lib/libvarnish/vsb.3: - - Define str-Lb-libvarnish so ".Lb libvarnish" will work. This should be in - a shared file somewhere with some soelim magic in the Makefile, but don't - bother right now - the file isn't installed anyway. - -2006-08-07 12:35 des - - * trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/version.c: - - Add a -V option (display version and exit) to all programs. - -2006-08-07 11:09 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/bin/varnishtop/Makefile.am, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/cli_common.h, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/include/sbuf.h, trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vsb.h, - trunk/varnish-cache/lib/Makefile.am, trunk/varnish-cache/lib/libsbuf, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/cli_common.c, - trunk/varnish-cache/lib/libvarnish/vsb.3, - trunk/varnish-cache/lib/libvarnish/vsb.c, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Fold libsbuf into libvarnish, with s/sbuf/vsb/g. - -2006-08-07 10:46 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Timeout pipe connections after 600 seconds. - -2006-08-07 10:40 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Use a 600 second timeout, 120 second is too little. - -2006-08-07 09:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Set SO_SNDTIMEO to 120 seconds - -2006-08-07 08:42 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - First step of slow client handling: Lose the stevedore function - for sending and instead record the fd+off_t in the storage object. - - This eliminates sendfile from storage_file.c, next step is to put - it back in the generic code in cache_response.c - -2006-08-07 05:52 des - - * trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Update #include directives. - -2006-08-07 05:49 des - - * trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/miniobj.h, - trunk/varnish-cache/include/stats.h, - trunk/varnish-cache/include/varnish/assert.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/binary_heap.c, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvarnish/time.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_debug.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_log.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_util.c: - - Expand keywords. - -2006-08-07 05:49 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/cli_common.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/cli_common.c: - - Move common_cli.[ch] out of varnishd, and rename them to cli_common.[ch]. - -2006-08-07 05:47 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am: - - List headers in noinst_HEADERS instead of SOURCES. - -2006-08-07 00:21 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Fresh start after study of output from varnishlog -o. - - First off is IP adress logging and clearing. - -2006-08-06 17:00 des - - * trunk/varnish-cache: - - Add compile to svn:ignore. - -2006-08-06 16:55 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Make - -w - - work as expected. - -2006-08-06 15:02 des - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishtester/Makefile.am, - trunk/varnish-cache/bin/varnishtop/Makefile.am, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libsbuf/Makefile.am, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am, - trunk/varnish-cache/lib/libvcl/Makefile.am: - - Systematically include config.h. - -2006-08-06 14:33 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am: - - Forcibly include config.h. - -2006-08-06 13:51 des - - * trunk/varnish-cache/configure.ac: - - Change version to "trunk" until I can figure out a way to have it reflect - the current date. - -2006-08-06 13:49 des - - * trunk/varnish-cache/configure.ac: - - Include -pipe in CFLAGS. - Reduce optimization level to -O when debugging. - -2006-08-06 12:51 des - - * trunk/varnish-cache: - - Adjust directory properties. - -2006-08-06 12:49 des - - * trunk/varnish-cache/bin/varnishlog, - trunk/varnish-cache/bin/varnishncsa, - trunk/varnish-cache/bin/varnishstat, - trunk/varnish-cache/bin/varnishtester, - trunk/varnish-cache/bin/varnishtop, trunk/varnish-cache/lib/libcompat, - trunk/varnish-cache/lib/libsbuf, trunk/varnish-cache/lib/libvcl: - - Adjust directory properties. - -2006-08-06 12:26 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishstat/Makefile.am: - - Add missing headers and man pages. - -2006-08-06 12:26 des - - * trunk/varnish-cache/autogen.sh: - - We no longer have any CONFIG_SUBDIRS. - -2006-08-06 12:25 des - - * trunk/varnish-cache/include/Makefile.am: - - Add missing headers. - -2006-08-06 12:23 des - - * trunk/varnish-cache/Makefile.am: - - Umm, *really* retire libevent. - -2006-08-06 12:23 des - - * trunk/varnish-cache/Makefile.am, trunk/varnish-cache/configure.ac, - trunk/varnish-cache/contrib: - - Retire libevent. - -2006-08-06 12:20 des - - * trunk/varnish-cache/bin/Makefile.am, trunk/varnish-cache/configure.ac: - - Fully disconnect varnishtester. - -2006-08-06 00:44 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - I have realized that I have major structure problems. I will have to - study varnishlog output a bit more to understand it better. - - May wanna start clean again, and use hardearned knowledge to make - better and more robust structure. - -2006-08-05 22:43 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Checks show that my IP adress checker is very restrictive and probably - deletes other loglines. We still bleeds null lines also. - - This will have to be cleaned up. - -2006-08-05 22:12 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Loglines with no IP should no longer appear. That also cleared all - lines containing a null. Not sure if my check for IP is to harsly - implemented and cleans to much. - -2006-08-05 21:35 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Centralized the stringwriting at last, also started memory cleanup. - -2006-08-05 21:11 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Added user, loginname, statuscode (200, 304 etc.), byte and referer to - make a logline compliant. User and loginname is hardcoded. Referer and - User-agen is unclean. Timecode is not working. This version leaks - memory bigtime, and is not ready for alpha yet. - -2006-08-05 20:52 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - For consistency: Go to deliver state instead of delivering locally. - -2006-08-05 18:11 phk - - * trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: - - Make vcl methods call their defaults as a last resort. - - Fix the location table so it knows about the default code too. - -2006-08-05 17:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - And that is not a good idea either. - -2006-08-05 17:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - This was not a valid test. - -2006-08-05 17:04 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Add some undocumented code to look for something that worries me. - -2006-08-05 16:41 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Issue error message for CLI::start and CLI::stop if child is - not in a legal state for command. - -2006-08-05 16:32 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Also trap SIGTERM - -2006-08-05 16:31 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - More work on the debug stunt - -2006-08-05 15:55 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Plug memory leaks related to starting/stopping child. - -2006-08-05 15:40 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Replace client_should_run with a 5 state enum to avoid races if multiple - CLI sources yell at the same time. - -2006-08-05 15:38 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Bail if the cli pipe is not ready - -2006-08-05 15:38 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Polish the debugstunt and make it possible to avoid it. - -2006-08-05 15:35 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - We don't disturb ourselves. - -2006-08-05 14:24 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - More defensive coding and a couple of bugs less. - -2006-08-05 14:22 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - More defensive coding. - -2006-08-05 12:45 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Add a timeout to reads from the child CLI pipe so we don't hang - for ever. - -2006-08-05 12:24 phk - - * trunk/varnish-cache/bin/varnishd/flint.lnt: - - Improve. - -2006-08-05 12:24 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Style cleanup. - - remove two unused variables. - -2006-08-05 12:24 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Remove unused include - - Fix function arg type - -2006-08-05 12:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Make sanity check of binheap permanent and fix style accordingly. - -2006-08-05 12:23 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.c: - - Remove unused include - - free buffer on error. - -2006-08-05 12:22 phk - - * trunk/varnish-cache/bin/varnishd/cache_cli.c: - - Make sure we don't overflow the line buffer - - Remove unused #include - -2006-08-05 12:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Remove unused "ip" from backend. - - Make VCL_Load static, and give it a NULL check. - -2006-08-05 12:19 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.h: - - Cleanup unused stuff - -2006-08-05 12:19 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h: - - Remove prototypes for no longer existing functions - -2006-08-05 12:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Remove unused includes - -2006-08-05 12:17 phk - - * trunk/varnish-cache/bin/varnishd/flint.sh: - - don't search libevent for includes - -2006-08-05 12:17 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - style fix - -2006-08-05 12:16 phk - - * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Rename struct vcls to vclprog - -2006-08-05 11:44 phk - - * trunk/varnish-cache/bin/varnishd/cli_common.c: - - remove old file - -2006-08-05 11:16 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Change manager to use mgt_event.h instead of threads to be lazy thread - developer compatible. - - POSIX, no surprise, doesn't really tell what should happen to a threaded - process which forks and consequently implemenations vary somewhat, - from Solaris which seems to Do The Right Thing, via Linux where it - works "most of the time" and to FreeBSD which more or less actively - sabotages any such attempt. - - Grin and live with it... - -2006-08-05 11:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_cli.c: - - Remove pthread.h include, it's included in cache.h - -2006-08-05 11:12 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - Remove debugging printfs - -2006-08-05 11:08 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c: - - More bugfixes - -2006-08-05 11:07 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Add assert - -2006-08-05 10:31 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h: - - bugfixes - -2006-08-05 09:27 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h: - - Add signal support. - -2006-08-05 08:49 phk - - * trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h: - - bugfixes - -2006-08-05 08:19 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/mgt_event.c, - trunk/varnish-cache/bin/varnishd/mgt_event.h: - - Add a miniature event engine based on poll(2). - - It's general enough to find other uses, but right now it's only for - the manager process. - -2006-08-05 01:17 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Got the IP, Request and User-Agent sorted out. Working on the time - -2006-08-04 20:03 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Initialize all directions to "opposite" for -b and -c to avoid - spurious first entries. - -2006-08-04 19:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Use id for printing - -2006-08-04 19:36 phk - - * trunk/varnish-cache/include/stat_field.h: - - Stats field changes - -2006-08-04 19:36 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - More comprehensive performance stats and a few asserts, just in case. - -2006-08-04 11:10 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c: - - Now that we keep track of loaded VCLs in the manager, we might - as well allow their manipulation also when the child is not - running. - -2006-08-04 10:54 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/include/cli.h, trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl: - - Redo VCL program handling. - - Keep track of all loaded VCL programs in the manager and tell the - child to load them via VCL. - - Don't start he acceptor thread until a "start" command cones down - the CLI. - - XXX: Right now we leak stuff when a VCL program is dicarded - -2006-08-04 10:23 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Redo our management of compiled VCL programs: - - Take default_vcl out of heritage. - - Keep track of all compiled VCL files and delete them at - exit. - - After starting child, use CLI to load all vcl programs - and then issue "start" via the CLI. - - In the cacher, don't start the acceptor until we get - a start command. - -2006-08-04 09:19 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_vcc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Move VCL compiler related stuff to mgt_vcc.c - -2006-08-04 09:06 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Remove old cli related stuff, it now lives elsewhere - -2006-08-04 09:06 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - reimplement CLI stats - -2006-08-04 07:21 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Implement CLI ping in manager, this is a "per hop" command. - - Add mgt_cli_askchild() function to poke the CLI interface to - the child. - - Use it to ping the child every second. - -2006-08-04 07:20 phk - - * trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h: - - Move cli_func_ping to common_cli - -2006-08-04 07:19 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - SIGCHLD has already been taken care of earlier. - -2006-08-04 06:53 phk - - * trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/include/cli.h: - - Change the CLI protocol in a subtle but useful way: - - The first line of the response has a fixed format ("%-3d %-8u\n") - and consequently fixed length (CLI_LINE0_LEN == 13). - - This makes parsing responses more efficient. Add a function - in common_cli to do so. - -2006-08-04 06:23 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - (Re)Implement passthru of cli commands, we can now talk with the - cache process again. - -2006-08-04 06:21 phk - - * trunk/varnish-cache/include/cli.h: - - Add CLIS_CANT status code for when something is valid but currently - impossible. - -2006-08-04 06:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_cli.c: - - Typo: write cli result to correct pipe. - -2006-08-03 23:42 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Placed a new sbuf_clear at a more strategic place. It got cluttered - when a host left without SessionClose of SessionReuse. - -2006-08-03 22:01 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Got a workaround for IP adress fetching. If we connect logger while - Varnish is running, we won't catch the IP from SessionOpen since it's - already done that. Workaround is to catch the IP from SessionReuse if - IP of session is NULL - -2006-08-03 19:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Fix copy&paste bug in fetch_chunked. - -2006-08-03 19:20 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Sanitycheck that the length of an object adds up, right when we - fetch it. - -2006-08-03 11:46 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Imlement stopping and restarting of child process. - - Not as useful as it will be yet, see ticket 22 - -2006-08-03 11:45 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Make the pipe-stunt debug process smarter. - -2006-08-03 10:37 phk - - * trunk/varnish-cache/bin/Makefile.am: - - Take varnishtester out of the loop until it can be de-libevented - -2006-08-03 10:37 phk - - * trunk/varnish-cache/bin/varnishd/mgt_cli.c: - - Add stop command as well. - -2006-08-03 10:16 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Think I have found a program structure that works. Filling in bits to - build logline. - -2006-08-03 09:45 phk - - * trunk/varnish-cache/Makefile.am, trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/bin/varnishtester/Makefile.am: - - Remove libevent from the picture. - -2006-08-03 09:45 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_common.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h, - trunk/varnish-cache/bin/varnishd/common_cli.c, - trunk/varnish-cache/bin/varnishd/common_cli.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/mgt_cli.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Rip out the old CLI handling and start over, more or less. - - Still bits missing. - -2006-08-03 06:45 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_cli.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.h: - - Rework the cache process CLI handling: - - We are only accepting CLI from the pipes in heritage, so simply - run a loop reading those, dispatching lines as we see them. - - Export CLI_cmds[] so that the management process can see it, - we might as well take advantage of the shared binary where we can. - -2006-08-02 22:53 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Added SessionReuse so I now write a logline for SessionClose and - SessionReuse. - -2006-08-02 22:33 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Starting to get the structure right (I think). Thx for the NULL on - each string Poul-Hennning :) - -2006-08-02 20:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Add an assert, just in case. - -2006-08-02 20:54 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Fix a bug when deleting items in the binheap - -2006-08-02 19:12 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - log StatAddr with fd=0 to avoid out-of-order confusion - -2006-08-02 18:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Allow ENOENT on removing kqueue events, a close will have drained - them already. - -2006-08-02 18:12 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Tell daemon(3) to not chdir in debugging mode so we can find our core - dumps. - -2006-08-02 17:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Enter pass mode through the front door. - -2006-08-02 17:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - More asserts, sp->vbc this time. - -2006-08-02 15:55 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Remember to clear sp->vbc - -2006-08-02 13:28 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Don my plumbers outfit and twist a lot of pipes into shape: - - When -d(ebug) is specified we fork before calling daemon. - - The parent process becomes a miniature cat(1) program which connects - stdin/stdout with the management process stdin/stdout. - - It also knows that SIGINT should be passed on to the management process - in order to make it DTRT. - - Any other cause of death for this "debugger" process will (once I - teach the CLI about it) not affect the running varnish and therefore - it will be possible to start varnish in debugging mode, tweak things - a bit and CTRL-D and leave it running in the properly daemon(3)'ed - background. - - The reason for this rather complicated bit of pipework is that we - can not call daemon(3) once we have started any threads (only the - calling thread survives) and we would loose our parent relationship - to the cache process also. - -2006-08-02 12:05 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Typo: Also monitor remote sockets with the poll based acceptor. - -2006-08-02 11:58 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c: - - Remove the libevent from the backend pool manager. - - Simplify the logic here while we're at it. - -2006-08-02 11:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Add include - -2006-08-02 11:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Remove unused struct. - -2006-08-02 10:53 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Simplify backend connection memory management. - -2006-08-02 10:40 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Replace libevent based acceptor with poll(2) based acceptor. - -2006-08-02 09:34 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Bite the bullet and write an alternate acceptor which uses kqueue - directly instead of libevent. - - Degeneralize the header reading code in cache_http.c which seems to - be cleaner anyway. - - An #ifdef at the top of cache_acceptor.c selects which implementation - you want: libevent or kqueue. - -2006-08-02 07:23 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Convert pipe to use poll(2) on the two filedescriptors it cares about - and eliminate the per-workerthread event engine entirely. - -2006-08-02 07:07 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c: - - I have nothing but circumstantial evidence that libevent is involved - in the current stack corruption I see, but we might as well avoid - using it where we can: - - Don't engage the eventengine when we talk to the backend, just call - read(2) directly. - -2006-08-02 04:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c: - - More miniobj paranoia - -2006-08-01 19:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - More miniobj checks - -2006-08-01 17:54 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - More miniobj checks - -2006-08-01 16:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/flint.lnt: - - More miniobj checks - -2006-08-01 16:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - more miniobj checks - -2006-08-01 15:09 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c: - - Flinting. - -2006-08-01 15:08 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Make 32bit limitation work better. - -2006-08-01 15:08 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Fixx off by one error. - -2006-08-01 14:53 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Add miniobj checks om SMF and STORAGE - -2006-08-01 12:38 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - This is getting too longhaired: Give backend connections another - http header which we can use to build the object headers in. - -2006-08-01 12:04 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Experiment: don't use req's workspace to build object http header. - -2006-08-01 09:39 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Record timestamp when we have received completed HTTP request header, - and define this as the "start of request timestamp". - - Define "end of request timestamp" as when we are ready to transmit - HTTP header back. - - SHMlog the start and difference between start and stop with ReqServTime - tag. - - Keep track of idle sessions using CLOCK_MONOTONIC to avoid trouble - here should our clock get stepped. - -2006-07-31 22:21 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Added some more toying with the data. All is still a mess, and I am - not sure of structure yet. PHK is also doing changes in areas that - will be needed. - -2006-07-31 22:09 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Always NUL terminate shmlog entries. - -2006-07-31 21:49 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Create three groups of seven SHMlog tags: - - {Rx,Tx,Obj}{Request,Response,Status,URL,Protocol,Header,LostHeader} - - And log http header munching accordingly. - -2006-07-31 21:46 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Remove unused variable - -2006-07-31 21:37 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - addr might be NULL if we are called from the prefetcher. - -2006-07-31 21:04 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add http_ClrHeader() and cure an unintended bug-oid its use exposes: - we checked if the request is a GET long after we should have. - -2006-07-31 20:38 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add a http_SetResp() function for constructing HTTP responses (like 304). - - Eliminate the header index from http_SetHeader() which is no unused. - -2006-07-31 20:27 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Log the headers we store in the object under ObjHeader so that - we don't get two confusing batches of TxHeader in the sessions logentries. - -2006-07-31 19:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Fix the dot-graph - -2006-07-31 14:50 andersb - - * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: - - Initial commit of real structure. This code will print the User-Agent. - -2006-07-31 07:26 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Introduce http_SetHeader() for setting a http header to a const string, - no need to waste time printf'ing in this case, and no need to waste - workspace. - -2006-07-31 07:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Don't fill more than half the workspace with received data, we need to - have space for composing the reply as well. - - Without this fix, the entire workspace could be filled with pipelined - requests and we would have no space to compose the reply. - -2006-07-31 06:36 des - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishncsa, - trunk/varnish-cache/bin/varnishncsa/Makefile.am, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.1, - trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, - trunk/varnish-cache/configure.ac: - - Clone varnishncsa off of varnishlog. Anders will hack on it to produce - NCSA-style (common / combined) logs. - -2006-07-31 06:24 des - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Unbreak build. - -2006-07-28 13:41 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - "HEAD" has 4 characters. - -2006-07-24 10:13 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - remove this file (again) - -2006-07-22 22:01 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - reorg a little bit. - -2006-07-22 21:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Eliminate redundant args from stevedore->send() - - Have WRK_Write() and friends return number of bytes (we can't use - WRK_Flush() as that may act on both header and body). - - Collect more stats. - -2006-07-22 20:57 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h: - - Add per address, per session and total statistics. - - We (will) collect data in unlocked per workerthread accumulators - and whenever the workerthread leaves the session, we charge the - bill to the srcaddr (issuing a StatAddr shmrecord), to the session - and to the global counters in the stats struct. - - When sessions die we issue a StatSess shmrecord. - - StatAddr and StatSess has the same format: - address - port (always zero for StatAddr) - duration (seconds) - #sessions - #requests - #pipe - #pass - #fetch - #hdrbytes - #bodybytes - -2006-07-22 16:55 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Make sure there always is a Host: header in fetch requests. - - We fill it in with backend.hostname, but this may not be optimal - (direct IP# etc etc) so VCL should be able to override it. - -2006-07-22 16:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Action pass from vcl_hit() needs to go to STP_PASS - -2006-07-22 16:15 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Always use GET and HTTP/1.1 against the backend for fetch - -2006-07-22 13:58 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - exit after error - -2006-07-22 12:00 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: - - Implement regexp matching of strings in VCL. - - For now we default to REG_EXTENDED, but it might make sense - to let the user control this flag and the case sensitivity. - - Another concern is the stringification of regexps, it may lead - to backslash madness. Maybe we should define '...' string types - also and do no backslash substitution in those at all. - -2006-07-22 10:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: - - Change the acl syntax slightly: the ( ... ) should enclose all of - the rule (ie: also ! and /mask if present). - - Implement matching for IPv4. - - Acl tests are shmlogged as follows (doc candidate): - - shmlog tag: VCL_actl - - "NO_MATCH $acl" - client did not match access list $acl - "FAIL $acl $rule" - getaddrinfo(3) failed on $rule which had a '!' - "MATCH $acl $rule" - client matched $rule - "NEG_MATCH $acl $rule" - client matched negated (!) $rule - -2006-07-22 10:35 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - Store the socket address in the session - -2006-07-22 09:38 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl: - - VCL compiler: - add two sbufs for "init" and "fini" actions. - - VCL ACLs: Change syntax and implementation as follows. - - ACL Syntax now works the following way: - - acl $name { - ! ( "myhost.com" ) ; - "10.0.0.1" /8 ; - } - - The '!' means not. If the address matches the rest of the rule - the address does NOT match the acl and the search terminates here. - - Enclosing the string in paranthesis means that the rule will be ignored - if the string cannot be converted to an address (with getaddrinfo). - - When a string can not be looked up, and is not enclosed in a - paranthesis, a positive rule (ie: without !) will not match and a - negative rule (with !) will match. - - A mask can always be supplied, no matter the style of the string - given, so it is possible to do things like: - - { "fw.ourcompany.dom" / 24 } - - Which means "any host on the same /24 subnet as fw.ourcompany.dom". - - - Unfortunately getaddrinfo() does not return a TTL for the results, - in the future we may want to use some kind of timeout to refresh - the lookups. - -2006-07-22 08:02 phk - - * trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/Makefile.am, - trunk/varnish-cache/lib/libvcl/vcc_acl.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - Split IP/ACL compilation into vcc_acl.c - -2006-07-21 22:12 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Unless the user specifies an explicit size, don't use more than 2GB - on 32 bit architectures to avoid running out of address room - - Make FlexeLint happy. - -2006-07-21 21:57 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Make FlexeLint happier - -2006-07-21 21:42 phk - - * trunk/varnish-cache/autogen.phk: - - Drop this one now. - -2006-07-21 21:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Implement TTL adjustment from VCL - - Log in shmem where the TTL came from (doc-candidate): - - 696613561 RFC 900 1153517009 1153517014 1153517914 900 0 - | | | | | | | | - | | | | | | | age - | | | | | | max-age - | | | | | Expires: header - | | | | Date: header - | | | "now" - | | TTL relative to "now" - | who set the TTL - xid of object - - or - - 696613561 VCL 20 1153517009 - | | | | - | | | "now" - | | TTL relative to "now" - | who set the TTL - xid of object - -2006-07-21 21:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - More VRT work. - - Use macros for trivial objects which are just a field in a struct. - -2006-07-21 21:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vrt.h: - - Update VRT to minimal functional level again - -2006-07-21 20:51 phk - - * trunk/varnish-cache/include/vrt_obj.h, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c: - - Use const char* for safety - -2006-07-21 20:45 phk - - * trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/include/miniobj.h, - trunk/varnish-cache/include/stat_field.h, - trunk/varnish-cache/include/stats.h, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h: - - Update - -2006-07-21 20:44 phk - - * trunk/varnish-cache/include/vrt_obj.h: - - This file is generated. - -2006-07-21 20:43 phk - - * trunk/varnish-cache/lib/libvcl/Makefile.am, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_token.c: - - Automate generation of tables and prototypes for the objects which - VCL programs can manipulate. - -2006-07-21 18:12 phk - - * trunk/varnish-cache/lib/libvcl/Makefile.am, - trunk/varnish-cache/lib/libvcl/vcc_compile.c, - trunk/varnish-cache/lib/libvcl/vcc_compile.h, - trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcc_obj.c, - trunk/varnish-cache/lib/libvcl/vcc_priv.h, - trunk/varnish-cache/lib/libvcl/vcc_token.c, - trunk/varnish-cache/lib/libvcl/vcc_token_defs.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_priv.h, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Move things over to the correct "VCC" prefix. - - Split some stuff into separate files while we're at it. - -2006-07-21 16:25 phk - - * trunk/varnish-cache/include/http_headers.h: - - update comment - -2006-07-21 16:15 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Properly log TTL calculation to shmem - -2006-07-21 16:06 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Fix formatting of responses. - -2006-07-21 16:05 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Log TTL calculation on the right fd - -2006-07-21 15:25 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Work on logtailer api a bit: - - By default, start at the last entry in shared memory. To dump the - entire segment from the start, specify '-d' option. - - Terminate programs when '-r $file' reaches EOF - -2006-07-21 12:18 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/flint.lnt: - - Cleanup - -2006-07-21 12:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Magic check on struct vbe - -2006-07-21 12:06 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Better name - -2006-07-21 11:55 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/stat_field.h: - - Convert fetch, insert and deliver to use new HTTP header munging code. - - Remove sbuf from workerthread, it is only used in the Error handling - now and it will probably not even survive that in the long run. - -2006-07-21 10:44 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Make pipe use the new http manipulation. - -2006-07-21 09:32 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/http_headers.h: - - HTTP header munging part (N of M) - - NB: Only pass mode (lightly) tested right now. - - Give up on the three element array per header and use a two element struct - instead, it reduces obfuscation and removes risk of pointer fandango. - - Introduce #defined filtercontrol in http_headers.h, use them in a new - field. Only Pass is there for now. - - Use the http-workspace for building headers instead of sbuf. - - Move uiovec handling to cache_pool.c where it more naturally belongs - and so we can use it on both backends and sessions. - - Add http header munging functiosn for copying, printf'ing, filtering and - writing headers. - -2006-07-21 07:18 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Rename shmlog tags for headers to RxHeader and TxHeader that's more - logical. - - Rename http_Init() to http_Setup() to avoid clash with HTTP_Init(). - - Remove unused variable - -2006-07-20 22:08 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Yet another refinement to the way we store and deal with HTTP headers. - - Record a triplet of {start, data, end} for all HTTP data items. - - This represents a regrettable uglification of the sourcecode, but - most of it compiles out to constants and the runtime benefits will - be worth it. - - Generate H_FOO magic strings for all the headers we know about. - These strings have a length as first char and always ends in ':'. - - Also genereate H_FOO format strings in VCL compiler. - - Mandate (with assert) that header references happen using H_FOO strings. - - Make number of allowed HTTP headers a compile time constant (32) - but make the workspace a run-time variable (4096). - - Introduce new SHM tag for dumping aborted HTTP protocol requests. - -2006-07-20 15:10 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Add XXX comment - -2006-07-20 14:46 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/include/stat_field.h: - - Keep an eye on deathrow - -2006-07-20 14:40 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - More asserts - -2006-07-20 14:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - We need to check the TTL here also, if a (sequence of) slow client(s) - manages to hold the document referenced, the prefetcher may never - get lucky with it and it will linger here much past last sell date. - -2006-07-20 13:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Only reference srcaddr on first request on session - -2006-07-20 13:39 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Be more paranoid about srcaddr - -2006-07-20 13:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - upd - -2006-07-20 13:29 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/include/stat_field.h: - - Keep track of active source addresses - -2006-07-20 12:03 phk - - * trunk/varnish-cache/bin/varnishtop/varnishtop.c: - - Add -1 option that stops comparison after first field. - - Useful with commands like: - - varnishtop -i header -1 - varnishtop -i srcaddr -1 - - where the variable part of the entry is less relevant. - -2006-07-20 10:10 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Show also average since start - -2006-07-20 09:58 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Hmm, that was a bad idea. - -2006-07-20 09:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Loop till we have everything. - -2006-07-20 09:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Implement "If-Modified-Since" conditional queries - -2006-07-20 08:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Remove explicit worker thread arguments. - -2006-07-20 08:25 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Move the delivery functions from acceptor to response - -2006-07-19 21:16 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/stat_field.h: - - Rework the worker thread pool logic slightly, we were leaking - threads before. - -2006-07-19 21:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/include/stats.h: - - Include a "start_time" timestamp in the stats and teach varnishstats - to print it in curses mode. - - Some polishing and cleanup. - -2006-07-19 20:07 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Use insert_pass in vcl_fetch() so we cache the uncacheability. - -2006-07-19 20:06 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Don't explode on trim's to zero size. - - Real fix should (maybe) be to callers - -2006-07-19 19:49 phk - - * trunk/varnish-cache/bin/varnishtop/varnishtop.c: - - Update only once per second. - -2006-07-19 19:48 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Make sure width and precision arguments to printf %*.*s are ints. - -2006-07-19 19:47 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Don't panic on NULL srcaddr, but revisit later when we know the - details. Is it the Prefetcher ? - -2006-07-19 19:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - Delete the right list item. - -2006-07-19 19:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Don't bother determining if we should close if we already have done so. - Also: we may not have valid headers if cache_http.c threw a 400. - -2006-07-19 19:43 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Make sure hp->v is NUL terminated. - -2006-07-19 12:37 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Use miniobj.h to catch pointer trouble - -2006-07-19 12:36 phk - - * trunk/varnish-cache/include/miniobj.h: - - Add miniobj.h for debugging - -2006-07-19 11:53 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Avoid the Error path for now. - -2006-07-19 11:11 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - handle 302 for now. - -2006-07-19 08:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Properly zero the worker structure when we start a thread. - -2006-07-18 13:47 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - eliminate debugging - -2006-07-18 13:19 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Delete binheap root by it's index. - - Expect a refcount of one (the one holding the object in the hash) - -2006-07-18 13:18 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Fix the Parent calculation - -2006-07-18 12:46 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Set the index of deleted elements to zero - -2006-07-18 12:40 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - Move the root index from zero to one - -2006-07-18 12:29 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Remove the deref/unbusy stuff from FetchBody() it's done in central.c - -2006-07-18 12:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - Assert that object is busy when we call unbusy - -2006-07-18 12:27 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Use a void * for http_Read()'s buffer - -2006-07-18 10:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Braino this time. - -2006-07-18 10:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - typo - -2006-07-18 10:45 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Add http_Read() which reads from a socket but soaks up any prefeched - tail first and use it all the places where this logic was explicit - before. - - Fix Refcounting on objects when we insert/deliver - -2006-07-18 10:32 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Use bigger buffersizes for pass mode - - Terminate the sbuf with the reply headers properly. - -2006-07-18 09:02 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c: - - Retire the http_GetReq(), http_GetURL() and http_GetProto() accessor - functions now that struct http is out of the closet. - -2006-07-18 08:52 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - polish - -2006-07-18 08:51 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - zero means 'all' to http_GetTail() - -2006-07-14 13:54 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - use space to separate host and port in -b - -2006-07-14 13:52 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Use space to separate host and port in backend spec. - - Polish usage message a bit. - -2006-07-14 13:33 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/steps.h: - - When during a lookup we encounter a busy object, queue the session on - the objects waitinglist and disembark the worker thread so it can do - something sensible in the mean time. - - This feature is unimportant in normal operation, but crucial to - resource management if a popular URL suddenly takes a long time to - reply from the backend. - - Without this bit if semi-nasty code, we would tie up one worker - thread per client while waiting for the backend to come to it's - senses. - -2006-07-14 12:47 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c: - - Have the acceptor launch the session into STP_RECV - -2006-07-14 12:45 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Use the fact that we have the worker thread in struct sess now. - - Move initial and final processing into cnt_recv() and cnt_done() - -2006-07-14 12:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Have the states tell us if we are done yet with their return value, - so that we can implement disembarking the worker thread of the object - is busy. - -2006-07-14 12:22 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/include/shmlog.h: - - Put a starttime in shmem so varnishstat can show average rates. - -2006-07-14 12:12 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Flexelint'ing, found a spurious ';' - -2006-07-14 12:05 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/include/shmlog.h: - - More SHM creation polishing - -2006-07-14 11:44 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Better and more paranoid SHMEM creation logic - -2006-07-14 11:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_session.c: - - propset Id - -2006-07-14 11:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_session.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h: - - Change "client" to "srcaddr", it's more descriptive. - - Add srcaddr management and start charging bytes to the srcaddr. - -2006-07-14 10:34 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Rework the way we do ascii representations of addresses - -2006-07-14 10:16 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_session.c: - - Move session management to new file (cache_session, SES prefix) in - preparation of adding client tracking. - - Move the iovec's from the session to the worker and give the session - a pointer to the worker so we can avoid passing it around as argument. - -2006-07-12 23:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/flint.sh, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/shmlog.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - More Flexelinting - -2006-07-12 22:52 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/mgt_child.c: - - More flexelinting. - - No bugs so far. - -2006-07-12 22:07 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Flexelint harder. - -2006-07-12 22:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Give this file a flexelinting - -2006-07-12 22:01 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - Improve the INCOMPL() macro. - -2006-07-12 20:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - More polishing. - -2006-07-12 19:28 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Move sessmtx to cache_vcl.c and call it vcl_mtx. - - Clean up naming for consistency while here. - -2006-07-12 15:07 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h: - - Implement "insert_pass" mode where we cache that an entity must be passed. - -2006-07-12 14:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Make Pass possible from vcl_hit() - -2006-07-12 13:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_response.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/steps.h, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Enable Id keyword - -2006-07-12 13:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - First stab at implementing pass in vcl_miss() - -2006-07-12 13:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - Add explanation for locking, some minor polishing. - -2006-07-12 12:04 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h: - - Hash on both URL and Host header. If no host header, hash on URL twice. - -2006-07-12 11:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Make Pass work again - -2006-07-12 11:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Make pipe work again - -2006-07-12 08:56 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Fix CLI "config.load" - -2006-07-12 08:44 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Always insert a backend when vcl is compiled. - - Respect '#' comments in script file. - -2006-07-12 08:34 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Teach the VCL compiler about default functions, so that users will - not have to copy&paste the default methods if they have no special - requirements for a particular method. - - No such facility exists for backends, so a backend description is - now the minumum VCL program. - - When we initialize the VCL compiler we hand it a piece of source code - with the "default code", this must include definitions of all methods - named with a "default_" prefix (ie: "default_vcl_recv" etc). - - During compilation we always compile this piece of source code in (after - the user supplied VCL source). - - If the user did not provide a particular method, the default method is - used instead. The user can also call the default method directly, - for instance by: - - sub vcl_recv { - if (req.http.Expect) { - error; - } - call default_vcl_recv; - } - - Later on, this could be expanded to allow other subroutines to be - included in the default VCL for the users calling convenience. - -2006-07-12 07:45 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Pause after 'vcl' command - -2006-07-11 21:35 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - EOF detection in libevent is buggy ?? Add exit cmd. - - Pause after cli until we see "OK" - -2006-07-11 21:30 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - add a req command, various adjustments - -2006-07-11 21:04 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Add Pause() and Resume() to pace script execution - -2006-07-11 21:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - Add a printf when cached is ready for the benefit of varnishtester - -2006-07-11 20:49 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - open and close commands - -2006-07-11 20:37 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - A vcl keyword for loading a new config - -2006-07-11 19:29 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Add "cli" to tell varnishd things - -2006-07-11 19:16 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - If the first char of the serve string is '!', close connection after - sending string. - -2006-07-11 19:10 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Add a server facility to act as backend for varnish - -2006-07-11 18:21 phk - - * trunk/varnish-cache/bin/varnishtester/varnishtester.c: - - Minimal ability to start and stop a varnishd - -2006-07-11 18:16 phk - - * trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Give 'exit' CLI command some bite. we may want to be more careful - later on. - -2006-07-11 17:53 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Unbuffer stdout/stderr - -2006-07-11 17:23 phk - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishtester, - trunk/varnish-cache/bin/varnishtester/Makefile.am, - trunk/varnish-cache/bin/varnishtester/varnishtester.c, - trunk/varnish-cache/configure.ac: - - Add stub varnishtester program - -2006-07-11 16:31 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Start the cache process automatically, I've gotten tired of typing - "start" :-) - -2006-07-11 16:25 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Allow backend to be specified as "host:port" to -b - -2006-07-11 16:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - add short descriptive comments to each state - -2006-07-11 16:10 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Distribute code from FetchSession almost correctly - -2006-07-11 16:03 phk - - * trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add "insert_pass" action in VCL - -2006-07-11 15:54 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - Make things work again by stuffing the old functions into the new - state engine. - -2006-07-11 15:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_center.c: - - This commit breaks warnish temporarily: - - Insert the new master state engine. - - A dot(1) graph is embedded in the source code and can be extracted - with: - - sed -n '/^DOT/s///p' cache_center.c | dot -Tps > /tmp/_.ps - -2006-07-11 13:31 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/steps.h: - - Add enum for major procesing steps - -2006-07-11 12:31 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_center.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Start centralizing the flow of requests through varnish so we get - one source file with the highest level of policy. - -2006-07-11 12:30 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Make -b and -c less nonsensical when not specified - -2006-07-11 12:00 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Pipe requests which come with an Expect header. - - XXX: document that - error 417 "expectation failed" - might be a more sensible policy. - -2006-07-11 11:41 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.1: - - Document -b and -c, and bump date. - -2006-07-11 11:36 phk - - * trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Add -b[ackend] and -c[lient] generic options to logtailers - -2006-07-11 07:38 phk - - * trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add 500 messages. - -2006-07-11 07:30 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/stat_field.h: - - Split http_Dissect() into http_DissectRequest() and http_DissectResponse() - -2006-07-11 06:30 des - - * trunk/varnish-cache/bin/varnishd/varnishd.1: - - Add cross-references and a commented-out STANDARDS section. - -2006-07-11 06:28 des - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add a note to update varnishlog(1) whenever this list changes. - -2006-07-11 06:27 des - - * trunk/varnish-cache/bin/varnishstat/varnishstat.1: - - Add cross-references. - -2006-07-11 06:26 des - - * trunk/varnish-cache/bin/varnishlog/varnishlog.1: - - Document the -C, -I, -X, -i, -x options. - Add a list of log entry tags. - Add cross-references to varnishd(1) and varnishstat(1). - -2006-07-10 21:54 phk - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishtop, - trunk/varnish-cache/bin/varnishtop/Makefile.am, - trunk/varnish-cache/bin/varnishtop/varnishtop.c, - trunk/varnish-cache/configure.ac: - - Add varnishtop log-tailer. - - - Try these: - - varnishtop -i url - - varhishtop -i header -C -I '^user-agent:' - - varhishtop -i header -C -I '^user-agent:' -X MSIE - - varhishtop -i header -C -I '^user-agent:.*MSIE' - - varhishtop -i header -C -I '^user-agent:.*java' - - You can also run them on the logfiles from the live test: - - zcat _vlog21.gz | varnishtop -r - -i header ... - - - -2006-07-10 21:49 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Fix so that both -I and -X can be specified - -2006-07-10 20:49 phk - - * trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Implement -C, -I and -X generic options - -2006-07-10 20:27 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Add tag names array to libvarnishapi, everybody is going to need it. - - Implement -i tag[,tag ...] and -x tag[,tag ...] generic arguments. - -2006-07-10 19:54 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Improve libvarnishapi interface to shared memory: - - Add function VSL_OpenStats() which directly returns a pointer - to the varnish_stats structure. - - Add opaque VSL_data structure as handle to the log-tailer functions. - - Add generic argument parsing function for all log-tailers. - - Add support for generic "-r " option. - -2006-07-10 15:02 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/stat_field.h: - - More statistics about worker threads. - -2006-07-10 14:52 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/stat_field.h: - - Rewrite the worker thread pool code. - - Assign prefix WRK to the worker pool. - - Introduce a struct workreq since the prefetcher (when it happens) will - not have a session to pass in. - - The worker threads get a cond_var each and are hung from a list in - most recently used order. - - When a request is queued and the worker thread list is not empty, - tickle the cond_var of the first one. - - If no threads were availble the max number of threads is not reached, - try to start another worker thread. - - If the max was reached or the start filed (likely due to out of memory) - indicate overflow and let the existing pool deal with it. - - Create only the minimum requested number of threads initially. - - Allow specification of the timeout before a dynamic worker thread commits - suicide to be specified with -w. - - Default parameters are -w1,UINT_MAX,10 {min, max, timeout} - -2006-07-10 13:59 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - use explicit eventbase. - -2006-07-10 13:58 phk - - * trunk/varnish-cache/contrib/libevent/event.c: - - Don't ever set current_base in our version of libevent in order to flush - out any bugs it might cause. - -2006-07-10 13:48 phk - - * trunk/varnish-cache/bin/varnishd/shmlog.c: - - Dump errno and strerror in assert - -2006-07-10 12:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Rework the "connect to backend logic". - - Avoid calling getaddrinfo() for every connect by catching the result - in the backend structure. - - Minimize number of socket/connect calls by caching the last good - address in the backend structure. - - If all addresses in the cached getaddrinfo() result fails, call - getaddrinfo() again (to catch DNS changes) and try the list again. - -2006-07-10 11:24 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Move sockaddr->ascii conversion to tcp.c - - shmlog both ends of backend connections. - -2006-07-10 10:56 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.h, - trunk/varnish-cache/bin/varnishd/common.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/shmlog.c: - - Be more consistent. - - cache_shmlog.c contains stuff for both cache and mgt, so remove the - cache_ prefix. - - Rename cache_shmlog.h to common.h and put joint stuff there. - -2006-07-10 10:31 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - put backend session linkage in shmemlog for pipe and pass - -2006-07-10 10:06 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Polish HTTP reception a little bit - -2006-07-10 10:05 phk - - * trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Drop the max length of first line, it's too expensive to enforce. - -2006-07-10 09:52 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Fix cosmetic warning - -2006-07-10 09:51 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Silence cosmetic warning. - -2006-07-10 09:48 phk - - * trunk/varnish-cache/lib/libvarnish/time.c, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Fix cosmetic warnings - -2006-07-10 09:47 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.h, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Fix a bunch warnings, all cosmetic. - - I'm using __unused for now, if we need to use something different - we can do a find/replace. - -2006-07-10 09:28 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Silence some warnings - -2006-07-10 09:07 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/include/stat_field.h: - - Allocate struct http as part of the session allocation. - - Remove http_New() and http_Delete() - -2006-07-10 08:41 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add heritage.mem_http_headers which is the maximum number of headers - we recognize. - - Add http_Init() which initializes struct http given sufficient space. - - Respect heritage mem_* values in http_New() (while we still have it) - - Allocate backend connections (vbe_conn) with super allocation with - space for http and workspace. - -2006-07-10 08:10 phk - - * trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Put three memory allocation hints into heritage: - - mem_http_1_line (512) - Maximum length of the reqeust/response line of a HTTP message - There is no point in filling the entire buffer with junk if - we get a preposterously long first line. - mem_http_header (4096) - Maximum length of entire HTTP header. If we overflow this - we return 400. - mem_workspace (currently 0) - In the future this will be the space we use for constructing - headers to send and edits done from VCL. - -2006-07-10 07:54 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Take the vbe_conn (backend connection) structure out of the closet. - -2006-07-10 07:07 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Turn a comment into english - -2006-07-10 07:04 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - More sensible order of pointers - -2006-07-09 21:21 phk - - * trunk/varnish-cache/include/http_headers.h: - - Don't pass cache-control through. - -2006-07-09 21:01 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Add a -h opt which modifies -o to remove "trivial" entries. - - Trivial are - {GET,HEAD} which gets a hit and returns 200 - {GET,HEAD} which gets a miss, fetches, inserts and returns 200 - -2006-07-09 09:16 des - - * trunk/varnish-cache/configure.ac: - - Don't use braces where they aren't needed. - Let automake know about config.h. - Bump version number to mark that we have passed the first live test. - -2006-07-09 07:13 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/lib/libvcl/Makefile.am: - - List header files so they are included in the distribution tarball. - -2006-07-09 06:35 des - - * trunk/varnish-cache/configure.ac: - - Use the modern version of AM_INIT_AUTOMAKE, allowing automake to deduce the - correct distribution name. - -2006-07-08 20:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - A few edits for FlexeLint - -2006-07-08 20:19 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Sanitize #includes a bit in the cache process by moving fundamental - #includes to cache.h - -2006-07-08 20:18 phk - - * trunk/varnish-cache/bin/varnishd/flint.lnt: - - Silence a bogus warning - -2006-07-08 19:54 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - Move struct http into cache.h - - The original reasoning for having it private to cache_http.c was - to avoid pollution with event.h related structures but since that - pollution is happening other ways anyway, the cost is too high. - - Include pthread.h, sys/time.h, and event.h from cache.h - -2006-07-08 19:46 des - - * trunk/varnish-cache/configure.ac: - - Add --enable-debugging-symbols which enables debugging sysmbols and - disables - inlining and builtins. - -2006-07-08 19:27 des - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Fix "set backend.port". - -2006-07-08 19:25 des - - * trunk/varnish-cache/autogen.des: - - My version. - -2006-07-08 19:25 des - - * trunk/varnish-cache/autogen.phk: - - Expand keywords. - -2006-07-07 08:40 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Close gracefully in pipe mode - -2006-07-07 07:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Set SO_LINGER to zero - -2006-07-07 07:25 phk - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Tell why bind(2) fails - -2006-07-07 07:22 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Pipe anything different from HEAD & GET - -2006-07-07 07:22 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Don't filter headers in Pipe mode - -2006-07-07 07:22 phk - - * trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Fix pipe mode - -2006-07-07 07:22 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Remove debugging printf - -2006-07-07 07:15 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Time idle TCP connections out after 30 seconds - -2006-07-07 06:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Dump our buffer as Debug if we have HTTP header trouble. - - Issue 400 for HTTP header buffer overflow. - -2006-07-07 06:27 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Strvis(3) debug data. - -2006-07-06 22:33 phk - - * trunk/varnish-cache/include/http_headers.h: - - Filter out Content-Range headers. - -2006-07-06 21:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Always log the numeric code as "Status" - -2006-07-06 21:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Log the found objects XID when we have a hash-hit. - -2006-07-06 21:56 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add shmem tag for Hits - -2006-07-06 21:47 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Refuse all requests without a protocol field with a 400 - - Implement a function to say "400" with. - -2006-07-06 21:04 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_response.c: - - Add cache_response for yelling at clients - -2006-07-06 21:03 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Also flush ordered after the long timeout. - -2006-07-06 21:00 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Strengthen HTTP parsing - -2006-07-06 20:29 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Make sure the grim reaper doesn't touch busy objects either. - -2006-07-06 20:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - The grim reaper needs to wait for objects refcount to drop to zero. - -2006-07-06 20:23 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Improvements to flush things at timeout and at the end etc. - -2006-07-06 13:40 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Silence typical broken client connection messages and move the - interesting ones to shmem - -2006-07-06 13:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Fix braino in Pass handling - -2006-07-06 13:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Skip space before request/response - -2006-07-06 13:02 des - - * trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.1: - - Add a rudimentary man page. - -2006-07-06 11:18 phk - - * trunk/varnish-cache/autogen.phk: - - My version. - -2006-07-06 10:18 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Add exponential hitrate displays (with -c) - -2006-07-06 09:31 des - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.1: - - Add a rudimentary man page. - -2006-07-06 09:31 des - - * trunk/varnish-cache/bin/varnishd/varnishd.1: - - Expand keywords - -2006-07-06 09:13 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/varnishd.1: - - Add a rudimentary man page. - -2006-07-06 09:08 phk - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Only complain if accept_filters fail - -2006-07-06 09:06 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Remove debugging code. - -2006-07-06 09:00 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Add -r file and -w file options. - - These read/write from/to a binary file. - -2006-07-06 08:45 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Increas shmem size to 8M - -2006-07-06 08:45 phk - - * trunk/varnish-cache/bin/varnishd/tcp.c: - - Add accept filters - -2006-07-06 08:43 des - - * trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Portability: don't use non-portable mmap(2) flags. - -2006-07-06 08:43 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Portability: Linux does not have SO_NOSIGPIPE. - -2006-07-06 08:41 des - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/lib/libvarnish/argv.c: - - Portability: cast unused parameters to void instead of marking them - __unused. - -2006-07-06 08:32 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - 404 handling - -2006-07-06 08:07 des - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Use instead of to get both the prototype for - ioctl(2) and the definition of FIONREAD. - -2006-07-05 14:40 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Fix off by one - -2006-07-05 14:40 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - printf format - -2006-07-05 13:54 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Calculate rate as signed. - -2006-07-05 13:44 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Assert non-null first - -2006-07-05 13:19 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Send "Connection: close" if not HTTP/1.1 - -2006-07-05 13:13 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/include/stat_field.h: - - Add more stats - -2006-07-05 13:09 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Some asserts to guard against trouble. - -2006-07-05 12:17 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Another pipeline fix: don't clobber a pipelined partial header - -2006-07-05 11:42 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Don't lead http header - -2006-07-05 11:09 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Free the session memory correctly - -2006-07-05 10:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - Free the right header. - -2006-07-05 10:55 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - Don't leak objects headers - -2006-07-05 10:01 phk - - * trunk/varnish-cache/include/http_headers.h: - - Suppress Accept-Ranges for now. - -2006-07-05 09:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Create an X-Varnish header and put the XID there. - -2006-07-05 09:56 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Send headers with sendfile - -2006-07-05 09:44 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Add Age and Via header to responses. - - Change arguments to vca_write_obj() (It should really be - "send_repsonse()" ?) - Store received age and time entered into cache in object. - Generate Age: and Via: headers as part of response. - -2006-07-05 09:32 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Unify logging in the response handling - -2006-07-05 09:11 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - log responsecode and length - -2006-07-05 09:10 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Log reponse code and object length - -2006-07-05 09:08 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add Length tag - -2006-07-05 08:08 phk - - * trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Show also rate in curses display - -2006-07-05 07:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Be more conservative about wraparound and take them up front in all cases. - -2006-07-04 22:08 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Implement our TTL calculation. - - A first quick check against the weird timestamps from the VG frontend - squids indicates sensible behaviour. - -2006-07-04 21:34 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Long comment describing how TTL calculation will be done. - - Review encouraged. - -2006-07-04 20:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Fix HEAD requests: - - Make modes to http_BuildSbuf descriptive enums. - Send GET to backend also for HEAD requests. - Don't return body for HEAD requests. - -2006-07-04 19:36 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Fix pipelining. - - A braino in http_Dissect() resulted in an off-by-one error - (protected with assert now) - - Move any remaning bytes in buffer to front and check for - a complete header before arming the eventloop on the - session. - -2006-07-04 14:45 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Make room for protective terminating NUL - -2006-07-04 14:19 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - retry backend open, log diagnostics - -2006-07-04 14:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - load VCL earlier - -2006-07-04 14:18 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Lock with a mutex - -2006-07-04 13:45 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Shorter sleeps: 1s -> 50msec - -2006-07-04 13:44 phk - - * trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Fix off by one error during wraparound. - -2006-07-04 09:28 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Close non HTTP/1.1 request connections - -2006-07-04 09:21 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Add missing '%' - -2006-07-03 19:45 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - My workaround for the missing OFF_T_MAX definition was not safe, - use a hardcoded "1<<30" which is. - -2006-07-03 19:35 phk - - * trunk/varnish-cache/contrib/libevent/event.c: - - I have grumbled about the evilness of "current_base" before, and this just - proves the point: If two threads call event_init() at the same time, - they will both stomp on the same memory via current_base, and in all - likelyhood, neither of them will manage to get the job done properly. - - Instead work on a local variable and don't assign to current_base - until the setup is complete. - - This should be submitted to Niels Provos - -2006-07-03 18:35 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Handle IPv6 address -> string conversion too - -2006-07-03 18:03 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Close race condition - -2006-07-03 17:59 phk - - * trunk/varnish-cache/bin/varnishd/hash_classic.c: - - Better arg checking - -2006-07-03 15:01 phk - - * trunk/varnish-cache/lib/libvarnish/binary_heap.c: - - more asserts - -2006-07-03 14:39 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - avoid const poison - -2006-07-03 14:39 phk - - * trunk/varnish-cache/bin/varnishd/cache_ban.c: - - Include pthread.h - -2006-07-03 14:37 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - s/unsigned/size_t/ - -2006-07-03 14:36 phk - - * trunk/varnish-cache/bin/varnishd/hash_simple_list.c: - - s/init/start/ - -2006-07-03 12:41 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/hash_classic.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/hash_slinger.h, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add another hash-method with better real-world survival chances: A classic - bucketed hash table of lists. Hash is MD5. Number of buckets and number - of mutexes can be configured at command line. - -2006-07-03 08:30 des - - * trunk/varnish-cache/configure.ac: - - Replace --enable-wall and --enable-pedantic with - --enable-developer-warnings, - which is roughly equivalent to FreeBSD's WARNS level 5 or 6. - -2006-07-01 05:44 phk - - * trunk/varnish-cache/include/http_headers.h: - - Mark more headers as not end-to-end - -2006-06-30 20:22 phk - - * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: - - Forgot to add shmlog.c (reminded by des@) - -2006-06-30 20:21 phk - - * trunk/varnish-cache/include/queue.h: - - Add TAILQ_FOREACH_SAFE() - -2006-06-30 20:17 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - move all policy to rfc2616.c - -2006-06-30 13:44 des - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/include/stats.h: - - Consistently use our own copy of queue.h. - -2006-06-30 11:20 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Fix object length double accounting in chunked fetch - -2006-06-30 09:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Delete compiled VCL file after we tried to load it. - -2006-06-29 19:19 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Log objects banned to shmlog - -2006-06-29 19:06 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Track objects heap-position - -2006-06-29 17:09 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_ban.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_main.c: - - Add the ability to instantly ban/purge all cached objects matching - a given regexp. - -2006-06-29 15:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Improve shm-logging of VCL activity - -2006-06-29 14:37 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Tag objects with their origin session xid and log it when we clean up. - -2006-06-29 13:04 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Add a unique transaction-ID to each request, and register it in the - shmlog so we can match backend transactions with client transactions. - -2006-06-28 21:38 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Convince flexelint that we know what we do with some asserts - -2006-06-28 21:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Put a mutex around the shmlog writes, I've seen my first race. - -2006-06-28 21:18 phk - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Add a -o argument which sorts the log into transactions before output, - this is a fair bit easier to chew through than the raw log (the default) - -2006-06-28 21:03 phk - - * trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Use shmlog api from libvarnishapi - -2006-06-28 20:58 phk - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Use SHMLOG api in libvarnishapi - -2006-06-28 20:58 phk - - * trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am: - - Add SHMLOG opening and walking functions to libvarnishapi - -2006-06-28 17:46 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Be more consistent about which headers we send back. - - Start 5 threads in the worker pool. - -2006-06-28 16:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Construct our own Content-length header, no matter which of the - three (straight, chunked, eof) modes we used to fetch the object. - -2006-06-28 16:58 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Don't finish the sbuf in mode 3 - -2006-06-28 16:57 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Assert that the lengths of the storage for the object add up. - -2006-06-28 16:57 phk - - * trunk/varnish-cache/include/http_headers.h: - - Don't pass Content-Lenght through, we build it ourselves - -2006-06-28 16:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Pass fd to shmemlog - -2006-06-28 16:19 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - add tag for generated headers - -2006-06-28 16:19 phk - - * trunk/varnish-cache/include/http_headers.h: - - Don't pass If-* headers to backend - -2006-06-28 16:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c: - - Apply correct fd in Shmemlog - -2006-06-28 16:04 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Fix buglets, include test-driver. - -2006-06-28 11:29 phk - - * trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.c: - - Give varnishstat a "-c" option to use curses to continously refresh - -2006-06-28 11:21 phk - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishstat, - trunk/varnish-cache/bin/varnishstat/Makefile.am, - trunk/varnish-cache/bin/varnishstat/varnishstat.c, - trunk/varnish-cache/configure.ac: - - Add varnishstat program - -2006-06-28 10:31 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - 304's don't have a body - -2006-06-28 10:30 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Implement ->trim() - -2006-06-28 09:39 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/stat_field.h: - - More stats counters - -2006-06-28 09:21 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/stat_field.h, - trunk/varnish-cache/include/stats.h: - - Add statistics counter support. - - stat_field.h defines the counter fields with name, type, (printf)format - and description. - - stats.h defines a structure with these fields. - - shmlog.h makes the structure part of the shared memory logs header. - - Implent the "stats" CLI word in the management process. - -2006-06-26 19:25 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c: - - Call VCL to decide discard/prefetch for near-expiry objects. - - Put discard objects on deathrow where they will be culled from - in sequence. - - (prefetch not implemented yet) - -2006-06-26 19:24 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - A temporary hack to deal with very old Date: headers until we figure - out what's going on. - -2006-06-26 19:23 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Implement HTTP/1.0 style fetching. - -2006-06-26 17:06 phk - - * trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Another little tweak - -2006-06-26 16:31 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Dump numeric handling also, until we figure out trouble. - -2006-06-26 16:30 phk - - * trunk/varnish-cache/bin/varnishd/cache_hash.c: - - typo - -2006-06-26 16:19 phk - - * trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Make this work again: record the stevedore in the storage object. - -2006-06-26 14:33 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c: - - Start releasing objects when they expire - -2006-06-26 14:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c: - - Move a bit more responsibility into the hash-slinger to get a cleaner - interface. - -2006-06-26 08:58 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_hash.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c: - - Now that we approach the time where objects have to be destroyed again, - we need to move the data structures into the right shape. - - Push hashing into cache_hash.c - - Add objhead structure to hold the various hits for "Vary:" headers. - -2006-06-24 22:11 phk - - * trunk/varnish-cache/bin/varnishd/cache_expire.c: - - A little bit more work on the expiry/prefetch thing. - -2006-06-24 21:54 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Use ttl=0 as a "invalid TTL" flag. - - Mark objects with ttl=0 uncachable. - - Add cacheable objects to the expiry heap - - Start an expiry thread which polls the root element once per second - -2006-06-24 21:42 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Truncate TTLs in the past to now. - -2006-06-24 21:09 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - Autogenerate prototypes for method calling functions - -2006-06-24 21:07 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add a "timeout" method to VCL, it can return "fetch" or "discard". - -2006-06-24 20:50 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add a token type "METHOD", we use it for reference counting. - - Add a reference to the first backend {} we encounter, it is the default. - Add a reference to all backends assigned explicitly. - Add a reference to all methods. - - Enable reference check, complain if: backend, function or acl is defined - but not used, or used but not defined. - -2006-06-24 20:12 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Collapse multiline Fc and Fh calls where they fit - -2006-06-24 20:09 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - More printf sanitation: Create to convenience functions for output to the - fh and fc sbufs. - -2006-06-24 19:50 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Cave in and use printf format extensions for printing tokens. - Both Linux and FreeBSD supports them anyway. - -2006-06-24 19:41 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add more shmemlog tags: - one for each VCL method to record the return - one for errors - one for linking a client session to a backend connection - Use them sensibly. - Put VCL name of backend into struct backend to improve log messages - -2006-06-22 16:17 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_returns.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Improve the VCL compiler in various ways: - - Generate the methods and their legal returns with the tcl script. - - Add consistency checks to make sure methods don't use illegal returns, - and also check called subrourtines. - - Add consistency check to complain about recursive subroutine calls. - - Add consistency check to complain about unused or undefined subroutines. - -2006-06-21 10:28 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_expire.c, - trunk/varnish-cache/bin/varnishd/cache_main.c: - - Add (empty) source file for expiry/pretech code - -2006-06-21 10:21 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - Start to respect TTL - -2006-06-21 10:13 phk - - * trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add "-t default_ttl" option. 120 seconds by default. - -2006-06-21 09:58 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Quench some debugging - -2006-06-21 08:09 phk - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/binary_heap.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/binary_heap.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add a binary heap implementation for keeping track of objects expiry time. - -2006-06-20 19:49 phk - - * trunk/varnish-cache/include/vrt.h: - - typo - -2006-06-20 19:38 phk - - * trunk/varnish-cache/lib/libvcl/flint.lnt, - trunk/varnish-cache/lib/libvcl/flint.sh: - - FlexeLint files - -2006-06-20 19:37 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - FlexeLint cleanups - -2006-06-20 19:31 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Polish things to silence FlexeLint a bit - -2006-06-20 11:39 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/rfc2616.c, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl: - - Rename vcl_lang.h to vcl.h and include practically nowhere. - - Remove #include bogohandling in vcl_gen_fixed_token.tcl - -2006-06-20 10:31 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - At the expense of some complexity and a small runtime overhead, - isolate the compiled code from the internal structures of the cache - process through of VRT functions. - -2006-06-20 09:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Work towards making struct sess opaque to the generated code. - -2006-06-20 09:28 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Rename the VCL compilers public functions to VCC prefix - -2006-06-20 09:25 phk - - * trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Get rid of VCL_FARGS and VCL_PASS_ARGS macros. - - Generate VGC prefixes instead of VCL. - -2006-06-20 09:15 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cache_vrt.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/include/vrt.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl: - - Start putting some structure in the sources relating to VCL handling: - - Split the runtime support for compiled varnish programs out and give it the - prefix "VRT". - - Start using the prefix "VGC" for generated code. - - Prefix "VCC" will be for the compiler and "VCL" for calling the - compiled and - loaded functions. - -2006-06-18 10:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Output line+pos for counts. - -2006-06-18 10:19 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Insert a count-point after each conditional. - -2006-06-18 10:16 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Get the sense of string compares right. - -2006-06-18 10:12 phk - - * trunk/varnish-cache/bin/varnishd/rfc2616.c: - - debug printf for max-age - -2006-06-18 10:10 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Implement req.request properly - -2006-06-18 10:04 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Pass if we spot an Authenticate or Cookie header - -2006-06-18 10:03 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Add VCL function for getting HTTP header - -2006-06-18 10:02 phk - - * trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add support for investigating random HTTP headers. - -2006-06-18 09:16 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Add wrappers around VCL methos so logging and checking of returned handling - can be centralized. - - Remove old handling callbacks. - - Call hit/miss methods instead of lookup method. - -2006-06-18 09:14 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - add explicit "lookup" to recv method - -2006-06-18 09:11 phk - - * trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Correctly handle \ sequences in .h files in vcl_gen_fixed_token.tcl - - Make handling a named enum, and use it as a bitmap. - - Add "lookup" reserved word - - Add VCL_done() macro to use in compiled code to set handling and drop - the per-handling callbacks (apart from VCL_error()) - -2006-06-18 07:28 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add "deliver" keyword to VCL compiler. - - Split vcl_lookup() in vcl_hit() and vcl_miss() - -2006-06-16 10:22 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Initial http_GetHdrField() function. - - Improve chunked encoding, allocate big storage chunks and trim the - last one at the end, instead of one storage chunk for each chunk - the remote server sends. - - Call RFC2616 policy code. - - Store headers from backend in cache and return to client. - -2006-06-16 10:20 phk - - * trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add header field to object - -2006-06-16 10:19 phk - - * trunk/varnish-cache/include/http_headers.h: - - Supress Transfer-Encoding - -2006-06-16 10:18 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/rfc2616.c: - - The beginnings of rfc2616 policy implemenation. - -2006-06-16 10:17 phk - - * trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Add trim method to storage backends so chunked encoding can be - stored efficiently. - -2006-06-16 10:16 phk - - * trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/time.c: - - Add time parse/format functions to libvarnish - -2006-06-15 08:04 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - less noise - -2006-06-15 08:04 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - Less noise - -2006-06-14 09:57 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - start examining HTTP status codes from backend - -2006-06-14 09:39 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Add vca_write_obj() which writes an sbuf (as) HTTP header and the - object from the sessions to the client. - -2006-06-14 09:25 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Clean up session messages a bit - -2006-06-14 09:23 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add HttpError tag - -2006-06-14 09:03 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Sanitize close/recycle session logic a bit. - -2006-06-14 08:53 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_main.c: - - Initialize the cache_acceptor.c/VCA in the same manner as other parts. - -2006-06-14 07:21 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/stevedore.h, - trunk/varnish-cache/bin/varnishd/storage_file.c: - - Give storage backends a "send" method. - - Let storage_file use sendfile(2) for it. - -2006-06-14 06:58 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Complete the storage_file method. - -2006-06-13 20:09 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Default to "file" stevedore from now on. - -2006-06-13 20:06 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Be more aggressive about mmap'ing memory. The size_t thing is a bogus - constraint in FreeBSD and we shouldn't really listen to it. - - On my laptop I can mmap 2422MB file this way. - - This may be so aggressive that it leaves insufficient address space for - malloc/threadstacks and other issues. - - If we find a way to pick up a platform/architecture specific limit, we - can enforce that along the way. - - For now people can just specify a saner and smaller "-sfile" size. - -2006-06-13 13:47 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - mmap as much as the file as we are able to when the cache process opens - the stevedore. - - This should probably be (fine-)tuned later on as it might be too aggressive - when faced with user errors. - - Also, might it be possible to mmap() more than MAX_SIZE_T bytes if - it is done in multiple calls ? - -2006-06-13 13:14 phk - - * trunk/varnish-cache/bin/varnishd/storage_file.c: - - Calculate the size of the backing store file. - - A size can be specified in absolute terms (suffix: k, m, g, t supported), - but also as a percentage of the filesystems free space (suffix '%'). - - If the specified size is larger than an off_t can cope, we bisect - repeatedly until it can. - - If the size exceeds the available space of the filesystem, we truncate - to 80% of the free space. - - Then round down to an integral number of blocks, sized by the larger - of the filesystem blocksize and the pagesize. - - This was tricker than I'd expected... - -2006-06-13 13:10 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Clone the stevedore before calling its init function and be more precise - about any optional arguments. - -2006-06-13 08:05 phk - - * trunk/varnish-cache/bin/varnishd/_stevedore.h, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/stevedore.h: - - After having a strong cup of tea: don't name files with leading underscore - even though that's how FreeBSD's kernel does it. In my private world - a leading underscore means "junk file, remove at your pleasure". - -2006-06-13 08:02 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/storage_file.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Clone the malloc stevedore to the file stevedore - -2006-06-13 07:59 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Remember to tell getopt about -s - -2006-06-13 07:57 phk - - * trunk/varnish-cache/bin/varnishd/_stevedore.h, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/storage_malloc.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Put more meat on the stevedore (storage backend) interface: - - Pull the struct definition into _stevedore.h and include this from - cache.h and mgt.h, they both need to be able to see it. - - Add the stevedore pointer as an argument to the stevedore alloc function - so multiple stevedores is possible later on. - - Add the stevedore pointer to the storage object, so freeing it again is - possible. - - Add -s argument processing to select a given stevedore, call it's ->init - method and pass the stevedore in the heritage. - - In the cache process pick stevedore out from heritage, call its open - method. - -2006-06-13 07:26 phk - - * trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Use NULL init method - -2006-06-13 07:25 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c: - - Allow for NULL init methods for hash and stevedore - -2006-05-01 12:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Use vca_write/vca_flush - -2006-05-01 12:59 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Use vca_write/vca_flush - -2006-05-01 12:51 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Use vca_write/vca_flush - -2006-05-01 12:45 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Add vca_write() and vca_flush(), two functions which will attempt to - use writev() if possible. - - vca_flush() must be called before any memory previosly given to - vca_write is overwritten, and after the last call to vca_write() - -2006-05-01 12:28 phk - - * trunk/varnish-cache/bin/varnishd/flint.lnt, - trunk/varnish-cache/bin/varnishd/flint.sh: - - Add FlexeLint files - -2006-05-01 12:27 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - bandaid for name-clash - -2006-05-01 12:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Keep track of how many connections we have open - -2006-05-01 12:27 phk - - * trunk/varnish-cache/bin/varnishd/cache.h: - - add missing extern - -2006-05-01 10:55 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Add INCOMPL() macro to mark missing code. - - Add http_HdrIs() to check if we have a given header and if we do - if it has a given value. - - Use it. - - Ignore SIGPIPE since SO_NOSIGPIPE doesn't work reliably, (but set - it on accepted TCP connections anyway). - - Update passing to match fetching, including a chunked encoding method. - -2006-05-01 07:54 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Add yet another thread with an event engine to monitor idle backend - connections and clean them out if the backend closes. - -2006-05-01 07:53 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Centralize "Connection: close" handling from the backend. - - Loop until we have the entire chunk in chunked encoding - -2006-04-25 09:32 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c: - - test backend connections at allocation time. - - General bush-wacking in the fetch code. - -2006-04-25 09:31 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Fix argument to http_BuildSbuf - -2006-04-25 09:30 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Keep alive often enough - -2006-04-25 08:17 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Make width colum wider and decimal - -2006-04-25 08:17 phk - - * trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add new shmlog tags and handling states - -2006-04-25 08:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Implement a rudimentary chunked Transfer-Encoding - -2006-04-25 07:10 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - reset header count before we dissect - -2006-04-25 07:04 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Track backend connections in shmem log - -2006-04-25 06:52 phk - - * trunk/varnish-cache/bin/varnishd/cache_http.c: - - Add an end pointer so allocation size can be changed on the fly - -2006-04-25 06:48 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Move shmlog entry, remove debugging - -2006-04-25 06:16 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_http.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Redo http header storage and processing - -2006-04-24 19:10 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add an indecisive comment - -2006-04-24 19:09 phk - - * trunk/varnish-cache/include/http_headers.h: - - Sort and annotate - -2006-04-19 06:38 phk - - * trunk/varnish-cache/bin/varnishd/cache_fetch.c: - - Loop until we have read it all - -2006-04-19 06:34 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_fetch.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Implement enough of FetchSession and DeliverSession that we can actually - deliver a cached object. - -2006-04-18 08:23 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add busyflag and strorage link to objects. - - Initialize default hasher and stevedore. - - Give each workerthread an object pointer to be kept populated with - a template object for when lookups miss and need to insert one. - - Add libmd to get MD5, (choice of hash-algorithm to be revisited later) - - Implement lookup, begin on fetch. - -2006-04-18 07:34 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/storage_malloc.c: - - Add trivial malloc backed storage backend. - -2006-04-12 08:58 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/libvcl.h, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_priv.h, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Implement the three function VCL model in the compiler. - -2006-04-12 08:56 phk - - * trunk/varnish-cache/include/http_headers.h: - - Add ETag: header - -2006-04-11 08:28 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h, - trunk/varnish-cache/bin/varnishd/hash_simple_list.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/tcp.c: - - Beginnings of the object lookup stuff: A simple list based - implementation to get things moving. - -2006-04-06 10:01 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Close or recycle backend connections as appropriate - -2006-04-06 10:00 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c: - - Add VBE_RecycleFd() function to recycle backend connections - -2006-04-06 09:59 phk - - * trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Pass Content-Encoding header - -2006-04-06 09:38 phk - - * trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - Output the fd in decimal instead of hex. - - Do Id Keyword - -2006-04-06 09:33 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Rename hdr_end to a more sensible rcv_ptr which points to the first - unaccounted for character in the buffer. - - Do Id Keyword - -2006-04-06 09:30 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add shmlog tags for pipe and pass handling - -2006-04-06 09:11 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Log tag for session reuse. - - Do Id Keyword - -2006-04-06 09:10 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Recycle sessions instead of retiring them. - -2006-04-06 09:09 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - Prune the bits we used from the input buffer before we recycle the - session. - -2006-04-06 09:09 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c: - - Add a vca_recycle_session() function which sticks a session back into - the acceptors event engine. - - Do Id keyword - -2006-04-06 09:08 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Don't log the terminating NUL on response proto field. - -2006-04-06 08:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Add an assert, remove debugging. - -2006-04-06 08:18 phk - - * trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Respect VCL choice of handling - - Do Id keyword - -2006-04-06 08:16 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Don't attempt to restart child process (yet). - - Add Id Keyword handling - -2006-04-06 08:15 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c: - - It's cheaper to pipe than to pass, so if the client indicates - "Connection: close", pipe instead of passing. - -2006-04-06 07:50 phk - - * trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c: - - Use HttpdBuildSbuf() - - Enable Id keyword - -2006-04-06 07:50 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Add a function to (re)build a HTTP request or response into an sbuf. - - Enable Id keyword - -2006-04-05 10:33 phk - - * trunk/varnish-cache/autogen.sh: - - Eliminate leaked developer hacks. - -2006-04-05 09:40 phk - - * trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c: - - Account for the last byte of the header. - -2006-04-04 10:35 des - - * trunk/varnish-cache/configure.ac, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/strlcat.c, - trunk/varnish-cache/lib/libcompat/strlcpy.c: - - I can't get AM_CONDITIONAL to work properly, so use a bigger hammer. - -2006-04-04 10:09 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/mgt_child.c: - - More portability changes: include config.h and compat.h, get rid of - __unused. - -2006-04-04 10:08 des - - * trunk/varnish-cache/bin/varnishd/Makefile.am: - - Link in libcompat, and libsbuf is now static. - -2006-04-04 10:08 des - - * trunk/varnish-cache/lib/libsbuf/Makefile.am: - - Make libsbuf static. - -2006-04-04 10:07 des - - * trunk/varnish-cache/configure.ac, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/compat.h, - trunk/varnish-cache/lib/Makefile.am, - trunk/varnish-cache/lib/libcompat, - trunk/varnish-cache/lib/libcompat/Makefile.am, - trunk/varnish-cache/lib/libcompat/strlcat.c, - trunk/varnish-cache/lib/libcompat/strlcpy.c: - - Add a libcompat with strlcat() and strlcpy() from OpenBSD. - -2006-04-04 09:05 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Get pass-through working for the first request. - - Now we can start to play with multi-request sessions and all that. - -2006-04-04 08:20 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add HTTP response headers and processing. - -2006-04-04 07:46 phk - - * trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/cli.c: - - Reverse constification of Argv functions. After cascading through all - the CLI functions we hit the fact that the evbuffer functions in libevent - are not properly constified. - - It's better to deconst the error messages and just "let it be known" that - argv[0] is const (or NULL). - -2006-04-04 07:30 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_pass.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Get "Pass" mode moving - -2006-04-04 07:29 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Make the "receive a HTTP protocol header" code generic - -2006-04-04 07:27 phk - - * trunk/varnish-cache/include/vcl_lang.h: - - Add a session callback pointer to struct sess. - -2006-04-04 07:26 phk - - * trunk/varnish-cache/bin/varnishd/cli_event.c: - - Use bufferevent_base_set() from libevent - -2006-04-04 07:24 phk - - * trunk/varnish-cache/contrib/libevent/event.h: - - Add a missing prototype until libevent people catch up. - -2006-04-04 07:24 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Add a Debug shmemlog tag. - -2006-04-04 07:24 des - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Portability tweaks: use our own sbuf.h and queue.h; get rid of - __DECONST; get - rid of digittoint() (which is pointless since ISO C guarantees that digits - are consecutive in the execution character set); get rid of __unused. - - Also fix a buglet in argv.c's BackSlash() (parsing of octal numbers), and - constify the array passed around by ParseArgv() and FreeArgv(). - -2006-04-03 14:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Move memset further up. - -2006-04-03 14:20 des - - * trunk/varnish-cache/Makefile.am, trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/configure.ac, trunk/varnish-cache/contrib/Makefile.am: - - Hook up libevent to the build. Note that this should be made - conditional at - some later date. - -2006-04-03 14:04 des - - * trunk/varnish-cache/contrib/libevent/WIN32-Code/provos at badschwartau.provos.org.12766: - - - GC - -2006-04-03 12:05 des - - * trunk/varnish-cache/contrib/libevent/sample/Makefile.in, - trunk/varnish-cache/contrib/libevent/test/Makefile.in: - - Remove generated files which were committed by mistake. - -2006-04-03 11:59 des - - * trunk/varnish-cache/contrib/libevent/Makefile.am, - trunk/varnish-cache/contrib/libevent/README, - trunk/varnish-cache/contrib/libevent/WIN32-Code/win32.c, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/libevent.dsp, - trunk/varnish-cache/contrib/libevent/buffer.c, - trunk/varnish-cache/contrib/libevent/configure.in, - trunk/varnish-cache/contrib/libevent/devpoll.c, - trunk/varnish-cache/contrib/libevent/epoll.c, - trunk/varnish-cache/contrib/libevent/evbuffer.c, - trunk/varnish-cache/contrib/libevent/event.3, - trunk/varnish-cache/contrib/libevent/event.c, - trunk/varnish-cache/contrib/libevent/event.h, - trunk/varnish-cache/contrib/libevent/event_rpcgen.py, - trunk/varnish-cache/contrib/libevent/event_tagging.c, - trunk/varnish-cache/contrib/libevent/http.c, - trunk/varnish-cache/contrib/libevent/http.h, - trunk/varnish-cache/contrib/libevent/kqueue.c, - trunk/varnish-cache/contrib/libevent/log.h, - trunk/varnish-cache/contrib/libevent/poll.c, - trunk/varnish-cache/contrib/libevent/rtsig.c, - trunk/varnish-cache/contrib/libevent/select.c, - trunk/varnish-cache/contrib/libevent/signal.c, - trunk/varnish-cache/contrib/libevent/strlcpy.c, - trunk/varnish-cache/contrib/libevent/test/Makefile.am, - trunk/varnish-cache/contrib/libevent/test/regress.c, - trunk/varnish-cache/contrib/libevent/test/regress.h, - trunk/varnish-cache/contrib/libevent/test/regress.rpc, - trunk/varnish-cache/contrib/libevent/test/regress_http.c, - trunk/varnish-cache/contrib/libevent/test/test-weof.c, - trunk/varnish-cache/contrib/libevent/test/test.sh: - - Update from libevent CVS trunk. - -2006-04-03 11:05 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Segregate http header fields into a separate structure, we will - reuse them a few places by the looks of it. - - Add VCA_UNKNOWNHDR (=10) fields for unknown HTTP headers. - If more headers arrive than that, they're lost (and logged as such). - -2006-04-03 11:03 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - How I wish people would think more ahead when writing libraries like - libevent. The entire "implicit event engine" api assumption stinks. - - Deal with it better. - -2006-04-03 09:02 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_pipe.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - A little step for humanity but a big step for varnish: - - Implement pipe-through mode and see the first web-pages actually - pass through varnish. - -2006-04-03 07:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Call the init function when the VCL code is loaded. - We may want to postpone this to use time later on. - -2006-04-03 07:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/include/http_headers.h, - trunk/varnish-cache/include/shmlog_tags.h, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add 5 dummy fields to the http headers, we will need them subsequently. - -2006-03-31 08:27 phk - - * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl: - - Use http_headers.h to define session fields for headers and to parse - them out of the header. - -2006-03-31 08:26 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c: - - Add missing pthread.h includes - -2006-03-31 08:25 phk - - * trunk/varnish-cache/include/shmlog_tags.h: - - Use http_headers.h to define HTTP header tags for logging - -2006-03-31 08:24 phk - - * trunk/varnish-cache/include/http_headers.h: - - Reusable macro definition of HTTP headers. We will need these - several different places in the sources. - -2006-03-30 11:16 phk - - * trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - get us closer to a connection to the backend - -2006-03-30 10:56 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Rework the compilation of backend specifications in order to be able - to check the provided hostname/portname at compile time. - -2006-03-30 09:26 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_backend.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Add the beginning of a backend connection pool - -2006-03-30 08:05 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Promote the poll mutex to be a session mutex so that we can use it - for the VCL reference as well, this saves locking operations. - - Call the atual VCL code when we get the request. - -2006-03-30 07:05 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_pool.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/include/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Integrate the VCL code closer in the cache process: The passed - argument will be the session structure. - - Add the pool of worker threads (cache_pool). With a unitary nature - of the VCL code, the HTTP parsing can be postponed to the worker thread. - - This actually helps us with CPU cache locality as it will reduce the - amount of memory allocated on one CPU but freed on another. - -2006-03-27 14:12 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add config.load, config.inline and config.use commands. - -2006-03-27 14:11 phk - - * trunk/varnish-cache/include/libvcl.h: - - Forgot to add this one. Prototypes for the VCL compiler. - -2006-03-27 14:10 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - Add VCL_CompileFile() function. - -2006-03-27 13:59 phk - - * trunk/varnish-cache/bin/varnishd/mgt_child.c: - - Just return if there is nothing to wait for. We get SIGCHLD'ed on - the popen child process. - -2006-03-27 13:57 phk - - * trunk/varnish-cache/include/cli_priv.h: - - Add a macro which we can #ifdef - -2006-03-27 12:27 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_vcl.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Build default VCL from "-b backend_IP" option and pass it to client - via heritage. - -2006-03-27 11:51 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c: - - edge closer towards being a nice member of society - -2006-03-27 11:22 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Experimentally pull in VCL program - -2006-03-27 11:21 phk - - * trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_priv.h: - - Actually generate a shared object - -2006-03-27 11:21 phk - - * trunk/varnish-cache/include/vcl_lang.h: - - Stuff VCL programs needs to know about. - -2006-03-27 09:02 phk - - * trunk/varnish-cache/configure.ac: - - add libvcl - -2006-03-27 09:01 phk - - * trunk/varnish-cache/lib/libvcl/Makefile, - trunk/varnish-cache/lib/libvcl/Makefile.am: - - Put under control of auto* tools - -2006-03-27 09:01 phk - - * trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c: - - Newly generated code - -2006-03-27 09:00 phk - - * trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl: - - Don't generate sparse array code. - -2006-03-24 10:46 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c, - trunk/varnish-cache/include/shmlog_tags.h: - - More complete HTTP parsing and logging. - -2006-03-24 10:23 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_httpd.c: - - Change session memory management to avoid pollution - - Add fledling httpd parsing - -2006-03-24 10:22 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c: - - Add a VSLR() variant which logs a byte range without spending time in - sprintf - -2006-03-24 09:45 phk - - * trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/include/shmlog_tags.h: - - Log remote IP#:port on session open - -2006-03-24 09:14 phk - - * trunk/varnish-cache/bin/varnishlog/varnishlog.c: - - put symbolic names on the tags - -2006-03-24 09:05 phk - - * trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/bin/varnishlog, - trunk/varnish-cache/bin/varnishlog/Makefile.am, - trunk/varnish-cache/bin/varnishlog/varnishlog.c, - trunk/varnish-cache/configure.ac: - - Add a minimal log tailer. - -2006-03-24 08:43 phk - - * trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/include/shmlog.h, - trunk/varnish-cache/include/shmlog_tags.h: - - Move the SHM tags into a resuable .h file. - - Minor nits - -2006-03-23 15:31 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cache_shmlog.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add shared memory log setup and stuffer function in the child process. - - Log whenever we get a CLI ping - -2006-03-23 12:20 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache.h, - trunk/varnish-cache/bin/varnishd/cache_acceptor.c, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Now we're starting to get somewhere: Accept connections and assemble - a HTTP request. - -2006-03-23 08:45 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/tcp.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Open TCP sockets - -2006-03-17 13:41 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Make it possible to suspend and resume a cli connection while we wait - for response from the child (or otherwise). - - Add a generic "pass-through" handler for cli requests we just pass on - to the child. - -2006-03-17 10:03 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/mgt.h, - trunk/varnish-cache/bin/varnishd/mgt_child.c, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add multiplexing for the mgt->child cli connection and get ping/pong - working across it. - - The management process will now keep the child process watchdog from - expiring. - -2006-03-16 12:14 phk - - * trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/lib/libvarnish/argv.c, - trunk/varnish-cache/lib/libvarnish/cli.c: - - cleanup - -2006-03-16 10:48 phk - - * trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/cache_main.c, - trunk/varnish-cache/bin/varnishd/heritage.h, - trunk/varnish-cache/bin/varnishd/varnishd.c: - - Expand the empty shell a bit. - - Add CLI handler on stdin (for now, in production only if - debug is specified). - - Implement help, verbos, ping and start. - - start forks the child process, sets up listeners on its stdout/stderr - (where nothing should arrive in production). - - Add SIGCHLD handler to reap and restart the child. - - Add shell "main" for the child: Set up a CLI handler on the pipes - passed as heritage. - - Add ping command and keepalive timeout. - -2006-03-16 10:46 phk - - * trunk/varnish-cache/bin/varnishd/cli_event.c, - trunk/varnish-cache/bin/varnishd/cli_event.h: - - Functions to handle the CLI with event(3)'s buffer events. - - This may eventually belong in a library for wider use. - -2006-03-16 09:02 phk - - * trunk/varnish-cache/include/cli.h, - trunk/varnish-cache/include/cli_priv.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/cli.c, - trunk/varnish-cache/lib/libvcl/Makefile: - - Generic and public stuff for CLI protocol handling. - -2006-03-16 08:30 phk - - * trunk/varnish-cache/include/cli.h: - - add min+max argument counts - -2006-03-15 20:34 phk - - * trunk/varnish-cache/include/cli.h: - - Add definitions pertaining to the ascii-protocol which will be used - multiple different places in the varnish architecture. - -2006-03-14 12:54 des - - * trunk/varnish-cache/contrib, trunk/varnish-cache/contrib/libevent, - trunk/varnish-cache/contrib/libevent/Makefile.am, - trunk/varnish-cache/contrib/libevent/README, - trunk/varnish-cache/contrib/libevent/WIN32-Code, - trunk/varnish-cache/contrib/libevent/WIN32-Code/config.h, - trunk/varnish-cache/contrib/libevent/WIN32-Code/misc.c, - trunk/varnish-cache/contrib/libevent/WIN32-Code/misc.h, - trunk/varnish-cache/contrib/libevent/WIN32-Code/provos at badschwartau.provos.org.12766, - trunk/varnish-cache/contrib/libevent/WIN32-Code/win32.c, - trunk/varnish-cache/contrib/libevent/WIN32-Prj, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/event_test, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/event_test/event_test.dsp, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/event_test/test.txt, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/libevent.dsp, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/libevent.dsw, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/signal_test, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/signal_test/signal_test.dsp, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/time_test, - trunk/varnish-cache/contrib/libevent/WIN32-Prj/time_test/time_test.dsp, - trunk/varnish-cache/contrib/libevent/acconfig.h, - trunk/varnish-cache/contrib/libevent/buffer.c, - trunk/varnish-cache/contrib/libevent/compat, - trunk/varnish-cache/contrib/libevent/compat/sys, - trunk/varnish-cache/contrib/libevent/compat/sys/_time.h, - trunk/varnish-cache/contrib/libevent/compat/sys/queue.h, - trunk/varnish-cache/contrib/libevent/compat/sys/tree.h, - trunk/varnish-cache/contrib/libevent/configure.in, - trunk/varnish-cache/contrib/libevent/devpoll.c, - trunk/varnish-cache/contrib/libevent/epoll.c, - trunk/varnish-cache/contrib/libevent/epoll_sub.c, - trunk/varnish-cache/contrib/libevent/evbuffer.c, - trunk/varnish-cache/contrib/libevent/event-internal.h, - trunk/varnish-cache/contrib/libevent/event.3, - trunk/varnish-cache/contrib/libevent/event.c, - trunk/varnish-cache/contrib/libevent/event.h, - trunk/varnish-cache/contrib/libevent/evsignal.h, - trunk/varnish-cache/contrib/libevent/kqueue.c, - trunk/varnish-cache/contrib/libevent/log.c, - trunk/varnish-cache/contrib/libevent/log.h, - trunk/varnish-cache/contrib/libevent/poll.c, - trunk/varnish-cache/contrib/libevent/rtsig.c, - trunk/varnish-cache/contrib/libevent/sample, - trunk/varnish-cache/contrib/libevent/sample/Makefile.am, - trunk/varnish-cache/contrib/libevent/sample/Makefile.in, - trunk/varnish-cache/contrib/libevent/sample/event-test.c, - trunk/varnish-cache/contrib/libevent/sample/signal-test.c, - trunk/varnish-cache/contrib/libevent/sample/time-test.c, - trunk/varnish-cache/contrib/libevent/select.c, - trunk/varnish-cache/contrib/libevent/signal.c, - trunk/varnish-cache/contrib/libevent/test, - trunk/varnish-cache/contrib/libevent/test/Makefile.am, - trunk/varnish-cache/contrib/libevent/test/Makefile.in, - trunk/varnish-cache/contrib/libevent/test/bench.c, - trunk/varnish-cache/contrib/libevent/test/regress.c, - trunk/varnish-cache/contrib/libevent/test/test-eof.c, - trunk/varnish-cache/contrib/libevent/test/test-init.c, - trunk/varnish-cache/contrib/libevent/test/test-time.c, - trunk/varnish-cache/contrib/libevent/test/test-weof.c, - trunk/varnish-cache/contrib/libevent/test/test.sh: - - Add Niels Provos's libevent 1.1a. - -2006-03-14 12:00 des - - * trunk/varnish-cache/include/hash.h, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/include/queue.h, - trunk/varnish-cache/include/sbuf.h, trunk/varnish-cache/include/tree.h: - - Set the correct property (svn:keywords, not svn:keyword) - -2006-03-14 11:57 des - - * trunk/varnish-cache/lib/libsbuf/Makefile.am, - trunk/varnish-cache/lib/libsbuf/sbuf.3, - trunk/varnish-cache/lib/libsbuf/sbuf.c: - - Add a man page, and set the correct property (svn:keywords, not - svn:keyword) - -2006-03-14 09:31 phk - - * trunk/varnish-cache/bin/varnishd/varnishd.c: - - Add some trivial bits while I think about the hard ones - -2006-03-14 09:15 phk - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/libvarnish.h, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnish/argv.c: - - Add a function to break a command line like string into an argv[]. - This will be useful for the various text based protocols etc. - -2006-03-13 14:23 des - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/hash.h, - trunk/varnish-cache/include/queue.h, trunk/varnish-cache/include/tree.h: - - Add hash.h, queue.h and tree.h from NetBSD-CURRENT. - -2006-03-13 14:14 des - - * trunk/varnish-cache/configure.ac, trunk/varnish-cache/include/sbuf.h, - trunk/varnish-cache/lib/Makefile.am, trunk/varnish-cache/lib/libsbuf, - trunk/varnish-cache/lib/libsbuf/Makefile.am, - trunk/varnish-cache/lib/libsbuf/sbuf.c: - - Add libsbuf, based on the latest sbuf code from FreeBSD-CURRENT. - -2006-03-13 13:30 phk - - * trunk/varnish-cache/autogen.sh: - - Pick up the gnu-autotools binary directory if we spot one. This - makes life on FreeBSD somewhat easier. - -2006-03-13 12:37 phk - - * trunk/varnish-cache/lib/Makefile.am, trunk/varnish-cache/lib/libvcl, - trunk/varnish-cache/lib/libvcl/Makefile, - trunk/varnish-cache/lib/libvcl/sample.vcl, - trunk/varnish-cache/lib/libvcl/vcl_compile.c, - trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c, - trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl, - trunk/varnish-cache/lib/libvcl/vcl_lang.h, - trunk/varnish-cache/lib/libvcl/vcl_priv.h, - trunk/varnish-cache/lib/libvcl/vcl_token_defs.h: - - Add first cut of VCL compiler to the tree. - - The Makefile is a temporary shim until I get the auto* stuff working. - - The sample.vcl is a small mock-up to test the compiler. - - Some of the .h files needs to move other places in the fullness of time. - - But other than that... - -2006-03-02 10:32 des - - * trunk/varnish-cache: - - Ignore generated files; generated with the following command: - - svk propset svn:ignore "$(svk status | awk '/^\?/ { print $2 }')" . - -2006-03-02 10:31 des - - * trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/varnish, - trunk/varnish-cache/include/varnish/assert.h, - trunk/varnish-cache/include/varnishapi.h, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am, - trunk/varnish-cache/lib/libvarnishapi/varnish_debug.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_log.c, - trunk/varnish-cache/lib/libvarnishapi/varnish_util.c: - - Untested & undocumented login code. I don't have time to continue working - on it right now, but I want it in the tree so phk doesn't start duplicating - my effort. - -2006-03-02 10:29 des - - * trunk/varnish-cache/bin/varnishd: - - Add varnishd to ignore list. - -2006-02-27 14:21 des - - * trunk/varnish-cache/include: - - Ignore generated files. - -2006-02-27 14:21 des - - * trunk/varnish-cache/lib, trunk/varnish-cache/lib/libvarnish, - trunk/varnish-cache/lib/libvarnishapi: - - Ignore generated files. - -2006-02-27 14:21 des - - * trunk/varnish-cache/bin, trunk/varnish-cache/bin/varnishd: - - Ignore generated files. - -2006-02-27 11:10 des - - * trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am: - - Correct libtool idiom: run libtoolize after aclocal, and use LTLIBRARIES - instead of LIBRARIES. - -2006-02-27 09:55 des - - * trunk/varnish-cache/LICENSE: - - Don't forget the license! - -2006-02-24 14:35 des - - * trunk/varnish-cache/Makefile.am, trunk/varnish-cache/autogen.sh, - trunk/varnish-cache/bin, trunk/varnish-cache/bin/Makefile.am, - trunk/varnish-cache/bin/varnishd, - trunk/varnish-cache/bin/varnishd/Makefile.am, - trunk/varnish-cache/bin/varnishd/varnishd.c, - trunk/varnish-cache/configure.ac, trunk/varnish-cache/include, - trunk/varnish-cache/include/Makefile.am, - trunk/varnish-cache/include/varnishapi.h, trunk/varnish-cache/lib, - trunk/varnish-cache/lib/Makefile.am, - trunk/varnish-cache/lib/libvarnish, - trunk/varnish-cache/lib/libvarnish/Makefile.am, - trunk/varnish-cache/lib/libvarnishapi, - trunk/varnish-cache/lib/libvarnishapi/Makefile.am: - - Source tree structure as agreed. - -2006-02-22 14:31 des - - * trunk/varnish-cache, trunk/varnish-doc, trunk/varnish-proto, - trunk/varnish-tools: - - Additional subdivisions. - From des at projects.linpro.no Thu May 17 16:50:49 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 17 May 2007 18:50:49 +0200 (CEST) Subject: r1445 - in trunk/varnish-cache: doc etc Message-ID: <20070517165049.544BD1EC2F5@projects.linpro.no> Author: des Date: 2007-05-17 18:50:49 +0200 (Thu, 17 May 2007) New Revision: 1445 Modified: trunk/varnish-cache/doc/ trunk/varnish-cache/etc/ Log: Ignore generated files. Property changes on: trunk/varnish-cache/doc ___________________________________________________________________ Name: svn:ignore + Makefile Makefile.in *.html Property changes on: trunk/varnish-cache/etc ___________________________________________________________________ Name: svn:ignore + Makefile Makefile.in From des at projects.linpro.no Thu May 17 16:51:41 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 17 May 2007 18:51:41 +0200 (CEST) Subject: r1446 - in branches/1.0: . doc etc Message-ID: <20070517165141.DD6531EC410@projects.linpro.no> Author: des Date: 2007-05-17 18:51:41 +0200 (Thu, 17 May 2007) New Revision: 1446 Modified: branches/1.0/ branches/1.0/doc/ branches/1.0/etc/ Log: Merged revisions 1443-1445 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ................ r1443 | des | 2007-05-17 14:21:50 +0200 (Thu, 17 May 2007) | 38 lines Merged revisions 1437-1442 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r1437 | ssm | 2007-05-16 17:20:47 +0200 (Wed, 16 May 2007) | 1 line debian changelog, so far ........ r1438 | des | 2007-05-16 22:02:08 +0200 (Wed, 16 May 2007) | 7 lines Tweak some of the defaults: - bind to all interfaces - use a 1 gibibyte - remove hash setting, it's not safe - tweak some variable names and comments ........ r1439 | des | 2007-05-16 22:03:32 +0200 (Wed, 16 May 2007) | 2 lines Improve the descriptions of some of the options and parameters. ........ r1440 | ingvar | 2007-05-16 23:08:43 +0200 (Wed, 16 May 2007) | 6 lines * Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070516 - Wrapping up for 1.0.4 - Changes in sysconfig and init scripts. Syncing with files in trunk/debian ........ r1441 | des | 2007-05-17 13:48:35 +0200 (Thu, 17 May 2007) | 3 lines Add an XML+XSLT-based change log. Unlike the change logs for previous releases, this one was written by hand, which makes it user-readable. ........ r1442 | des | 2007-05-17 13:51:46 +0200 (Thu, 17 May 2007) | 2 lines We won't use this any more. ........ ................ r1445 | des | 2007-05-17 18:50:49 +0200 (Thu, 17 May 2007) | 2 lines Ignore generated files. ................ Property changes on: branches/1.0 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434,1437-1442 + /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434,1437-1445 Property changes on: branches/1.0/doc ___________________________________________________________________ Name: svn:ignore + Makefile Makefile.in *.html Property changes on: branches/1.0/etc ___________________________________________________________________ Name: svn:ignore + Makefile Makefile.in From ingvar at projects.linpro.no Thu May 17 18:17:12 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Thu, 17 May 2007 20:17:12 +0200 (CEST) Subject: r1447 - trunk/varnish-cache/redhat Message-ID: <20070517181712.5491C1EC3F7@projects.linpro.no> Author: ingvar Date: 2007-05-17 20:17:12 +0200 (Thu, 17 May 2007) New Revision: 1447 Modified: trunk/varnish-cache/redhat/varnish.initrc Log: just some output cleanup Modified: trunk/varnish-cache/redhat/varnish.initrc =================================================================== --- trunk/varnish-cache/redhat/varnish.initrc 2007-05-17 16:51:41 UTC (rev 1446) +++ trunk/varnish-cache/redhat/varnish.initrc 2007-05-17 18:17:12 UTC (rev 1447) @@ -21,14 +21,6 @@ DAEMON="/usr/sbin/varnishd" -# $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one -# have to set up a backend. -if [ "$DAEMON_OPTS" = "" ]; then - echo "No values specified in DAEMON_OPTS. Please read the varnishd(1)" - echo "manpage and put configuration options in /etc/sysconfig/varnish" - exit 1 -fi - mkdir -p /var/run/varnish 2>/dev/null # Open files (usually 1024, which is way too small for varnish) @@ -39,16 +31,25 @@ case "$1" in start) echo -n "Starting varnish HTTP accelerator: " - daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} - sleep 1 - pkill -0 $PROCNAME - RETVAL=$? - if [ $RETVAL -eq 0 ] - then + + # $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one + # has to set up a backend, or /tmp will be used, which is a bad idea. + if [ "$DAEMON_OPTS" = "" ]; then + echo "\$DAEMON_OPTS empty." + echo -n "Please put configuration options in /etc/sysconfig/varnish" + echo_failure + else + daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /dev/null 2>&1 + sleep 1 + pkill -0 $PROCNAME + RETVAL=$? + if [ $RETVAL -eq 0 ] + then echo_success touch $LOCKFILE - else + else echo_failure + fi fi echo ;; From ingvar at projects.linpro.no Thu May 17 21:11:37 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Thu, 17 May 2007 23:11:37 +0200 (CEST) Subject: r1448 - trunk/varnish-cache/redhat Message-ID: <20070517211137.2901A1EC3F7@projects.linpro.no> Author: ingvar Date: 2007-05-17 23:11:37 +0200 (Thu, 17 May 2007) New Revision: 1448 Modified: trunk/varnish-cache/redhat/varnish.initrc Log: :- is simpler than reverse negation Modified: trunk/varnish-cache/redhat/varnish.initrc =================================================================== --- trunk/varnish-cache/redhat/varnish.initrc 2007-05-17 18:17:12 UTC (rev 1447) +++ trunk/varnish-cache/redhat/varnish.initrc 2007-05-17 21:11:37 UTC (rev 1448) @@ -24,8 +24,7 @@ mkdir -p /var/run/varnish 2>/dev/null # Open files (usually 1024, which is way too small for varnish) -[ ! "${NFILES}" ] && NFILES="131072" -ulimit -n ${NFILES} +ulimit -n ${NFILES:-131072} # See how we were called. case "$1" in From ingvar at projects.linpro.no Thu May 17 21:49:45 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Thu, 17 May 2007 23:49:45 +0200 (CEST) Subject: r1449 - trunk/varnish-cache/redhat Message-ID: <20070517214945.DEEBF1EC2AF@projects.linpro.no> Author: ingvar Date: 2007-05-17 23:49:45 +0200 (Thu, 17 May 2007) New Revision: 1449 Modified: trunk/varnish-cache/redhat/varnish.spec trunk/varnish-cache/redhat/varnish.sysconfig Log: Our default.vcl has a minor change: It uses localhost:80 (thus not default anymore, but whatever, it will work with apache httpd out of the box, and that's better for easy testing) as the backend. sysconfig file changed to reflect this. Minor cosmetic changes in the specfile Ingvar Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-05-17 21:11:37 UTC (rev 1448) +++ trunk/varnish-cache/redhat/varnish.spec 2007-05-17 21:49:45 UTC (rev 1449) @@ -1,7 +1,7 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.0.svn -Release: 20070516%{?dist} +Release: 20070517%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ @@ -47,13 +47,15 @@ %prep %setup -q +# The svn sources needs to generate a suitable configure script +# Release tarballs would not need this ./autogen.sh %build # Remove "--disable static" if you want to build static libraries # (ie for the devel package) -%configure --sbindir=/usr/sbin --disable-static +%configure --disable-static # We have to remove rpath - not allowed in Fedora # (This problem only visible on 64 bit arches) @@ -137,7 +139,7 @@ %postun libs -p /sbin/ldconfig %changelog -* Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070516 +* Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070517 - Wrapping up for 1.0.4 - Changes in sysconfig and init scripts. Syncing with files in trunk/debian Modified: trunk/varnish-cache/redhat/varnish.sysconfig =================================================================== --- trunk/varnish-cache/redhat/varnish.sysconfig 2007-05-17 21:11:37 UTC (rev 1448) +++ trunk/varnish-cache/redhat/varnish.sysconfig 2007-05-17 21:49:45 UTC (rev 1449) @@ -14,10 +14,10 @@ # Listen on port 6081, administration on localhost:6082, and forward to # content server on localhost:8080. Use a fixed-size cache file. # -DAEMON_OPTS="-a :6081 \ - -T localhost:6082 \ - -b localhost:8080 \ - -s file,/var/lib/varnish/varnish_storage.bin,1G" +#DAEMON_OPTS="-a :6081 \ +# -T localhost:6082 \ +# -b localhost:8080 \ +# -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 2, Configuration with VCL @@ -26,10 +26,10 @@ # one content server selected by the vcl file, based on the request. Use a # fixed-size cache file. # -# DAEMON_OPTS="-a :6081 \ -# -T localhost:6082 \ -# -f /etc/varnish/default.vcl \ -# -s file,/var/lib/varnish/varnish_storage.bin,1G" +DAEMON_OPTS="-a :6081 \ + -T localhost:6082 \ + -f /etc/varnish/default.vcl \ + -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 3, Advanced configuration From des at projects.linpro.no Fri May 18 08:15:23 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 18 May 2007 10:15:23 +0200 (CEST) Subject: r1450 - in trunk/varnish-cache/bin: varnishlog varnishncsa Message-ID: <20070518081523.C733B3BC067@projects.linpro.no> Author: des Date: 2007-05-18 10:15:23 +0200 (Fri, 18 May 2007) New Revision: 1450 Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: reopen needs to be volatile, or the compiler might optimize it away. Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-17 21:49:45 UTC (rev 1449) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-18 08:15:23 UTC (rev 1450) @@ -212,7 +212,7 @@ /*--------------------------------------------------------------------*/ -static sig_atomic_t reopen; +static volatile sig_atomic_t reopen; static void sighup(int sig) Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-17 21:49:45 UTC (rev 1449) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-18 08:15:23 UTC (rev 1450) @@ -347,7 +347,7 @@ /*--------------------------------------------------------------------*/ -static sig_atomic_t reopen; +static volatile sig_atomic_t reopen; static void sighup(int sig) From des at projects.linpro.no Fri May 18 09:14:11 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 18 May 2007 11:14:11 +0200 (CEST) Subject: r1451 - trunk/varnish-cache/doc Message-ID: <20070518091411.E028F1EC3F8@projects.linpro.no> Author: des Date: 2007-05-18 11:14:11 +0200 (Fri, 18 May 2007) New Revision: 1451 Modified: trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml Log: Add entry for r1450. Modified: trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml =================================================================== --- trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml 2007-05-18 08:15:23 UTC (rev 1450) +++ trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml 2007-05-18 09:14:11 UTC (rev 1451) @@ -147,6 +147,12 @@ options have been added to daemonize and create a pidfile, respectively. + + + The flag that is raised upon reception of a + SIGHUP has been marked volatile so it + will not be optimized away by the compiler. + @@ -161,6 +167,12 @@ varnishncsa output from servers which handle multiple virtual hosts far more useful. + + + The flag that is raised upon reception of a + SIGHUP has been marked volatile so it + will not be optimized away by the compiler. + From des at projects.linpro.no Fri May 18 11:22:58 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 18 May 2007 13:22:58 +0200 (CEST) Subject: r1452 - in branches/1.0: . bin/varnishlog bin/varnishncsa doc redhat Message-ID: <20070518112258.734601EC3FE@projects.linpro.no> Author: des Date: 2007-05-18 13:22:58 +0200 (Fri, 18 May 2007) New Revision: 1452 Modified: branches/1.0/ branches/1.0/bin/varnishlog/varnishlog.c branches/1.0/bin/varnishncsa/varnishncsa.c branches/1.0/doc/changes-1.0.3-1.0.4.xml branches/1.0/redhat/varnish.initrc branches/1.0/redhat/varnish.spec branches/1.0/redhat/varnish.sysconfig Log: Merged revisions 1447-1451 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r1447 | ingvar | 2007-05-17 20:17:12 +0200 (Thu, 17 May 2007) | 1 line just some output cleanup ........ r1448 | ingvar | 2007-05-17 23:11:37 +0200 (Thu, 17 May 2007) | 1 line :- is simpler than reverse negation ........ r1449 | ingvar | 2007-05-17 23:49:45 +0200 (Thu, 17 May 2007) | 10 lines Our default.vcl has a minor change: It uses localhost:80 (thus not default anymore, but whatever, it will work with apache httpd out of the box, and that's better for easy testing) as the backend. sysconfig file changed to reflect this. Minor cosmetic changes in the specfile Ingvar ........ r1450 | des | 2007-05-18 10:15:23 +0200 (Fri, 18 May 2007) | 2 lines reopen needs to be volatile, or the compiler might optimize it away. ........ r1451 | des | 2007-05-18 11:14:11 +0200 (Fri, 18 May 2007) | 2 lines Add entry for r1450. ........ Property changes on: branches/1.0 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434,1437-1445 + /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434,1437-1445,1447-1451 Modified: branches/1.0/bin/varnishlog/varnishlog.c =================================================================== --- branches/1.0/bin/varnishlog/varnishlog.c 2007-05-18 09:14:11 UTC (rev 1451) +++ branches/1.0/bin/varnishlog/varnishlog.c 2007-05-18 11:22:58 UTC (rev 1452) @@ -212,7 +212,7 @@ /*--------------------------------------------------------------------*/ -static sig_atomic_t reopen; +static volatile sig_atomic_t reopen; static void sighup(int sig) Modified: branches/1.0/bin/varnishncsa/varnishncsa.c =================================================================== --- branches/1.0/bin/varnishncsa/varnishncsa.c 2007-05-18 09:14:11 UTC (rev 1451) +++ branches/1.0/bin/varnishncsa/varnishncsa.c 2007-05-18 11:22:58 UTC (rev 1452) @@ -347,7 +347,7 @@ /*--------------------------------------------------------------------*/ -static sig_atomic_t reopen; +static volatile sig_atomic_t reopen; static void sighup(int sig) Modified: branches/1.0/doc/changes-1.0.3-1.0.4.xml =================================================================== --- branches/1.0/doc/changes-1.0.3-1.0.4.xml 2007-05-18 09:14:11 UTC (rev 1451) +++ branches/1.0/doc/changes-1.0.3-1.0.4.xml 2007-05-18 11:22:58 UTC (rev 1452) @@ -147,6 +147,12 @@ options have been added to daemonize and create a pidfile, respectively. + + + The flag that is raised upon reception of a + SIGHUP has been marked volatile so it + will not be optimized away by the compiler. + @@ -161,6 +167,12 @@ varnishncsa output from servers which handle multiple virtual hosts far more useful. + + + The flag that is raised upon reception of a + SIGHUP has been marked volatile so it + will not be optimized away by the compiler. + Modified: branches/1.0/redhat/varnish.initrc =================================================================== --- branches/1.0/redhat/varnish.initrc 2007-05-18 09:14:11 UTC (rev 1451) +++ branches/1.0/redhat/varnish.initrc 2007-05-18 11:22:58 UTC (rev 1452) @@ -21,34 +21,34 @@ DAEMON="/usr/sbin/varnishd" -# $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one -# have to set up a backend. -if [ "$DAEMON_OPTS" = "" ]; then - echo "No values specified in DAEMON_OPTS. Please read the varnishd(1)" - echo "manpage and put configuration options in /etc/sysconfig/varnish" - exit 1 -fi - mkdir -p /var/run/varnish 2>/dev/null # Open files (usually 1024, which is way too small for varnish) -[ ! "${NFILES}" ] && NFILES="131072" -ulimit -n ${NFILES} +ulimit -n ${NFILES:-131072} # See how we were called. case "$1" in start) echo -n "Starting varnish HTTP accelerator: " - daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} - sleep 1 - pkill -0 $PROCNAME - RETVAL=$? - if [ $RETVAL -eq 0 ] - then + + # $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one + # has to set up a backend, or /tmp will be used, which is a bad idea. + if [ "$DAEMON_OPTS" = "" ]; then + echo "\$DAEMON_OPTS empty." + echo -n "Please put configuration options in /etc/sysconfig/varnish" + echo_failure + else + daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /dev/null 2>&1 + sleep 1 + pkill -0 $PROCNAME + RETVAL=$? + if [ $RETVAL -eq 0 ] + then echo_success touch $LOCKFILE - else + else echo_failure + fi fi echo ;; Modified: branches/1.0/redhat/varnish.spec =================================================================== --- branches/1.0/redhat/varnish.spec 2007-05-18 09:14:11 UTC (rev 1451) +++ branches/1.0/redhat/varnish.spec 2007-05-18 11:22:58 UTC (rev 1452) @@ -51,7 +51,7 @@ # Remove "--disable static" if you want to build static libraries # (ie for the devel package) -%configure --sbindir=/usr/sbin --disable-static +%configure --disable-static # We have to remove rpath - not allowed in Fedora # (This problem only visible on 64 bit arches) @@ -135,7 +135,7 @@ %postun libs -p /sbin/ldconfig %changelog -* Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070516 +* Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070517 - Wrapping up for 1.0.4 - Changes in sysconfig and init scripts. Syncing with files in trunk/debian Modified: branches/1.0/redhat/varnish.sysconfig =================================================================== --- branches/1.0/redhat/varnish.sysconfig 2007-05-18 09:14:11 UTC (rev 1451) +++ branches/1.0/redhat/varnish.sysconfig 2007-05-18 11:22:58 UTC (rev 1452) @@ -14,10 +14,10 @@ # Listen on port 6081, administration on localhost:6082, and forward to # content server on localhost:8080. Use a fixed-size cache file. # -DAEMON_OPTS="-a :6081 \ - -T localhost:6082 \ - -b localhost:8080 \ - -s file,/var/lib/varnish/varnish_storage.bin,1G" +#DAEMON_OPTS="-a :6081 \ +# -T localhost:6082 \ +# -b localhost:8080 \ +# -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 2, Configuration with VCL @@ -26,10 +26,10 @@ # one content server selected by the vcl file, based on the request. Use a # fixed-size cache file. # -# DAEMON_OPTS="-a :6081 \ -# -T localhost:6082 \ -# -f /etc/varnish/default.vcl \ -# -s file,/var/lib/varnish/varnish_storage.bin,1G" +DAEMON_OPTS="-a :6081 \ + -T localhost:6082 \ + -f /etc/varnish/default.vcl \ + -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 3, Advanced configuration From des at projects.linpro.no Fri May 18 11:23:52 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 18 May 2007 13:23:52 +0200 (CEST) Subject: r1453 - branches/1.0 Message-ID: <20070518112352.0679C1EC3F8@projects.linpro.no> Author: des Date: 2007-05-18 13:23:51 +0200 (Fri, 18 May 2007) New Revision: 1453 Modified: branches/1.0/ChangeLog Log: Regenerate. Modified: branches/1.0/ChangeLog =================================================================== --- branches/1.0/ChangeLog 2007-05-18 11:22:58 UTC (rev 1452) +++ branches/1.0/ChangeLog 2007-05-18 11:23:51 UTC (rev 1453) @@ -85,6 +85,9 @@ ? New -D and -P command-line options have been added to daemonize and create a pidfile, respectively. + ? The flag that is raised upon reception of a SIGHUP has been marked volatile + so it will not be optimized away by the compiler. + varnishncsa ? The formatting callback has been largely rewritten for clarity, robustness @@ -94,6 +97,9 @@ This makes varnishncsa output from servers which handle multiple virtual hosts far more useful. + ? The flag that is raised upon reception of a SIGHUP has been marked volatile + so it will not be optimized away by the compiler. + Documentation ? The documentation?especially the VCL documentation?has been greatly From des at projects.linpro.no Fri May 18 13:05:03 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 18 May 2007 15:05:03 +0200 (CEST) Subject: r1454 - in branches/1.0: . redhat Message-ID: <20070518130503.92ECE1EC410@projects.linpro.no> Author: des Date: 2007-05-18 15:05:03 +0200 (Fri, 18 May 2007) New Revision: 1454 Modified: branches/1.0/configure.ac branches/1.0/redhat/varnish.spec Log: Bump version numbers for 1.0.4. Modified: branches/1.0/configure.ac =================================================================== --- branches/1.0/configure.ac 2007-05-18 11:23:51 UTC (rev 1453) +++ branches/1.0/configure.ac 2007-05-18 13:05:03 UTC (rev 1454) @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Linpro AS / Verdens Gang AS]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [1.0.3], [varnish-dev at projects.linpro.no]) +AC_INIT([Varnish], [1.0.4], [varnish-dev at projects.linpro.no]) AC_CONFIG_SRCDIR(include/varnishapi.h) AM_CONFIG_HEADER(config.h) Modified: branches/1.0/redhat/varnish.spec =================================================================== --- branches/1.0/redhat/varnish.spec 2007-05-18 11:23:51 UTC (rev 1453) +++ branches/1.0/redhat/varnish.spec 2007-05-18 13:05:03 UTC (rev 1454) @@ -1,7 +1,7 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish -Version: 1.0.3 -Release: 8%{?dist} +Version: 1.0.4 +Release: 1%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ @@ -135,6 +135,9 @@ %postun libs -p /sbin/ldconfig %changelog +* Fri May 18 2007 Dag-Erling Sm?rgrav - 1.0.4-1 +- Bump Version and Release for 1.0.4 + * Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070517 - Wrapping up for 1.0.4 - Changes in sysconfig and init scripts. Syncing with files in From ssm at projects.linpro.no Fri May 18 14:14:54 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Fri, 18 May 2007 16:14:54 +0200 (CEST) Subject: r1455 - trunk/varnish-cache/debian Message-ID: <20070518141454.16D891EC3F8@projects.linpro.no> Author: ssm Date: 2007-05-18 16:14:53 +0200 (Fri, 18 May 2007) New Revision: 1455 Added: trunk/varnish-cache/debian/varnish.varnishlog.init Modified: trunk/varnish-cache/debian/dirs trunk/varnish-cache/debian/rules Log: Add init script for varnishlog Modified: trunk/varnish-cache/debian/dirs =================================================================== --- trunk/varnish-cache/debian/dirs 2007-05-18 13:05:03 UTC (rev 1454) +++ trunk/varnish-cache/debian/dirs 2007-05-18 14:14:53 UTC (rev 1455) @@ -3,5 +3,6 @@ usr/lib usr/sbin var/log +var/log/varnish var/lib/varnish usr/share/lintian/overrides/ Modified: trunk/varnish-cache/debian/rules =================================================================== --- trunk/varnish-cache/debian/rules 2007-05-18 13:05:03 UTC (rev 1454) +++ trunk/varnish-cache/debian/rules 2007-05-18 14:14:53 UTC (rev 1455) @@ -83,6 +83,7 @@ dh_installdocs # Since varnish loses its cache on restart - we don't. dh_installinit -r + dh_installinit --name=varnishlog dh_installman dh_installexamples dh_link Added: trunk/varnish-cache/debian/varnish.varnishlog.init =================================================================== --- trunk/varnish-cache/debian/varnish.varnishlog.init 2007-05-18 13:05:03 UTC (rev 1454) +++ trunk/varnish-cache/debian/varnish.varnishlog.init 2007-05-18 14:14:53 UTC (rev 1455) @@ -0,0 +1,65 @@ +#! /bin/sh +# +# varnish Control the varnish HTTP accelerator + +### BEGIN INIT INFO +# Provides: varnishlog +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start HTTP accelerator log daemon +# Description: This script provides logging for varnish +### END INIT INFO + +# Source function library +. /lib/lsb/init-functions + +NAME=varnishlog +DESC="HTTP accelerator log deamon" +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/bin/$NAME +PIDFILE=/var/run/$NAME.pid +LOGFILE=/var/log/varnish/varnish.log + +test -x $DAEMON || exit 0 + +DAEMON_OPTS="-a -w ${LOGFILE} -D -P $PIDFILE" + +case "$1" in + start) + output=$(/bin/tempfile -s.varnish) + log_daemon_msg "Starting $DESC" + log_progress_msg $NAME + if start-stop-daemon \ + --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- \ + ${DAEMON_OPTS} > ${output} 2>&1; then + log_end_msg 0 + else + log_end_msg 1 + cat $output + fi + rm $output + ;; + stop) + log_daemon_msg "Stopping $DESC" + log_progress_msg $NAME + if start-stop-daemon \ + --stop --quiet --pidfile $PIDFILE --oknodo --retry 10 \ + --exec $DAEMON; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + log_success_msg "Usage: $0 {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 Property changes on: trunk/varnish-cache/debian/varnish.varnishlog.init ___________________________________________________________________ Name: svn:executable + * From des at projects.linpro.no Sun May 20 16:19:04 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sun, 20 May 2007 18:19:04 +0200 (CEST) Subject: r1456 - trunk/varnish-cache/debian Message-ID: <20070520161904.263BC1EC3F8@projects.linpro.no> Author: des Date: 2007-05-20 18:19:03 +0200 (Sun, 20 May 2007) New Revision: 1456 Modified: trunk/varnish-cache/debian/varnish.default trunk/varnish-cache/debian/varnish.init Log: Copy NFILES knob from redhat/varnish.initrc. Modified: trunk/varnish-cache/debian/varnish.default =================================================================== --- trunk/varnish-cache/debian/varnish.default 2007-05-18 14:14:53 UTC (rev 1455) +++ trunk/varnish-cache/debian/varnish.default 2007-05-20 16:19:03 UTC (rev 1456) @@ -4,6 +4,9 @@ # shell script fragment. # +# Maximum number of open files (for ulimit -n) +NFILES=131072 + # This file contains 4 alternatives, please use only one. ## Alternative 1, Minimal configuration, no VCL Modified: trunk/varnish-cache/debian/varnish.init =================================================================== --- trunk/varnish-cache/debian/varnish.init 2007-05-18 14:14:53 UTC (rev 1455) +++ trunk/varnish-cache/debian/varnish.init 2007-05-20 16:19:03 UTC (rev 1456) @@ -31,6 +31,9 @@ . /etc/default/varnish fi +# Open files (usually 1024, which is way too small for varnish) +ulimit -n ${NFILES:-131072} + # If $DAEMON_OPTS is not set at all in /etc/default/varnish, use minimal useful # defaults (Backend at localhost:8080, a common place to put a locally # installed application server.) From des at projects.linpro.no Sun May 20 16:21:19 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sun, 20 May 2007 18:21:19 +0200 (CEST) Subject: r1457 - in branches/1.0: . debian Message-ID: <20070520162119.74BB61EC6D1@projects.linpro.no> Author: des Date: 2007-05-20 18:21:19 +0200 (Sun, 20 May 2007) New Revision: 1457 Added: branches/1.0/debian/varnish.varnishlog.init Modified: branches/1.0/ branches/1.0/debian/dirs branches/1.0/debian/rules branches/1.0/debian/varnish.default branches/1.0/debian/varnish.init Log: Merged revisions 1455-1456 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r1455 | ssm | 2007-05-18 16:14:53 +0200 (Fri, 18 May 2007) | 1 line Add init script for varnishlog ........ r1456 | des | 2007-05-20 18:19:03 +0200 (Sun, 20 May 2007) | 2 lines Copy NFILES knob from redhat/varnish.initrc. ........ Property changes on: branches/1.0 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434,1437-1445,1447-1451 + /trunk/varnish-cache:1-1315,1359-1387,1394,1399-1421,1424-1432,1434,1437-1445,1447-1451,1455-1456 Modified: branches/1.0/debian/dirs =================================================================== --- branches/1.0/debian/dirs 2007-05-20 16:19:03 UTC (rev 1456) +++ branches/1.0/debian/dirs 2007-05-20 16:21:19 UTC (rev 1457) @@ -3,5 +3,6 @@ usr/lib usr/sbin var/log +var/log/varnish var/lib/varnish usr/share/lintian/overrides/ Modified: branches/1.0/debian/rules =================================================================== --- branches/1.0/debian/rules 2007-05-20 16:19:03 UTC (rev 1456) +++ branches/1.0/debian/rules 2007-05-20 16:21:19 UTC (rev 1457) @@ -83,6 +83,7 @@ dh_installdocs # Since varnish loses its cache on restart - we don't. dh_installinit -r + dh_installinit --name=varnishlog dh_installman dh_installexamples dh_link Modified: branches/1.0/debian/varnish.default =================================================================== --- branches/1.0/debian/varnish.default 2007-05-20 16:19:03 UTC (rev 1456) +++ branches/1.0/debian/varnish.default 2007-05-20 16:21:19 UTC (rev 1457) @@ -4,6 +4,9 @@ # shell script fragment. # +# Maximum number of open files (for ulimit -n) +NFILES=131072 + # This file contains 4 alternatives, please use only one. ## Alternative 1, Minimal configuration, no VCL Modified: branches/1.0/debian/varnish.init =================================================================== --- branches/1.0/debian/varnish.init 2007-05-20 16:19:03 UTC (rev 1456) +++ branches/1.0/debian/varnish.init 2007-05-20 16:21:19 UTC (rev 1457) @@ -31,6 +31,9 @@ . /etc/default/varnish fi +# Open files (usually 1024, which is way too small for varnish) +ulimit -n ${NFILES:-131072} + # If $DAEMON_OPTS is not set at all in /etc/default/varnish, use minimal useful # defaults (Backend at localhost:8080, a common place to put a locally # installed application server.) Copied: branches/1.0/debian/varnish.varnishlog.init (from rev 1456, trunk/varnish-cache/debian/varnish.varnishlog.init) From des at projects.linpro.no Sun May 20 17:38:16 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sun, 20 May 2007 19:38:16 +0200 (CEST) Subject: r1458 - in tags: . varnish-1.0.4 Message-ID: <20070520173816.0D7971EC2A2@projects.linpro.no> Author: des Date: 2007-05-20 19:38:15 +0200 (Sun, 20 May 2007) New Revision: 1458 Added: tags/varnish-1.0.4/ tags/varnish-1.0.4/debian/ Removed: tags/varnish-1.0.4/debian/ Log: Tag 1.0.4. Copied: tags/varnish-1.0.4 (from rev 1457, branches/1.0) Copied: tags/varnish-1.0.4/debian (from rev 1455, branches/1.0/debian) From des at projects.linpro.no Sun May 20 18:12:33 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sun, 20 May 2007 20:12:33 +0200 (CEST) Subject: r1459 - trunk/varnish-cache/doc Message-ID: <20070520181233.2C4301EC6E5@projects.linpro.no> Author: des Date: 2007-05-20 20:12:33 +0200 (Sun, 20 May 2007) New Revision: 1459 Modified: trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml trunk/varnish-cache/doc/changes-1.0.4.xml trunk/varnish-cache/doc/changes-html.xsl Log: Set mime-type. Property changes on: trunk/varnish-cache/doc/changes-1.0.3-1.0.4.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Property changes on: trunk/varnish-cache/doc/changes-1.0.4.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Property changes on: trunk/varnish-cache/doc/changes-html.xsl ___________________________________________________________________ Name: svn:mime-type + text/xml From des at projects.linpro.no Sun May 20 22:22:24 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 21 May 2007 00:22:24 +0200 (CEST) Subject: r1460 - trunk/varnish-cache/bin/varnishd Message-ID: <20070520222224.B16581EC6DB@projects.linpro.no> Author: des Date: 2007-05-21 00:22:24 +0200 (Mon, 21 May 2007) New Revision: 1460 Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c Log: Silence a compiler warning that occurs with gcc 4.2. Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-20 18:12:33 UTC (rev 1459) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-20 22:22:24 UTC (rev 1460) @@ -345,6 +345,7 @@ csrc = VCC_CompileFile(sb, f_arg); if (csrc != NULL) fputs(csrc, stdout); + vf = NULL; } else { vf = mgt_VccCompileFile(sb, f_arg); } From ssm at projects.linpro.no Mon May 21 04:57:09 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Mon, 21 May 2007 06:57:09 +0200 (CEST) Subject: r1461 - trunk/varnish-cache/debian Message-ID: <20070521045709.D87FE1EC528@projects.linpro.no> Author: ssm Date: 2007-05-21 06:57:09 +0200 (Mon, 21 May 2007) New Revision: 1461 Modified: trunk/varnish-cache/debian/control Log: Spell my name right, and use a more convenient mail address Modified: trunk/varnish-cache/debian/control =================================================================== --- trunk/varnish-cache/debian/control 2007-05-20 22:22:24 UTC (rev 1460) +++ trunk/varnish-cache/debian/control 2007-05-21 04:57:09 UTC (rev 1461) @@ -1,7 +1,7 @@ Source: varnish Section: web Priority: optional -Maintainer: Stig Sandbeck Mathiesen +Maintainer: Stig Sandbeck Mathisen Uploaders: Lars Bahner Build-Depends: debhelper (>= 5), autotools-dev, automake1.9, libtool, autoconf, libncurses-dev Standards-Version: 3.7.2 From phk at projects.linpro.no Tue May 22 10:20:57 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 22 May 2007 12:20:57 +0200 (CEST) Subject: r1462 - trunk/varnish-cache/bin/varnishd Message-ID: <20070522102057.AC2E71EC6DB@projects.linpro.no> Author: phk Date: 2007-05-22 12:20:57 +0200 (Tue, 22 May 2007) New Revision: 1462 Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c Log: Initialize storage modules magic element. Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_malloc.c 2007-05-21 04:57:09 UTC (rev 1461) +++ trunk/varnish-cache/bin/varnishd/storage_malloc.c 2007-05-22 10:20:57 UTC (rev 1462) @@ -55,6 +55,7 @@ sma->s.space = size; sma->s.fd = -1; sma->s.stevedore = st; + sma->s.magic = STORAGE_MAGIC; return (&sma->s); } From ssm at projects.linpro.no Tue May 22 15:33:41 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Tue, 22 May 2007 17:33:41 +0200 (CEST) Subject: r1463 - trunk/varnish-cache/debian Message-ID: <20070522153341.DD2D81EC528@projects.linpro.no> Author: ssm Date: 2007-05-22 17:33:41 +0200 (Tue, 22 May 2007) New Revision: 1463 Added: trunk/varnish-cache/debian/varnish.logrotate Modified: trunk/varnish-cache/debian/dirs trunk/varnish-cache/debian/rules trunk/varnish-cache/debian/varnish.varnishlog.init Log: Add log rotation for /var/log/varnish/varnish.log Modified: trunk/varnish-cache/debian/dirs =================================================================== --- trunk/varnish-cache/debian/dirs 2007-05-22 10:20:57 UTC (rev 1462) +++ trunk/varnish-cache/debian/dirs 2007-05-22 15:33:41 UTC (rev 1463) @@ -1,4 +1,5 @@ etc/varnish +etc/logrotate.d usr/bin usr/lib usr/sbin Modified: trunk/varnish-cache/debian/rules =================================================================== --- trunk/varnish-cache/debian/rules 2007-05-22 10:20:57 UTC (rev 1462) +++ trunk/varnish-cache/debian/rules 2007-05-22 15:33:41 UTC (rev 1463) @@ -69,6 +69,7 @@ $(MAKE) install DESTDIR=$(CURDIR)/debian/varnish install -m 644 $(CURDIR)/etc/default.vcl $(CURDIR)/debian/varnish/etc/varnish/ install -m 644 $(CURDIR)/debian/lintian-override $(CURDIR)/debian/varnish/usr/share/lintian/overrides/varnish + install -m 644 $(CURDIR)/debian/varnish.logrotate $(CURDIR)/debian/varnish/etc/logrotate.d/varnish # Build architecture-independent files here. Added: trunk/varnish-cache/debian/varnish.logrotate =================================================================== --- trunk/varnish-cache/debian/varnish.logrotate 2007-05-22 10:20:57 UTC (rev 1462) +++ trunk/varnish-cache/debian/varnish.logrotate 2007-05-22 15:33:41 UTC (rev 1463) @@ -0,0 +1,9 @@ +/var/log/varnish/varnish.log { + daily + rotate 7 + compress + delaycompress + postrotate + /usr/sbin/invoke-rc.d varnishlog reload > /dev/null + endscript +} Modified: trunk/varnish-cache/debian/varnish.varnishlog.init =================================================================== --- trunk/varnish-cache/debian/varnish.varnishlog.init 2007-05-22 10:20:57 UTC (rev 1462) +++ trunk/varnish-cache/debian/varnish.varnishlog.init 2007-05-22 15:33:41 UTC (rev 1463) @@ -52,12 +52,22 @@ log_end_msg 1 fi ;; + reload) + log_daemon_msg "Reloading $DESC" + log_progress_msg $NAME + if kill -HUP $(cat $PIDFILE) >/dev/null 2>&1; then + log_end_msg 0 + else + log_end_msg 1 + exit 1 + fi + ;; restart|force-reload) $0 stop $0 start ;; *) - log_success_msg "Usage: $0 {start|stop|restart|force-reload}" + log_success_msg "Usage: $0 {start|stop|restart|force-reload|reload}" exit 1 ;; esac From ssm at projects.linpro.no Tue May 22 15:35:54 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Tue, 22 May 2007 17:35:54 +0200 (CEST) Subject: r1464 - trunk/varnish-cache/debian Message-ID: <20070522153554.D29E11EC6D1@projects.linpro.no> Author: ssm Date: 2007-05-22 17:35:54 +0200 (Tue, 22 May 2007) New Revision: 1464 Modified: trunk/varnish-cache/debian/varnish.init trunk/varnish-cache/debian/varnish.varnishlog.init Log: Add exit status 1 if we fail to start, or reload. Remove "oknodo" to actually provide an error message if we cannot stop the service. Modified: trunk/varnish-cache/debian/varnish.init =================================================================== --- trunk/varnish-cache/debian/varnish.init 2007-05-22 15:33:41 UTC (rev 1463) +++ trunk/varnish-cache/debian/varnish.init 2007-05-22 15:35:54 UTC (rev 1464) @@ -51,6 +51,7 @@ else log_end_msg 1 cat $output + exit 1 fi rm $output ;; @@ -58,7 +59,7 @@ log_daemon_msg "Stopping $DESC" log_progress_msg $NAME if start-stop-daemon \ - --stop --quiet --pidfile $PIDFILE --oknodo --retry 10 \ + --stop --quiet --pidfile $PIDFILE --retry 10 \ --exec $DAEMON; then log_end_msg 0 else Modified: trunk/varnish-cache/debian/varnish.varnishlog.init =================================================================== --- trunk/varnish-cache/debian/varnish.varnishlog.init 2007-05-22 15:33:41 UTC (rev 1463) +++ trunk/varnish-cache/debian/varnish.varnishlog.init 2007-05-22 15:35:54 UTC (rev 1464) @@ -38,6 +38,7 @@ else log_end_msg 1 cat $output + exit 1 fi rm $output ;; @@ -45,7 +46,7 @@ log_daemon_msg "Stopping $DESC" log_progress_msg $NAME if start-stop-daemon \ - --stop --quiet --pidfile $PIDFILE --oknodo --retry 10 \ + --stop --quiet --pidfile $PIDFILE --retry 10 \ --exec $DAEMON; then log_end_msg 0 else From des at projects.linpro.no Tue May 22 16:02:15 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 22 May 2007 18:02:15 +0200 (CEST) Subject: r1465 - in trunk/varnish-cache: . bin/varnishd Message-ID: <20070522160215.757C11EC6EA@projects.linpro.no> Author: des Date: 2007-05-22 18:02:15 +0200 (Tue, 22 May 2007) New Revision: 1465 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c trunk/varnish-cache/configure.ac Log: Fix compilation on OpenBSD 4.1. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2007-05-22 15:35:54 UTC (rev 1464) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2007-05-22 16:02:15 UTC (rev 1465) @@ -37,8 +37,8 @@ #include #include -#ifdef HAVE_SYS_STATVFS_H -#include +#ifdef HAVE_SYS_MOUNT_H +#include #endif #ifdef HAVE_SYS_VFS_H @@ -126,7 +126,7 @@ AN(sc); AZ(fstat(sc->fd, &st)); -#if defined(HAVE_SYS_STATVFS_H) || defined(HAVE_SYS_VFS_H) +#if defined(HAVE_SYS_MOUNT_H) || defined(HAVE_SYS_VFS_H) struct statfs fsst; AZ(fstatfs(sc->fd, &fsst)); #endif Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2007-05-22 15:35:54 UTC (rev 1464) +++ trunk/varnish-cache/configure.ac 2007-05-22 16:02:15 UTC (rev 1465) @@ -55,7 +55,7 @@ AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_CHECK_HEADERS([sys/socket.h]) -AC_CHECK_HEADERS([sys/statvfs.h]) +AC_CHECK_HEADERS([sys/mount.h]) AC_CHECK_HEADERS([sys/vfs.h]) AC_CHECK_HEADERS([netinet/in.h]) AC_CHECK_HEADERS([stddef.h]) From ssm at projects.linpro.no Tue May 22 16:05:55 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Tue, 22 May 2007 18:05:55 +0200 (CEST) Subject: r1466 - trunk/varnish-cache/debian Message-ID: <20070522160555.469FB1EC6EA@projects.linpro.no> Author: ssm Date: 2007-05-22 18:05:55 +0200 (Tue, 22 May 2007) New Revision: 1466 Modified: trunk/varnish-cache/debian/rules Log: We want to restart varnishd on upgrade Modified: trunk/varnish-cache/debian/rules =================================================================== --- trunk/varnish-cache/debian/rules 2007-05-22 16:02:15 UTC (rev 1465) +++ trunk/varnish-cache/debian/rules 2007-05-22 16:05:55 UTC (rev 1466) @@ -82,8 +82,7 @@ dh_testroot dh_installchangelogs ChangeLog dh_installdocs - # Since varnish loses its cache on restart - we don't. - dh_installinit -r + dh_installinit dh_installinit --name=varnishlog dh_installman dh_installexamples From des at projects.linpro.no Wed May 23 08:14:11 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 23 May 2007 10:14:11 +0200 (CEST) Subject: r1467 - trunk/varnish-cache/lib/libvarnish Message-ID: <20070523081411.855C31EC6B0@projects.linpro.no> Author: des Date: 2007-05-23 10:14:11 +0200 (Wed, 23 May 2007) New Revision: 1467 Modified: trunk/varnish-cache/lib/libvarnish/flopen.c Log: >From FreeBSD: if (flags & O_TRUNC), don't truncate the file until we've successfully locked it. Modified: trunk/varnish-cache/lib/libvarnish/flopen.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-22 16:05:55 UTC (rev 1466) +++ trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-23 08:14:11 UTC (rev 1467) @@ -26,7 +26,7 @@ * * $Id$ * Derived from: - * $FreeBSD: src/lib/libutil/flopen.c,v 1.4 2007/05/10 15:01:42 des Exp $ + * $FreeBSD: src/lib/libutil/flopen.c,v 1.5 2007/05/23 08:12:34 des Exp $ */ #include @@ -42,7 +42,7 @@ int flopen(const char *path, int flags, ...) { - int fd, operation, serrno; + int fd, operation, serrno, truncate; struct stat sb, fsb; mode_t mode; @@ -63,6 +63,9 @@ if (flags & O_NONBLOCK) operation |= LOCK_NB; + truncate = (flags & O_TRUNC); + flags |= ~O_TRUNC; + for (;;) { if ((fd = open(path, flags, mode)) == -1) /* non-existent or no access */ @@ -92,6 +95,13 @@ close(fd); continue; } + if (truncate && ftruncate(fd, 0) != 0) { + /* can't happen [tm] */ + serrno = errno; + close(fd); + errno = serrno; + return (-1); + } return (fd); } } From des at projects.linpro.no Wed May 23 10:07:49 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 23 May 2007 12:07:49 +0200 (CEST) Subject: r1468 - trunk/varnish-cache/lib/libvarnish Message-ID: <20070523100749.668601EC52F@projects.linpro.no> Author: des Date: 2007-05-23 12:07:49 +0200 (Wed, 23 May 2007) New Revision: 1468 Modified: trunk/varnish-cache/lib/libvarnish/flopen.c Log: Fix an exceptionally stupid logic error in the previous commit. Modified: trunk/varnish-cache/lib/libvarnish/flopen.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-23 08:14:11 UTC (rev 1467) +++ trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-23 10:07:49 UTC (rev 1468) @@ -26,7 +26,7 @@ * * $Id$ * Derived from: - * $FreeBSD: src/lib/libutil/flopen.c,v 1.5 2007/05/23 08:12:34 des Exp $ + * $FreeBSD: src/lib/libutil/flopen.c,v 1.6 2007/05/23 10:06:03 des Exp $ */ #include @@ -64,7 +64,7 @@ operation |= LOCK_NB; truncate = (flags & O_TRUNC); - flags |= ~O_TRUNC; + flags &= ~O_TRUNC; for (;;) { if ((fd = open(path, flags, mode)) == -1) From des at projects.linpro.no Wed May 23 12:10:20 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 23 May 2007 14:10:20 +0200 (CEST) Subject: r1469 - trunk/varnish-cache/lib/libvarnish Message-ID: <20070523121020.A9B2A1EC6D1@projects.linpro.no> Author: des Date: 2007-05-23 14:10:20 +0200 (Wed, 23 May 2007) New Revision: 1469 Modified: trunk/varnish-cache/lib/libvarnish/flopen.c Log: Avoid shadowing truncate(2) with a local variable. Modified: trunk/varnish-cache/lib/libvarnish/flopen.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-23 10:07:49 UTC (rev 1468) +++ trunk/varnish-cache/lib/libvarnish/flopen.c 2007-05-23 12:10:20 UTC (rev 1469) @@ -26,7 +26,7 @@ * * $Id$ * Derived from: - * $FreeBSD: src/lib/libutil/flopen.c,v 1.6 2007/05/23 10:06:03 des Exp $ + * $FreeBSD: src/lib/libutil/flopen.c,v 1.7 2007/05/23 12:09:33 des Exp $ */ #include @@ -42,7 +42,7 @@ int flopen(const char *path, int flags, ...) { - int fd, operation, serrno, truncate; + int fd, operation, serrno, trunc; struct stat sb, fsb; mode_t mode; @@ -63,7 +63,7 @@ if (flags & O_NONBLOCK) operation |= LOCK_NB; - truncate = (flags & O_TRUNC); + trunc = (flags & O_TRUNC); flags &= ~O_TRUNC; for (;;) { @@ -95,7 +95,7 @@ close(fd); continue; } - if (truncate && ftruncate(fd, 0) != 0) { + if (trunc && ftruncate(fd, 0) != 0) { /* can't happen [tm] */ serrno = errno; close(fd); From des at projects.linpro.no Wed May 23 12:13:53 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 23 May 2007 14:13:53 +0200 (CEST) Subject: r1470 - trunk/varnish-cache/bin/varnishtop Message-ID: <20070523121353.C9FF41EC46B@projects.linpro.no> Author: des Date: 2007-05-23 14:13:53 +0200 (Wed, 23 May 2007) New Revision: 1470 Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c Log: Nit: mark exit point. Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-23 12:10:20 UTC (rev 1469) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-23 12:13:53 UTC (rev 1470) @@ -199,5 +199,5 @@ TAILQ_INSERT_BEFORE(tp, tp2, list); } } - return (0); + exit(0); } From des at projects.linpro.no Fri May 25 09:19:47 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 25 May 2007 11:19:47 +0200 (CEST) Subject: r1473 - trunk/varnish-cache Message-ID: <20070525091947.AC0FC1EC1EE@projects.linpro.no> Author: des Date: 2007-05-25 11:19:47 +0200 (Fri, 25 May 2007) New Revision: 1473 Modified: trunk/varnish-cache/README Log: The correct mailing list for general technical questions is varnish-misc. Modified: trunk/varnish-cache/README =================================================================== --- trunk/varnish-cache/README 2007-05-25 09:17:36 UTC (rev 1472) +++ trunk/varnish-cache/README 2007-05-25 09:19:47 UTC (rev 1473) @@ -8,7 +8,7 @@ http://varnish.projects.linpro.no/ Developer site and wiki Technical questions about Varnish and this release should be addressed -to . +to . Questions about commercial support and services related to Varnish should be addressed to . From des at linpro.no Fri May 25 09:28:48 2007 From: des at linpro.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Fri, 25 May 2007 11:28:48 +0200 Subject: Lost commit email Message-ID: <877iqxs14f.fsf@des.linpro.no> Due to a misconfiguration, commit email broke when I upgraded projects.linpro.no yesterday. This has now been corrected. Only two revisions were lost: ------------------------------------------------------------------------ r1471 | des | 2007-05-25 11:10:01 +0200 (Fri, 25 May 2007) | 2 lines Changed paths: M /trunk/varnish-cache/lib/libvarnish/argv.c M /trunk/varnish-cache/lib/libvcl/vcc_acl.c M /trunk/varnish-cache/lib/libvcl/vcc_action.c M /trunk/varnish-cache/lib/libvcl/vcc_parse.c M /trunk/varnish-cache/lib/libvcl/vcc_token.c M /trunk/varnish-cache/lib/libvcl/vcc_xref.c s/illegal/invalid/g ------------------------------------------------------------------------ r1472 | des | 2007-05-25 11:17:36 +0200 (Fri, 25 May 2007) | 2 lines Changed paths: M /trunk/varnish-cache/INSTALL Nit: mention autogen.sh ------------------------------------------------------------------------ DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From des at projects.linpro.no Fri May 25 10:00:39 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 25 May 2007 12:00:39 +0200 (CEST) Subject: r1474 - trunk/varnish-cache/bin/varnishd Message-ID: <20070525100039.0A50A1EC40E@projects.linpro.no> Author: des Date: 2007-05-25 12:00:38 +0200 (Fri, 25 May 2007) New Revision: 1474 Added: trunk/varnish-cache/bin/varnishd/cache_synthetic.c Modified: trunk/varnish-cache/bin/varnishd/Makefile.am trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_response.c Log: Add an API for synthetic objects, and use it to implement negative caching of backend issues. Brief summary: - moved http_msg array from cache_response.c to cache_http.c, introduced http_StatusMessage() lookup function - introduced http_Put{Protocol,Status,Response} to complement http_PrintfHeader(). - introduced SYN_ErrorPage() in a new file, cache_synthetic.c. SYN_ErrorPage() populates the session's current object with the specified error code and a corresponding HTML error page; it is the caller's responsibility to ensure that the session has a suitable object (i.e. one that doesn't already have headers or a body) - rewrote RES_Error() to simply call SYN_ErrorPage() (with ttl = 0) and RES_WriteObj(). - rewrote cnt_fetch() to use SYN_ErrorPage() to create a 503 page with a TTL of 30 seconds when Fetch() fails. - removed the call to RES_Error() in cache_backend.c; the error trickles back up to cnt_fetch() anyway. Comments from review: - Memory allocation and pointer gymnastics for the header and body are duplicated all over the place (in new and pre-existing code) and should be centralized and hidden behind a suitable API. - The http_*() API needs refactoring, we shouldn't need four different functions to manipulate four different entries in the same array. Modified: trunk/varnish-cache/bin/varnishd/Makefile.am =================================================================== --- trunk/varnish-cache/bin/varnishd/Makefile.am 2007-05-25 09:19:47 UTC (rev 1473) +++ trunk/varnish-cache/bin/varnishd/Makefile.am 2007-05-25 10:00:38 UTC (rev 1474) @@ -24,6 +24,7 @@ cache_pipe.c \ cache_response.c \ cache_session.c \ + cache_synthetic.c \ cache_vcl.c \ cache_vrt.c \ cache_vrt_acl.c \ Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-25 09:19:47 UTC (rev 1473) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-25 10:00:38 UTC (rev 1474) @@ -365,6 +365,7 @@ void HSH_Init(void); /* cache_http.c */ +const char *http_StatusMessage(int); void HTTP_Init(void); void http_ClrHeader(struct http *to); void http_CopyHttp(struct http *to, struct http *fm); @@ -374,6 +375,9 @@ void http_CopyResp(struct worker *w, int fd, struct http *to, struct http *fm); void http_SetResp(struct worker *w, int fd, struct http *to, const char *proto, const char *status, const char *response); void http_FilterHeader(struct worker *w, int fd, struct http *to, struct http *fm, unsigned how); +void http_PutProtocol(struct worker *w, int fd, struct http *to, const char *protocol); +void http_PutStatus(struct worker *w, int fd, struct http *to, int status); +void http_PutResponse(struct worker *w, int fd, struct http *to, const char *response); void http_PrintfHeader(struct worker *w, int fd, struct http *to, const char *fmt, ...); void http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr); void http_Setup(struct http *ht, void *space, unsigned len); @@ -437,6 +441,9 @@ void RES_Error(struct sess *sp, int code, const char *reason); void RES_WriteObj(struct sess *sp); +/* cache_synthetic.c */ +void SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl); + /* cache_vcl.c */ void VCL_Init(void); void VCL_Refresh(struct VCL_conf **vcc); Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-05-25 09:19:47 UTC (rev 1473) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-05-25 10:00:38 UTC (rev 1474) @@ -320,7 +320,6 @@ } usleep(100000 * n); } - RES_Error(sp, 503, "Backend did not respond."); return (NULL); } Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-25 09:19:47 UTC (rev 1473) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-25 10:00:38 UTC (rev 1474) @@ -286,27 +286,20 @@ cnt_fetch(struct sess *sp) { - if (Fetch(sp)) { - sp->obj->cacheable = 0; - HSH_Unbusy(sp->obj); - HSH_Deref(sp->obj); - sp->obj = NULL; - sp->step = STP_DONE; - RES_Error(sp, 503, NULL); - return (0); - } + SYN_ErrorPage(sp, 503, "Error talking to backend", 30); + } else { + RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */ - RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */ + VCL_fetch_method(sp); - VCL_fetch_method(sp); + if (sp->handling == VCL_RET_ERROR) + INCOMPL(); - if (sp->handling == VCL_RET_ERROR) - INCOMPL(); + if (sp->handling == VCL_RET_PASS) + sp->obj->pass = 1; + } - if (sp->handling == VCL_RET_PASS) - sp->obj->pass = 1; - sp->obj->cacheable = 1; if (sp->obj->objhead != NULL) { HSH_Ref(sp->obj); /* get another, STP_DELIVER will deref */ Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-25 09:19:47 UTC (rev 1473) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-25 10:00:38 UTC (rev 1474) @@ -43,6 +43,10 @@ #include "shmlog.h" #include "cache.h" +#ifndef HAVE_STRLCPY +#include +#endif + #define HTTPH(a, b, c, d, e, f, g) char b[] = "*" a ":"; #include "http_headers.h" #undef HTTPH @@ -94,7 +98,69 @@ } /*--------------------------------------------------------------------*/ +/* List of canonical HTTP response code names from RFC2616 */ +static struct http_msg { + unsigned nbr; + const char *txt; +} http_msg[] = { + { 101, "Switching Protocols" }, + { 200, "OK" }, + { 201, "Created" }, + { 202, "Accepted" }, + { 203, "Non-Authoritative Information" }, + { 204, "No Content" }, + { 205, "Reset Content" }, + { 206, "Partial Content" }, + { 300, "Multiple Choices" }, + { 301, "Moved Permanently" }, + { 302, "Found" }, + { 303, "See Other" }, + { 304, "Not Modified" }, + { 305, "Use Proxy" }, + { 306, "(Unused)" }, + { 307, "Temporary Redirect" }, + { 400, "Bad Request" }, + { 401, "Unauthorized" }, + { 402, "Payment Required" }, + { 403, "Forbidden" }, + { 404, "Not Found" }, + { 405, "Method Not Allowed" }, + { 406, "Not Acceptable" }, + { 407, "Proxy Authentication Required" }, + { 408, "Request Timeout" }, + { 409, "Conflict" }, + { 410, "Gone" }, + { 411, "Length Required" }, + { 412, "Precondition Failed" }, + { 413, "Request Entity Too Large" }, + { 414, "Request-URI Too Long" }, + { 415, "Unsupported Media Type" }, + { 416, "Requested Range Not Satisfiable" }, + { 417, "Expectation Failed" }, + { 500, "Internal Server Error" }, + { 501, "Not Implemented" }, + { 502, "Bad Gateway" }, + { 503, "Service Unavailable" }, + { 504, "Gateway Timeout" }, + { 505, "HTTP Version Not Supported" }, + { 0, NULL } +}; + +const char * +http_StatusMessage(int status) +{ + struct http_msg *mp; + + assert(status >= 100 && status <= 999); + for (mp = http_msg; mp->nbr != 0 && mp->nbr <= status; mp++) + if (mp->nbr == status) + return (mp->txt); + return ("Unknown Error"); +} + +/*--------------------------------------------------------------------*/ + void http_Setup(struct http *hp, void *space, unsigned len) { @@ -817,16 +883,60 @@ /*--------------------------------------------------------------------*/ void +http_PutProtocol(struct worker *w, int fd, struct http *to, const char *protocol) +{ + int l; + + CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); + l = strlcpy(to->f, protocol, to->e - to->f); + xxxassert(to->f + l < to->e); + to->hd[HTTP_HDR_PROTO].b = to->f; + to->hd[HTTP_HDR_PROTO].e = to->f + l; + to->f += l + 1; + WSLH(w, HTTP_T_Protocol, fd, to, HTTP_HDR_PROTO); +} + +void +http_PutStatus(struct worker *w, int fd, struct http *to, int status) +{ + int l; + + CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); + assert(status >= 100 && status <= 999); + l = snprintf(to->f, to->e - to->f, "%d", status); + xxxassert(to->f + l < to->e); + to->hd[HTTP_HDR_STATUS].b = to->f; + to->hd[HTTP_HDR_STATUS].e = to->f + l; + to->f += l + 1; + WSLH(w, HTTP_T_Status, fd, to, HTTP_HDR_STATUS); +} + +void +http_PutResponse(struct worker *w, int fd, struct http *to, const char *response) +{ + int l; + + CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); + l = strlcpy(to->f, response, to->e - to->f); + xxxassert(to->f + l < to->e); + to->hd[HTTP_HDR_RESPONSE].b = to->f; + to->hd[HTTP_HDR_RESPONSE].e = to->f + l; + to->f += l + 1; + WSLH(w, HTTP_T_Response, fd, to, HTTP_HDR_RESPONSE); +} + +void http_PrintfHeader(struct worker *w, int fd, struct http *to, const char *fmt, ...) { va_list ap; unsigned l, n; CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); + l = to->e - to->f; va_start(ap, fmt); - l = to->e - to->f; n = vsnprintf(to->f, l, fmt, ap); - if (n + 1 > l || to->nhd >= HTTP_HDR_MAX) { + va_end(ap); + if (n >= l || to->nhd >= HTTP_HDR_MAX) { VSL_stats->losthdr++; WSL(w, http2shmlog(to, HTTP_T_LostHeader), fd, "%s", to->f); } else { @@ -837,7 +947,6 @@ WSLH(w, HTTP_T_Header, fd, to, to->nhd); to->nhd++; } - va_end(ap); } /*--------------------------------------------------------------------*/ Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-25 09:19:47 UTC (rev 1473) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-25 10:00:38 UTC (rev 1474) @@ -29,8 +29,6 @@ * $Id$ */ -#include /* XXX: for NULL ?? */ -#include /* XXX: for NULL ?? */ #include #include @@ -43,126 +41,27 @@ #include "cache.h" /*--------------------------------------------------------------------*/ -/* List of canonical HTTP response code names from RFC2616 */ -static struct http_msg { - unsigned nbr; - const char *txt; - const char *reason; -} http_msg[] = { - { 101, "Switching Protocols" }, - { 200, "OK" }, - { 201, "Created" }, - { 202, "Accepted" }, - { 203, "Non-Authoritative Information" }, - { 204, "No Content" }, - { 205, "Reset Content" }, - { 206, "Partial Content" }, - { 300, "Multiple Choices" }, - { 301, "Moved Permanently" }, - { 302, "Found" }, - { 303, "See Other" }, - { 304, "Not Modified" }, - { 305, "Use Proxy" }, - { 306, "(Unused)" }, - { 307, "Temporary Redirect" }, - { 400, "Bad Request" }, - { 401, "Unauthorized" }, - { 402, "Payment Required" }, - { 403, "Forbidden" }, - { 404, "Not Found" }, - { 405, "Method Not Allowed" }, - { 406, "Not Acceptable" }, - { 407, "Proxy Authentication Required" }, - { 408, "Request Timeout" }, - { 409, "Conflict" }, - { 410, "Gone" }, - { 411, "Length Required" }, - { 412, "Precondition Failed" }, - { 413, "Request Entity Too Large" }, - { 414, "Request-URI Too Long" }, - { 415, "Unsupported Media Type" }, - { 416, "Requested Range Not Satisfiable" }, - { 417, "Expectation Failed" }, - { 500, "Internal Server Error" }, - { 501, "Not Implemented" }, - { 502, "Bad Gateway" }, - { 503, "Service Unavailable" }, - { 504, "Gateway Timeout" }, - { 505, "HTTP Version Not Supported" }, - { 0, NULL } -}; - -/*--------------------------------------------------------------------*/ - void RES_Error(struct sess *sp, int code, const char *reason) { - char buf[40]; - struct vsb *sb; - struct http_msg *mp; - const char *msg; - assert(code >= 100 && code <= 999); - CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); + /* get a pristine object */ + HSH_Prealloc(sp); + sp->obj = sp->wrk->nobj; + sp->wrk->nobj = NULL; + sp->obj->busy = 1; - clock_gettime(CLOCK_REALTIME, &sp->t_resp); + /* synthesize error page and send it */ + SYN_ErrorPage(sp, code, reason, 0); + RES_WriteObj(sp); - msg = "Unknown error"; - for (mp = http_msg; mp->nbr != 0 && mp->nbr <= code; mp++) { - if (mp->nbr < code) - continue; - if (mp->nbr > code) - break; - msg = mp->txt; - if (reason == NULL) - reason = mp->reason; - break; - } - if (reason == NULL) - reason = msg; - AN(reason); - AN(msg); - - sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); - XXXAN(sb); - - vsb_clear(sb); - vsb_printf(sb, "HTTP/1.1 %03d %s\r\n", code, msg); - TIM_format(sp->t_req.tv_sec, buf); - vsb_printf(sb, "Date: %s\r\n", buf); - vsb_cat(sb, - "Server: Varnish\r\n" - "Connection: close\r\n" - "Content-Type: text/html; charset=iso-8859-1\r\n" - "\r\n" - "\r\n" - "\r\n" - " \r\n"); - vsb_printf(sb, " %03d %s\r\n", code, msg); - vsb_cat(sb, - " \r\n" - " \r\n"); - vsb_printf(sb, "

    Error %03d %s

    \r\n", code, msg); - vsb_printf(sb, "

    %s

    \r\n", reason); - vsb_printf(sb, "

    Guru Meditation:

    \r\n"); - vsb_printf(sb, "

    XID: %u

    \r\n", sp->xid); - vsb_cat(sb, - " Varnish\r\n" - " \r\n" - "\r\n"); - vsb_finish(sb); - WRK_Reset(sp->wrk, &sp->fd); - sp->wrk->acct.hdrbytes += WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb)); - WRK_Flush(sp->wrk); - WSL(sp->wrk, SLT_TxStatus, sp->id, "%d", code); - WSL(sp->wrk, SLT_TxProtocol, sp->id, "HTTP/1.1"); - WSL(sp->wrk, SLT_TxResponse, sp->id, msg); - vca_close_session(sp, reason); - vsb_delete(sb); + /* GC the error page */ + HSH_Unbusy(sp->obj); + HSH_Deref(sp->obj); + sp->obj = NULL; } - /*--------------------------------------------------------------------*/ static void Added: trunk/varnish-cache/bin/varnishd/cache_synthetic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_synthetic.c (rev 0) +++ trunk/varnish-cache/bin/varnishd/cache_synthetic.c 2007-05-25 10:00:38 UTC (rev 1474) @@ -0,0 +1,142 @@ +/*- + * Copyright (c) 2007 Linpro AS + * All rights reserved. + * + * Author: Dag-Erling Sm?rgrav + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id$ + */ + +#include +#include + +#include + +#ifndef HAVE_CLOCK_GETTIME +#include "compat/clock_gettime.h" +#endif + +#include "shmlog.h" +#include "heritage.h" +#include "cache.h" + +/* + * Synthesize an error page. This assumes the session already has an + * object - if it doesn't, you need to either call HSH_Lookup(), or call + * HSH_Prealloc() and grab sp->obj->nobj, before calling this. + */ +void +SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl) +{ + struct storage *st; + struct object *o; + struct worker *w; + struct http *h; + struct vsb vsb; + const char *msg; + char date[40]; + time_t now; + size_t len; + int fd; + + assert(status >= 100 && status <= 999); + CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); + CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); + CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); + CHECK_OBJ_NOTNULL(&sp->obj->http, HTTP_MAGIC); + assert(sp->obj->busy > 0); + + /* shortcuts */ + w = sp->wrk; + fd = sp->fd; + o = sp->obj; + h = &o->http; + time(&now); + + /* look up HTTP response */ + msg = http_StatusMessage(status); + if (reason == NULL) + reason = msg; + AN(reason); + AN(msg); + + /* populate metadata */ + o->response = status; + o->valid = 1; + o->entered = now; + o->ttl = now + ttl; + o->last_modified = now; + o->xid = sp->xid; + + /* allocate space for body */ + /* XXX what if the object already has a body? */ + st = stevedore->alloc(stevedore, 1024); + XXXAN(st->stevedore); + TAILQ_INSERT_TAIL(&sp->obj->store, st, list); + + /* generate body */ + vsb_new(&vsb, (char *)st->ptr, st->space, VSB_FIXEDLEN); + vsb_printf(&vsb, + "\n" + "\n" + "\n" + " \n" + " %03d %s\n", status, msg); + vsb_printf(&vsb, + " \n" + " \n" + "

    Error %03d %s

    \n", status, msg); + vsb_printf(&vsb, + "

    %s

    \n", reason); + vsb_printf(&vsb, + "

    Guru Meditation:

    \n" + "

    XID: %u

    \n", sp->xid); + vsb_printf(&vsb, + "
    Varnish
    \n" + " \n" + "\n"); + vsb_finish(&vsb); + o->len = st->len = vsb_len(&vsb); + vsb_delete(&vsb); + + /* allocate space for header */ + /* XXX what if the object already has a header? */ + h->v = h->s = calloc(len = 1024, 1); + XXXAN(h->s); + h->e = h->s + len; + + /* generate header */ + http_ClrHeader(h); + http_PutProtocol(w, fd, h, "HTTP/1.0"); /* XXX */ + http_PutStatus(w, fd, h, status); + http_PutResponse(w, fd, h, msg); + TIM_format(now, date); + http_PrintfHeader(w, fd, h, "Date: %s", date); + http_PrintfHeader(w, fd, h, "Server: Varnish"); + http_PrintfHeader(w, fd, h, "Retry-After: %ju", (uintmax_t)ttl); + http_PrintfHeader(w, fd, h, "Content-Type: text/html; charset=utf-8"); + http_PrintfHeader(w, fd, h, "Content-Length: %u", o->len); + /* DO NOT generate X-Varnish header, RES_WriteObj will */ +} From des at projects.linpro.no Fri May 25 10:06:50 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 25 May 2007 12:06:50 +0200 (CEST) Subject: r1475 - trunk/varnish-cache/bin/varnishd Message-ID: <20070525100650.797C81EC40E@projects.linpro.no> Author: des Date: 2007-05-25 12:06:50 +0200 (Fri, 25 May 2007) New Revision: 1475 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c Log: The call to HSH_Freestore() is redundant; in pass mode, there are no other references to the object, so HSH_Deref() will free its storage. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-25 10:00:38 UTC (rev 1474) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-25 10:06:50 UTC (rev 1475) @@ -140,10 +140,6 @@ { RES_WriteObj(sp); - if (sp->obj->objhead != NULL && sp->obj->pass) { - /* we will no longer need the storage */ - HSH_Freestore(sp->obj); - } HSH_Deref(sp->obj); sp->obj = NULL; sp->step = STP_DONE; From ingvar at projects.linpro.no Mon May 28 21:04:18 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Mon, 28 May 2007 23:04:18 +0200 (CEST) Subject: r1476 - trunk/varnish-cache/redhat Message-ID: <20070528210418.05FEC1EC425@projects.linpro.no> Author: ingvar Date: 2007-05-28 23:04:17 +0200 (Mon, 28 May 2007) New Revision: 1476 Modified: trunk/varnish-cache/redhat/varnish.spec Log: * Mon May 28 2007 Ingvar Hagelund - 1.0.4-3 - Fixed initrc-script bug only visible on el4 (fixes #107) Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-05-25 10:06:50 UTC (rev 1475) +++ trunk/varnish-cache/redhat/varnish.spec 2007-05-28 21:04:17 UTC (rev 1476) @@ -1,7 +1,7 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.0.svn -Release: 20070517%{?dist} +Release: 20070528%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ @@ -28,6 +28,7 @@ Group: System Environment/Libraries BuildRequires: ncurses-devel #Requires: ncurses +#Obsoletes: libvarnish1 %description libs Libraries for %{name}. @@ -66,6 +67,13 @@ sed -e ' s/8080/80/g ' etc/default.vcl > redhat/default.vcl + +%if "%dist" >= "el4" + sed -i 's,daemon --pidfile \${PIDFILE},daemon,g' redhat/varnish.initrc + sed -i 's,status -p \$PIDFILE,status,g' redhat/varnish.initrc + sed -i 's,killproc -p \$PIDFILE,killproc,g' redhat/varnish.initrc +%endif + %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} INSTALL="install -p" @@ -139,6 +147,17 @@ %postun libs -p /sbin/ldconfig %changelog +* Mon May 28 2007 Ingvar Hagelund - 1.0.4-3 +- Fixed initrc-script bug only visible on el4 (fixes #107) + +* Sun May 20 2007 Ingvar Hagelund - 1.0.4-2 +- Repack from unchanged 1.0.4 tarball +- Final review request and CVS request for Fedora Extras +- Repack with extra obsoletes for upgrading from older sf.net package + +* Fri May 18 2007 Dag-Erling Sm?rgrav - 1.0.4-1 +- Bump Version and Release for 1.0.4 + * Wed May 16 2007 Ingvar Hagelund - 1.0.svn-20070517 - Wrapping up for 1.0.4 - Changes in sysconfig and init scripts. Syncing with files in From des at projects.linpro.no Tue May 29 10:54:42 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 29 May 2007 12:54:42 +0200 (CEST) Subject: r1477 - in trunk/varnish-cache: . debian redhat Message-ID: <20070529105442.94CFB1EC22E@projects.linpro.no> Author: des Date: 2007-05-29 12:54:42 +0200 (Tue, 29 May 2007) New Revision: 1477 Added: trunk/varnish-cache/debian/Makefile.am trunk/varnish-cache/redhat/Makefile.am Modified: trunk/varnish-cache/Makefile.am trunk/varnish-cache/configure.ac trunk/varnish-cache/debian/ trunk/varnish-cache/redhat/ trunk/varnish-cache/redhat/varnish.initrc Log: Be more explicit about which files / directories to include in a release. Modified: trunk/varnish-cache/Makefile.am =================================================================== --- trunk/varnish-cache/Makefile.am 2007-05-28 21:04:17 UTC (rev 1476) +++ trunk/varnish-cache/Makefile.am 2007-05-29 10:54:42 UTC (rev 1477) @@ -2,4 +2,6 @@ SUBDIRS = include lib bin man etc doc -EXTRA_DIST = LICENSE autogen.sh debian redhat +SUBDIRS += debian redhat + +EXTRA_DIST = LICENSE autogen.sh Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2007-05-28 21:04:17 UTC (rev 1476) +++ trunk/varnish-cache/configure.ac 2007-05-29 10:54:42 UTC (rev 1477) @@ -140,5 +140,7 @@ lib/libvarnishapi/Makefile lib/libvcl/Makefile man/Makefile + debian/Makefile + redhat/Makefile ]) AC_OUTPUT Property changes on: trunk/varnish-cache/debian ___________________________________________________________________ Name: svn:ignore + Makefile.in Makefile Added: trunk/varnish-cache/debian/Makefile.am =================================================================== --- trunk/varnish-cache/debian/Makefile.am (rev 0) +++ trunk/varnish-cache/debian/Makefile.am 2007-05-29 10:54:42 UTC (rev 1477) @@ -0,0 +1,7 @@ +# $Id$ + +EXTRA_DIST = \ + changelog compat control copyright dirs docs lintian-override \ + README.Debian rules TODO varnish.default varnish.examples \ + varnish.init varnish.logrotate varnish.postrm \ + varnish.varnishlog.init Property changes on: trunk/varnish-cache/debian/Makefile.am ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/varnish-cache/redhat ___________________________________________________________________ Name: svn:ignore + Makefile.in Makefile Added: trunk/varnish-cache/redhat/Makefile.am =================================================================== --- trunk/varnish-cache/redhat/Makefile.am (rev 0) +++ trunk/varnish-cache/redhat/Makefile.am 2007-05-29 10:54:42 UTC (rev 1477) @@ -0,0 +1,5 @@ +# $Id$ + +EXTRA_DIST = \ + README.redhat TODO varnish.initrc varnishlog.initrc \ + varnish.logrotate varnish.spec varnish.sysconfig Property changes on: trunk/varnish-cache/redhat/Makefile.am ___________________________________________________________________ Name: svn:keywords + Id Modified: trunk/varnish-cache/redhat/varnish.initrc =================================================================== --- trunk/varnish-cache/redhat/varnish.initrc 2007-05-28 21:04:17 UTC (rev 1476) +++ trunk/varnish-cache/redhat/varnish.initrc 2007-05-29 10:54:42 UTC (rev 1477) @@ -38,7 +38,7 @@ echo -n "Please put configuration options in /etc/sysconfig/varnish" echo_failure else - daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /dev/null 2>&1 + daemon ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /dev/null 2>&1 sleep 1 pkill -0 $PROCNAME RETVAL=$? @@ -54,7 +54,7 @@ ;; stop) echo -n "Stopping varnish HTTP accelerator: " - killproc -p $PIDFILE $DAEMON + killproc $DAEMON RETVAL=$? if [ $RETVAL -eq 0 ] then @@ -66,7 +66,7 @@ echo ;; status) - status -p $PIDFILE $PROCNAME + status $PROCNAME RETVAL=$? ;; restart|reload) From ingvar at projects.linpro.no Tue May 29 11:27:56 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Tue, 29 May 2007 13:27:56 +0200 (CEST) Subject: r1478 - trunk/varnish-cache/redhat Message-ID: <20070529112756.8C3051EC3F9@projects.linpro.no> Author: ingvar Date: 2007-05-29 13:27:56 +0200 (Tue, 29 May 2007) New Revision: 1478 Modified: trunk/varnish-cache/redhat/varnish.spec Log: more intelligent sed magic in the redhat specfile Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-05-29 10:54:42 UTC (rev 1477) +++ trunk/varnish-cache/redhat/varnish.spec 2007-05-29 11:27:56 UTC (rev 1478) @@ -1,7 +1,7 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.0.svn -Release: 20070528%{?dist} +Release: 20070529%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ @@ -60,18 +60,19 @@ # We have to remove rpath - not allowed in Fedora # (This problem only visible on 64 bit arches) -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g; + s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %{__make} %{?_smp_mflags} sed -e ' s/8080/80/g ' etc/default.vcl > redhat/default.vcl -%if "%dist" >= "el4" - sed -i 's,daemon --pidfile \${PIDFILE},daemon,g' redhat/varnish.initrc - sed -i 's,status -p \$PIDFILE,status,g' redhat/varnish.initrc - sed -i 's,killproc -p \$PIDFILE,killproc,g' redhat/varnish.initrc +%if "%dist" == "el4" + sed -i 's,daemon --pidfile \${\?PIDFILE}\?,daemon,g; + s,status -p \$PIDFILE,status,g; + s,killproc -p \$PIDFILE,killproc,g' \ + redhat/varnish.initrc redhat/varnishlog.initrc %endif %install From cecilihf at projects.linpro.no Wed May 30 09:53:50 2007 From: cecilihf at projects.linpro.no (cecilihf at projects.linpro.no) Date: Wed, 30 May 2007 11:53:50 +0200 (CEST) Subject: r1479 - in trunk/varnish-cache: bin/varnishncsa lib/libvarnishapi Message-ID: <20070530095350.1573B1EC22E@projects.linpro.no> Author: cecilihf Date: 2007-05-30 11:53:49 +0200 (Wed, 30 May 2007) New Revision: 1479 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c trunk/varnish-cache/lib/libvarnishapi/shmlog.c Log: varnishncsa is now able to produce backend logs. A couple of problems still remain: missing hostname and timestamp for backend communication. This could be solved with some extra tags serving the same purpose as ReqStart and ReqEnd does for client communication, providing this information. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-29 11:27:56 UTC (rev 1478) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-30 09:53:49 UTC (rev 1479) @@ -89,6 +89,8 @@ static size_t nll; +static time_t t; + static int isprefix(const char *str, const char *prefix, const char *end, const char **next) { @@ -170,15 +172,14 @@ const char *end, *next; char *q; FILE *fo; - time_t t; long l; struct tm tm; char tbuf[40]; struct logline *lp; end = ptr + len; - - if (!(spec &VSL_S_CLIENT)) + + if (!(spec & VSL_S_CLIENT || spec & VSL_S_BACKEND)) return (0); if (fd >= nll) { @@ -200,6 +201,18 @@ lp = ll[fd]; switch (tag) { + case SLT_BackendOpen: + if (!(spec & VSL_S_BACKEND)) + break; + if (lp->df_h != NULL) + lp->bogus = 1; + else { + if (isprefix(ptr, "default", end, &next)) + lp->df_h = trimfield(next, end); + else + lp->df_h = trimfield(ptr, end); + } + break; case SLT_ReqStart: if (lp->df_h != NULL) lp->bogus = 1; @@ -207,35 +220,71 @@ lp->df_h = trimfield(ptr, end); break; + case SLT_TxRequest: + if (!(spec & VSL_S_BACKEND)) + break; case SLT_RxRequest: + if (tag == SLT_RxRequest && (spec & VSL_S_BACKEND)) + break; + if (lp->df_m != NULL) lp->bogus = 1; else lp->df_m = trimline(ptr, end); break; + case SLT_TxURL: + if (!(spec & VSL_S_BACKEND)) + break; case SLT_RxURL: + if (tag == SLT_RxURL && (spec & VSL_S_BACKEND)) + break; + if (lp->df_Uq != NULL) lp->bogus = 1; else lp->df_Uq = trimline(ptr, end); break; + case SLT_TxProtocol: + if (!(spec & VSL_S_BACKEND)) + break; case SLT_RxProtocol: + if (tag == SLT_RxProtocol && (spec & VSL_S_BACKEND)) + break; + if (lp->df_H != NULL) lp->bogus = 1; else lp->df_H = trimline(ptr, end); break; + case SLT_RxStatus: + if (!(spec & VSL_S_BACKEND)) + break; case SLT_TxStatus: + if (tag == SLT_TxStatus && (spec & VSL_S_BACKEND)) + break; + if (lp->df_s != NULL) lp->bogus = 1; else lp->df_s = trimline(ptr, end); break; + case SLT_TxHeader: + if (!(spec & VSL_S_BACKEND)) + break; case SLT_RxHeader: + if (tag == SLT_RxHeader && (spec & VSL_S_BACKEND)) { + if (isprefix(ptr, "content-length:", end, &next)) { + lp->df_b = trimline(next, end); + } else if (isprefix(ptr, "date:", end, &next)) { + if (strptime(trimline(next, end), "%a, %d %b %Y %T", &tm)) + t = mktime(&tm); + } + break; + } if (isprefix(ptr, "user-agent:", end, &next)) lp->df_User_agent = trimline(next, end); else if (isprefix(ptr, "referer:", end, &next)) @@ -258,19 +307,28 @@ break; } - if (tag != SLT_ReqEnd) + if ((spec & VSL_S_CLIENT) && tag != SLT_ReqEnd) return (0); - - if (sscanf(ptr, "%*u %*u.%*u %ld.", &l) != 1) - lp->bogus = 1; - else - t = l; - + + if ((spec & VSL_S_BACKEND) && tag != SLT_BackendReuse && + (tag != SLT_BackendClose || lp->df_Uq)) + return (0); + + if (tag == SLT_ReqEnd) { + if (sscanf(ptr, "%*u %*u.%*u %ld.", &l) != 1) + lp->bogus = 1; + else + t = l; + } + if (!lp->bogus) { + fo = priv; - /* %h */ - fprintf(fo, "%s ", lp->df_h ? lp->df_h : "-"); + if (!lp->df_h && spec & VSL_S_BACKEND) + fprintf(fo, "127.0.0.1 "); + else + fprintf(fo, "%s ", lp->df_h ? lp->df_h : "-"); /* %l */ fprintf(fo, "- "); Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2007-05-29 11:27:56 UTC (rev 1478) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2007-05-30 09:53:49 UTC (rev 1479) @@ -265,6 +265,7 @@ vd->map[u] &= ~M_BACKEND; break; case SLT_BackendOpen: + case SLT_BackendXID: vd->map[u] |= M_BACKEND; vd->map[u] &= ~M_CLIENT; break; From des at projects.linpro.no Wed May 30 14:54:29 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 30 May 2007 16:54:29 +0200 (CEST) Subject: r1480 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20070530145429.5648E1EC22E@projects.linpro.no> Author: des Date: 2007-05-30 16:54:28 +0200 (Wed, 30 May 2007) New Revision: 1480 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Whitespace cleanup. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-30 09:53:49 UTC (rev 1479) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-30 14:54:28 UTC (rev 1480) @@ -90,7 +90,7 @@ static size_t nll; static time_t t; - + static int isprefix(const char *str, const char *prefix, const char *end, const char **next) { @@ -178,7 +178,7 @@ struct logline *lp; end = ptr + len; - + if (!(spec & VSL_S_CLIENT || spec & VSL_S_BACKEND)) return (0); @@ -226,7 +226,7 @@ case SLT_RxRequest: if (tag == SLT_RxRequest && (spec & VSL_S_BACKEND)) break; - + if (lp->df_m != NULL) lp->bogus = 1; else @@ -239,7 +239,7 @@ case SLT_RxURL: if (tag == SLT_RxURL && (spec & VSL_S_BACKEND)) break; - + if (lp->df_Uq != NULL) lp->bogus = 1; else @@ -252,7 +252,7 @@ case SLT_RxProtocol: if (tag == SLT_RxProtocol && (spec & VSL_S_BACKEND)) break; - + if (lp->df_H != NULL) lp->bogus = 1; else @@ -265,7 +265,7 @@ case SLT_TxStatus: if (tag == SLT_TxStatus && (spec & VSL_S_BACKEND)) break; - + if (lp->df_s != NULL) lp->bogus = 1; else @@ -282,7 +282,7 @@ } else if (isprefix(ptr, "date:", end, &next)) { if (strptime(trimline(next, end), "%a, %d %b %Y %T", &tm)) t = mktime(&tm); - } + } break; } if (isprefix(ptr, "user-agent:", end, &next)) @@ -309,21 +309,21 @@ if ((spec & VSL_S_CLIENT) && tag != SLT_ReqEnd) return (0); - + if ((spec & VSL_S_BACKEND) && tag != SLT_BackendReuse && (tag != SLT_BackendClose || lp->df_Uq)) return (0); - + if (tag == SLT_ReqEnd) { if (sscanf(ptr, "%*u %*u.%*u %ld.", &l) != 1) lp->bogus = 1; else t = l; } - + if (!lp->bogus) { - fo = priv; + /* %h */ if (!lp->df_h && spec & VSL_S_BACKEND) fprintf(fo, "127.0.0.1 "); From des at projects.linpro.no Thu May 31 09:18:57 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 31 May 2007 11:18:57 +0200 (CEST) Subject: r1481 - in trunk/varnish-cache: . bin/varnishd bin/varnishhist bin/varnishlog bin/varnishncsa bin/varnishstat bin/varnishtop debian include include/compat lib/libcompat lib/libvarnish lib/libvarnishapi lib/libvcl man Message-ID: <20070531091857.BD4CE1EC22E@projects.linpro.no> Author: des Date: 2007-05-31 11:18:56 +0200 (Thu, 31 May 2007) New Revision: 1481 Modified: trunk/varnish-cache/LICENSE trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_acceptor.h trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_ban.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_cli.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_hash.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_main.c trunk/varnish-cache/bin/varnishd/cache_pipe.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_synthetic.c trunk/varnish-cache/bin/varnishd/cache_vcl.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c trunk/varnish-cache/bin/varnishd/cache_vrt_re.c trunk/varnish-cache/bin/varnishd/common.h trunk/varnish-cache/bin/varnishd/hash_classic.c trunk/varnish-cache/bin/varnishd/hash_simple_list.c trunk/varnish-cache/bin/varnishd/hash_slinger.h trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_cli.c trunk/varnish-cache/bin/varnishd/mgt_cli.h trunk/varnish-cache/bin/varnishd/mgt_event.c trunk/varnish-cache/bin/varnishd/mgt_event.h trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/mgt_vcc.c trunk/varnish-cache/bin/varnishd/rfc2616.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/bin/varnishd/steps.h trunk/varnish-cache/bin/varnishd/stevedore.h trunk/varnish-cache/bin/varnishd/storage_file.c trunk/varnish-cache/bin/varnishd/storage_malloc.c trunk/varnish-cache/bin/varnishd/tcp.c trunk/varnish-cache/bin/varnishd/varnishd.1 trunk/varnish-cache/bin/varnishd/varnishd.c trunk/varnish-cache/bin/varnishhist/varnishhist.1 trunk/varnish-cache/bin/varnishhist/varnishhist.c trunk/varnish-cache/bin/varnishlog/varnishlog.1 trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 trunk/varnish-cache/bin/varnishncsa/varnishncsa.c trunk/varnish-cache/bin/varnishstat/varnishstat.1 trunk/varnish-cache/bin/varnishstat/varnishstat.c trunk/varnish-cache/bin/varnishtop/varnishtop.1 trunk/varnish-cache/bin/varnishtop/varnishtop.c trunk/varnish-cache/debian/copyright trunk/varnish-cache/include/binary_heap.h trunk/varnish-cache/include/cli.h trunk/varnish-cache/include/cli_common.h trunk/varnish-cache/include/cli_priv.h trunk/varnish-cache/include/compat/asprintf.h trunk/varnish-cache/include/compat/clock_gettime.h trunk/varnish-cache/include/compat/setproctitle.h trunk/varnish-cache/include/compat/srandomdev.h trunk/varnish-cache/include/compat/strlcat.h trunk/varnish-cache/include/compat/strlcpy.h trunk/varnish-cache/include/compat/strndup.h trunk/varnish-cache/include/compat/vasprintf.h trunk/varnish-cache/include/http_headers.h trunk/varnish-cache/include/libvarnish.h trunk/varnish-cache/include/libvcl.h trunk/varnish-cache/include/shmlog.h trunk/varnish-cache/include/shmlog_tags.h trunk/varnish-cache/include/stat_field.h trunk/varnish-cache/include/stats.h trunk/varnish-cache/include/varnishapi.h trunk/varnish-cache/include/vrt.h trunk/varnish-cache/lib/libcompat/asprintf.c trunk/varnish-cache/lib/libcompat/clock_gettime.c trunk/varnish-cache/lib/libcompat/setproctitle.c trunk/varnish-cache/lib/libcompat/srandomdev.c trunk/varnish-cache/lib/libcompat/strndup.c trunk/varnish-cache/lib/libcompat/vasprintf.c trunk/varnish-cache/lib/libvarnish/argv.c trunk/varnish-cache/lib/libvarnish/assert.c trunk/varnish-cache/lib/libvarnish/binary_heap.c trunk/varnish-cache/lib/libvarnish/cli.c trunk/varnish-cache/lib/libvarnish/cli_common.c trunk/varnish-cache/lib/libvarnish/crc32.c trunk/varnish-cache/lib/libvarnish/time.c trunk/varnish-cache/lib/libvarnish/version.c trunk/varnish-cache/lib/libvarnishapi/shmlog.c trunk/varnish-cache/lib/libvcl/vcc_acl.c trunk/varnish-cache/lib/libvcl/vcc_action.c trunk/varnish-cache/lib/libvcl/vcc_backend.c trunk/varnish-cache/lib/libvcl/vcc_compile.c trunk/varnish-cache/lib/libvcl/vcc_compile.h trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl trunk/varnish-cache/lib/libvcl/vcc_parse.c trunk/varnish-cache/lib/libvcl/vcc_priv.h trunk/varnish-cache/lib/libvcl/vcc_token.c trunk/varnish-cache/lib/libvcl/vcc_xref.c trunk/varnish-cache/man/vcl.7 Log: Correct a systematic typo in the license. Modified: trunk/varnish-cache/LICENSE =================================================================== --- trunk/varnish-cache/LICENSE 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/LICENSE 2007-05-31 09:18:56 UTC (rev 1481) @@ -11,7 +11,7 @@ notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -12,7 +12,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_ban.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_ban.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_cli.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_cli.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_main.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_main.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_main.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_synthetic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_synthetic.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_synthetic.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -13,7 +13,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_re.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/common.h =================================================================== --- trunk/varnish-cache/bin/varnishd/common.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/common.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_classic.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/hash_slinger.h =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_slinger.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/hash_slinger.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/mgt.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/mgt.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/mgt_event.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/mgt_event.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c =================================================================== --- trunk/varnish-cache/bin/varnishd/rfc2616.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/rfc2616.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/steps.h =================================================================== --- trunk/varnish-cache/bin/varnishd/steps.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/steps.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/stevedore.h =================================================================== --- trunk/varnish-cache/bin/varnishd/stevedore.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/stevedore.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_malloc.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/storage_malloc.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/tcp.c =================================================================== --- trunk/varnish-cache/bin/varnishd/tcp.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/tcp.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.1 =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.1 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.1 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.1 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.1 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -15,7 +15,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.1 =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.1 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.1 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/debian/copyright =================================================================== --- trunk/varnish-cache/debian/copyright 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/debian/copyright 2007-05-31 09:18:56 UTC (rev 1481) @@ -26,7 +26,7 @@ notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/binary_heap.h =================================================================== --- trunk/varnish-cache/include/binary_heap.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/binary_heap.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/cli.h =================================================================== --- trunk/varnish-cache/include/cli.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/cli.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/cli_common.h =================================================================== --- trunk/varnish-cache/include/cli_common.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/cli_common.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/cli_priv.h =================================================================== --- trunk/varnish-cache/include/cli_priv.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/cli_priv.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/compat/asprintf.h =================================================================== --- trunk/varnish-cache/include/compat/asprintf.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/compat/asprintf.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/compat/clock_gettime.h =================================================================== --- trunk/varnish-cache/include/compat/clock_gettime.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/compat/clock_gettime.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/compat/setproctitle.h =================================================================== --- trunk/varnish-cache/include/compat/setproctitle.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/compat/setproctitle.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/compat/srandomdev.h =================================================================== --- trunk/varnish-cache/include/compat/srandomdev.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/compat/srandomdev.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/compat/strlcat.h =================================================================== --- trunk/varnish-cache/include/compat/strlcat.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/compat/strlcat.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/compat/strlcpy.h =================================================================== --- trunk/varnish-cache/include/compat/strlcpy.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/compat/strlcpy.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/compat/strndup.h =================================================================== --- trunk/varnish-cache/include/compat/strndup.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/compat/strndup.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/compat/vasprintf.h =================================================================== --- trunk/varnish-cache/include/compat/vasprintf.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/compat/vasprintf.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/http_headers.h =================================================================== --- trunk/varnish-cache/include/http_headers.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/http_headers.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/libvarnish.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/libvcl.h =================================================================== --- trunk/varnish-cache/include/libvcl.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/libvcl.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/shmlog.h =================================================================== --- trunk/varnish-cache/include/shmlog.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/shmlog.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/shmlog_tags.h =================================================================== --- trunk/varnish-cache/include/shmlog_tags.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/shmlog_tags.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/stat_field.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/stats.h =================================================================== --- trunk/varnish-cache/include/stats.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/stats.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/varnishapi.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/include/vrt.h =================================================================== --- trunk/varnish-cache/include/vrt.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/include/vrt.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libcompat/asprintf.c =================================================================== --- trunk/varnish-cache/lib/libcompat/asprintf.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libcompat/asprintf.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libcompat/clock_gettime.c =================================================================== --- trunk/varnish-cache/lib/libcompat/clock_gettime.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libcompat/clock_gettime.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libcompat/setproctitle.c =================================================================== --- trunk/varnish-cache/lib/libcompat/setproctitle.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libcompat/setproctitle.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libcompat/srandomdev.c =================================================================== --- trunk/varnish-cache/lib/libcompat/srandomdev.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libcompat/srandomdev.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libcompat/strndup.c =================================================================== --- trunk/varnish-cache/lib/libcompat/strndup.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libcompat/strndup.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libcompat/vasprintf.c =================================================================== --- trunk/varnish-cache/lib/libcompat/vasprintf.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libcompat/vasprintf.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvarnish/argv.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/argv.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvarnish/argv.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvarnish/assert.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/assert.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvarnish/assert.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvarnish/binary_heap.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/binary_heap.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvarnish/binary_heap.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvarnish/cli.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvarnish/cli.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvarnish/cli_common.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli_common.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvarnish/cli_common.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvarnish/crc32.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/crc32.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvarnish/crc32.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvarnish/time.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/time.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvarnish/time.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvarnish/version.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/version.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvarnish/version.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_acl.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_acl.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_action.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_action.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_action.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_backend.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_backend.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_backend.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -367,7 +367,7 @@ vsb_cat(sb, " * notice, this list of conditions and the following disclaimer in the\n"); vsb_cat(sb, " * documentation and/or other materials provided with the distribution.\n"); vsb_cat(sb, " *\n"); - vsb_cat(sb, " * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n"); + vsb_cat(sb, " * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n"); vsb_cat(sb, " * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n"); vsb_cat(sb, " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n"); vsb_cat(sb, " * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE\n"); Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl 2007-05-31 09:18:56 UTC (rev 1481) @@ -15,7 +15,7 @@ # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # -# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2007-05-31 09:18:56 UTC (rev 1481) @@ -15,7 +15,7 @@ # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # -# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_parse.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_parse.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_parse.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_priv.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_priv.h 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_priv.h 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_token.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/lib/libvcl/vcc_xref.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_xref.c 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/lib/libvcl/vcc_xref.c 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE Modified: trunk/varnish-cache/man/vcl.7 =================================================================== --- trunk/varnish-cache/man/vcl.7 2007-05-30 14:54:28 UTC (rev 1480) +++ trunk/varnish-cache/man/vcl.7 2007-05-31 09:18:56 UTC (rev 1481) @@ -14,7 +14,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE From des at projects.linpro.no Thu May 31 12:57:32 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 31 May 2007 14:57:32 +0200 (CEST) Subject: r1482 - trunk/varnish-cache/bin/varnishd Message-ID: <20070531125733.045FC1EC400@projects.linpro.no> Author: des Date: 2007-05-31 14:57:30 +0200 (Thu, 31 May 2007) New Revision: 1482 Modified: trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/varnishd.1 trunk/varnish-cache/bin/varnishd/varnishd.c Log: Add two run-time parameters, "user" and "group", which specify an unprivileged user and group to which the child process will switch immediately after fork() returns, before it starts accepting connections. The default values are "nobody" and "nogroup" (they should probably be tweakable at compile time...) Note that this does not provide full privilege separation, as there are still channels between the parent and child processes which need to be monitored, but it is an improvement on the previous situation. Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2007-05-31 09:18:56 UTC (rev 1481) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2007-05-31 12:57:30 UTC (rev 1482) @@ -66,6 +66,12 @@ struct params { + /* Unprivileged user / group */ + char *user; + uid_t uid; + char *group; + gid_t gid; + /* TTL used for lack of anything better */ unsigned default_ttl; Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2007-05-31 09:18:56 UTC (rev 1481) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2007-05-31 12:57:30 UTC (rev 1482) @@ -177,6 +177,11 @@ if (i < 0) errx(1, "Could not fork child"); if (i == 0) { + if (geteuid() == 0) { + XXXAZ(setgid(params->gid) == -1); + XXXAZ(setuid(params->uid) == -1); + } + /* Redirect stdin/out/err */ AZ(close(0)); i = open("/dev/null", O_RDONLY); Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-31 09:18:56 UTC (rev 1481) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-05-31 12:57:30 UTC (rev 1482) @@ -29,6 +29,10 @@ * $Id$ */ +#include + +#include +#include #include #include #include @@ -134,6 +138,70 @@ /*--------------------------------------------------------------------*/ static void +tweak_user(struct cli *cli, struct parspec *par, const char *arg) +{ + struct passwd *pw; + struct group *gr; + + (void)par; + if (arg != NULL) { + if ((pw = getpwnam(arg)) == NULL) { + cli_out(cli, "Unknown user"); + cli_result(cli, CLIS_PARAM); + return; + } + if (params->user) + free(params->user); + params->user = strdup(pw->pw_name); + AN(params->user); + params->uid = pw->pw_uid; + + /* set group to user's primary group */ + if (params->group) + free(params->group); + if ((gr = getgrgid(pw->pw_gid)) != NULL && + (gr = getgrnam(gr->gr_name)) != NULL && + gr->gr_gid == pw->pw_gid) { + params->group = strdup(gr->gr_name); + AN(params->group); + } + params->gid = pw->pw_gid; + } else if (params->user) { + cli_out(cli, "%s (%d)", params->user, (int)params->uid); + } else { + cli_out(cli, "%d", (int)params->uid); + } +} + +/*--------------------------------------------------------------------*/ + +static void +tweak_group(struct cli *cli, struct parspec *par, const char *arg) +{ + struct group *gr; + + (void)par; + if (arg != NULL) { + if ((gr = getgrnam(arg)) == NULL) { + cli_out(cli, "Unknown group"); + cli_result(cli, CLIS_PARAM); + return; + } + if (params->group) + free(params->group); + params->group = strdup(gr->gr_name); + AN(params->group); + params->gid = gr->gr_gid; + } else if (params->group) { + cli_out(cli, "%s (%d)", params->group, (int)params->gid); + } else { + cli_out(cli, "%d", (int)params->gid); + } +} + +/*--------------------------------------------------------------------*/ + +static void tweak_default_ttl(struct cli *cli, struct parspec *par, const char *arg) { @@ -447,6 +515,15 @@ * change its default value. */ static struct parspec parspec[] = { + { "user", tweak_user, + "The unprivileged user to run as. Setting this will " + "also set \"group\" to the specified user's primary group.\n" + MUST_RESTART, + "nobody" }, + { "group", tweak_group, + "The unprivileged group to run as.\n" + MUST_RESTART, + "nogroup" }, { "default_ttl", tweak_default_ttl, "The TTL assigned to objects if neither the backend nor " "the VCL code assigns one.\n" Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-31 09:18:56 UTC (rev 1481) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2007-05-31 12:57:30 UTC (rev 1482) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd May 16, 2007 +.Dd May 30, 2007 .Dt VARNISHD 1 .Os .Sh NAME @@ -40,12 +40,14 @@ .Op Fl b Ar host Ns Op : Ns Ar port .Op Fl d .Op Fl f Ar config +.Op Fl g Ar group .Op Fl h Ar type Ns Op , Ns Ar options .Op Fl P Ar file .Op Fl p Ar param Ns = Ns Ar value .Op Fl s Ar type Ns Op , Ns Ar options .Op Fl T Ar address Ns Op : Ns Ar port .Op Fl t Ar ttl +.Op Fl u Ar user .Op Fl V .Op Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout .Sh DESCRIPTION @@ -114,6 +116,12 @@ See .Xr vcl 7 for details on VCL syntax. +.It Fl g Ar group +Specifies the name of an unprivileged group to which the child process +should switch before it starts accepting connections. +This is a shortcut for specifying the +.Va group +run-time parameter. .It Fl h Ar type Ns Op , Ns Ar options Specifies the hash algorithm. See @@ -148,6 +156,15 @@ This is a shortcut for specifying the .Va default_ttl run-time parameter. +.It Fl u Ar user +Specifies the name of an unprivileged user to which the child process +should switch before it starts accepting connections. +This is a shortcut for specifying the +.Va user +run-time parameter. +.Pp +If specifying both a user and a group, the user should be specified +first. .It Fl V Display the version number and exit. .It Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout @@ -349,6 +366,20 @@ backend server does not specify a content length. .Pp The default is 128 kilobytes. +.It Va group +The name of an unprivileged group to which the child process should +switch before it starts accepting connections. +Note that setting +.Va user +will automatically set +.Va group +to the primary group of the specified user, so if both +.Va user +and +.Va group +are specified, the latter should be specified last. +.Pp +The default is "nogroup". .It Va http_workspace The size of the per-session workspace for HTTP protocol data. For performance reasons, this space is preallocated, so any change to @@ -443,6 +474,20 @@ .Va thread_pool_min . .Pp The default is 120 seconds. +.It Va user +The name of an unprivileged user to which the child process should +switch before it starts accepting connections. +Note that setting +.Va user +will automatically set +.Va group +to the primary group of the specified user, so if both +.Va user +and +.Va group +are specified, the latter should be specified last. +.Pp +The default is "nobody". .It Va vcl_trace Whether to issue log entries for calls to VCL code and their results. Note that this will generate large amounts of log data. Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2007-05-31 09:18:56 UTC (rev 1481) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2007-05-31 12:57:30 UTC (rev 1482) @@ -401,7 +401,7 @@ unsigned d_flag = 0; const char *b_arg = NULL; const char *f_arg = NULL; - const char *h_flag = "classic"; + const char *h_arg = "classic"; const char *P_arg = NULL; const char *s_arg = "file"; const char *T_arg = NULL; @@ -441,7 +441,7 @@ MCF_ParamInit(cli); cli_check(cli); - while ((o = getopt(argc, argv, "a:b:Cdf:h:P:p:s:T:t:Vw:")) != -1) + while ((o = getopt(argc, argv, "a:b:Cdf:g:h:P:p:s:T:t:u:Vw:")) != -1) switch (o) { case 'a': MCF_ParamSet(cli, "listen_address", optarg); @@ -459,8 +459,11 @@ case 'f': f_arg = optarg; break; + case 'g': + MCF_ParamSet(cli, "group", optarg); + break; case 'h': - h_flag = optarg; + h_arg = optarg; break; case 'P': P_arg = optarg; @@ -483,6 +486,9 @@ case 'T': T_arg = optarg; break; + case 'u': + MCF_ParamSet(cli, "user", optarg); + break; case 'V': varnish_version("varnishd"); exit(0); @@ -521,7 +527,7 @@ exit (0); setup_storage(s_arg); - setup_hash(h_flag); + setup_hash(h_arg); VSL_MgtInit(SHMLOG_FILENAME, 8*1024*1024);