From phk at varnish-cache.org Sun Apr 3 08:28:49 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Sun, 03 Apr 2011 10:28:49 +0200 Subject: [master] 52b7275 Now that we have more confidence in the gzip-patchworking-code be less draconian about error handling and debugging. Message-ID: commit 52b72752155d31efa176b6b738ce3acc488e8f9a Author: Poul-Henning Kamp Date: Sun Apr 3 08:27:23 2011 +0000 Now that we have more confidence in the gzip-patchworking-code be less draconian about error handling and debugging. Properly handle two src= attributes in an esi:include tag (ignore the entire tag, log the error) Deal with clients which close the connection half-way through an ESI delivery. diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index 337f3ee..4bc7309 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -693,6 +693,7 @@ int VGZ_WrwGunzip(struct sess *, struct vgz *, void *ibuf, ssize_t ibufl, char *obuf, ssize_t obufl, ssize_t *obufp); /* Return values */ +#define VGZ_SOCKET -2 #define VGZ_ERROR -1 #define VGZ_OK 0 #define VGZ_END 1 diff --git a/bin/varnishd/cache_esi_deliver.c b/bin/varnishd/cache_esi_deliver.c index b666c79..6e82db1 100644 --- a/bin/varnishd/cache_esi_deliver.c +++ b/bin/varnishd/cache_esi_deliver.c @@ -59,11 +59,6 @@ ved_include(struct sess *sp, const char *src, const char *host) return; sp->esi_level++; - if (WRW_Flush(w)) { - vca_close_session(sp, "remote closed"); - return; - } - (void)WRW_FlushRelease(w); obj = sp->obj; @@ -335,6 +330,12 @@ ESI_Deliver(struct sess *sp) i = VGZ_WrwGunzip(sp, vgz, st->ptr + off, l2, obuf, sizeof obuf, &obufl); + if (i == VGZ_SOCKET) { + vca_close_session(sp, + "remote closed"); + p = e; + break; + } assert (i == VGZ_OK || i == VGZ_END); } else { /* @@ -382,6 +383,11 @@ ESI_Deliver(struct sess *sp) WRW_Write(sp->wrk, obuf, obufl); obufl = 0; } + if (WRW_Flush(sp->wrk)) { + vca_close_session(sp, "remote closed"); + p = e; + break; + } Debug("INCL [%s][%s] BEGIN\n", q, p); ved_include(sp, (const char*)q, (const char*)p); Debug("INCL [%s][%s] END\n", q, p); diff --git a/bin/varnishd/cache_esi_parse.c b/bin/varnishd/cache_esi_parse.c index 48ca71e..dcf6ba7 100644 --- a/bin/varnishd/cache_esi_parse.c +++ b/bin/varnishd/cache_esi_parse.c @@ -188,7 +188,6 @@ vep_error(const struct vep_state *vep, const char *p) VSC_main->esi_errors++; l = (intmax_t)(vep->ver_p - vep->hack_p); - printf("ERROR at %jd %s\n", l , p); WSP(vep->sp, SLT_ESI_xmlerror, "ERR at %jd %s", l, p); } @@ -450,6 +449,17 @@ vep_do_include(struct vep_state *vep, enum dowhat what) if (what == DO_ATTR) { Debug("ATTR (%s) (%s)\n", vep->match_hit->match, vsb_data(vep->attr_vsb)); + if (vep->include_src != NULL) { + vep_error(vep, + "ESI 1.0 " + "has multiple src= attributes"); + vep->state = VEP_TAGERROR; + vsb_delete(vep->attr_vsb); + vsb_delete(vep->include_src); + vep->attr_vsb = NULL; + vep->include_src = NULL; + return; + } XXXAZ(vep->include_src); /* multiple src= */ vep->include_src = vep->attr_vsb; return; @@ -872,13 +882,13 @@ VEP_parse(const struct sess *sp, const char *p, size_t l) } else if (p < e) { vep->attr_delim = 0; p++; + vep->state = VEP_INTAG; if (vep->attr_vsb != NULL) { vsb_finish(vep->attr_vsb); AN(vep->dostuff); vep->dostuff(vep, DO_ATTR); vep->attr_vsb = NULL; } - vep->state = VEP_INTAG; } /****************************************************** diff --git a/bin/varnishd/cache_gzip.c b/bin/varnishd/cache_gzip.c index b4d78dd..7e389c9 100644 --- a/bin/varnishd/cache_gzip.c +++ b/bin/varnishd/cache_gzip.c @@ -383,7 +383,7 @@ VGZ_WrwGunzip(struct sess *sp, struct vgz *vg, void *ibuf, ssize_t ibufl, if (obufl == *obufp || i == VGZ_STUCK) { WRW_Write(sp->wrk, obuf, *obufp); if (WRW_Flush(sp->wrk)) - return (-1); + return (VGZ_SOCKET); *obufp = 0; VGZ_Obuf(vg, obuf + *obufp, obufl - *obufp); } diff --git a/bin/varnishtest/tests/r00894.vtc b/bin/varnishtest/tests/r00894.vtc new file mode 100644 index 0000000..c22037f --- /dev/null +++ b/bin/varnishtest/tests/r00894.vtc @@ -0,0 +1,20 @@ +# $Id$ + +test "Ticket #894" + +server s1 { + rxreq + txresp -body {} +} -start + +varnish v1 -vcl+backend { + sub vcl_fetch { + set beresp.do_esi = true; + } +} -start + +client c1 { + txreq + rxresp + expect resp.bodylen == 10 +} -run From phk at varnish-cache.org Mon Apr 4 08:32:03 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 10:32:03 +0200 Subject: [master] a36d77c Allow -M without -S Message-ID: commit a36d77c39f5e7c451505ff1d77439afbf5717f84 Author: Poul-Henning Kamp Date: Mon Apr 4 08:31:09 2011 +0000 Allow -M without -S In general I would not advice doing this, but if you are strictly on a fortified localhost or localnet I can see the point. Fixes #893 diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c index f635322..68037ed 100644 --- a/bin/varnishd/varnishd.c +++ b/bin/varnishd/varnishd.c @@ -550,9 +550,10 @@ main(int argc, char * const *argv) usage(); } if (S_arg == NULL && T_arg == NULL && d_flag == 0 && b_arg == NULL && - f_arg == NULL) { + f_arg == NULL && M_arg == NULL) { fprintf(stderr, - "At least one of -d, -b, -f, -S or -T must be specified\n"); + "At least one of -d, -b, -f, -M, -S or -T " + "must be specified\n"); usage(); } From phk at varnish-cache.org Mon Apr 4 09:07:47 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 11:07:47 +0200 Subject: [master] 6e49350 Tighten up the management of the do_close flag. Message-ID: commit 6e4935020849560dd09aa71fa7e8ed3971168f68 Author: Poul-Henning Kamp Date: Mon Apr 4 09:07:21 2011 +0000 Tighten up the management of the do_close flag. Fixes #890 diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index 45470f6..7c4cb32 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -488,7 +488,6 @@ cnt_fetch(struct sess *sp) if (i) { sp->handling = VCL_RET_ERROR; sp->err_code = 503; - sp->wrk->do_close = 0; } else { /* * These two headers can be spread over multiple actual headers @@ -541,6 +540,7 @@ cnt_fetch(struct sess *sp) } /* Clean up partial fetch */ + AZ(sp->vbc); if (sp->objcore != NULL) { CHECK_OBJ_NOTNULL(sp->objcore, OBJCORE_MAGIC); @@ -729,7 +729,6 @@ cnt_fetchbody(struct sess *sp) /* Use unmodified headers*/ i = FetchBody(sp); - sp->wrk->do_close = 0; sp->wrk->h_content_length = NULL; http_Setup(sp->wrk->bereq, NULL); diff --git a/bin/varnishd/cache_dir.c b/bin/varnishd/cache_dir.c index 1b03044..615ab87 100644 --- a/bin/varnishd/cache_dir.c +++ b/bin/varnishd/cache_dir.c @@ -62,6 +62,7 @@ VDI_CloseFd(struct sess *sp) sp->vbc->backend = NULL; VBE_ReleaseConn(sp->vbc); sp->vbc = NULL; + sp->wrk->do_close = 0; } /* Recycle a connection ----------------------------------------------*/ @@ -74,6 +75,7 @@ VDI_RecycleFd(struct sess *sp) CHECK_OBJ_NOTNULL(sp->vbc, VBC_MAGIC); CHECK_OBJ_NOTNULL(sp->vbc->backend, BACKEND_MAGIC); assert(sp->vbc->fd >= 0); + AZ(sp->wrk->do_close); bp = sp->vbc->backend; From phk at varnish-cache.org Mon Apr 4 09:22:59 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 11:22:59 +0200 Subject: [master] 9cfe535 If we fail to allocate an object, attempt to create a shortlived object in Transient storage and if that also fails, 503. Message-ID: commit 9cfe535f67ef42d7f5dc09b0e6721bfd77316331 Author: Poul-Henning Kamp Date: Mon Apr 4 09:22:12 2011 +0000 If we fail to allocate an object, attempt to create a shortlived object in Transient storage and if that also fails, 503. Fixes 879 diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index 7c4cb32..ba418b6 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -689,7 +689,22 @@ cnt_fetchbody(struct sess *sp) sp->obj = STV_NewObject(sp, sp->wrk->storage_hint, l, &sp->wrk->exp, nhttp); - /* XXX: -> 513 */ + if (sp->obj == NULL) { + /* + * Try to salvage the transaction by allocating a + * shortlived object on Transient storage. + */ + sp->obj = STV_NewObject(sp, TRANSIENT_STORAGE, l, + &sp->wrk->exp, nhttp); + sp->wrk->exp.ttl = params->shortlived; + } + if (sp->obj == NULL) { + HSH_Drop(sp); + sp->err_code = 503; + sp->step = STP_ERROR; + VDI_CloseFd(sp); + return (0); + } CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); sp->wrk->storage_hint = NULL; From phk at varnish-cache.org Mon Apr 4 12:40:49 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 14:40:49 +0200 Subject: [master] 7e684a3 Mechanical name changes of internal functions, to catch up with changes to sbuf in FreeBSD. Message-ID: commit 7e684a3607362743d30a5b4c21c0bf546091f089 Author: Poul-Henning Kamp Date: Mon Apr 4 12:40:24 2011 +0000 Mechanical name changes of internal functions, to catch up with changes to sbuf in FreeBSD. diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c index 04797ff..1983824 100644 --- a/lib/libvarnish/vsb.c +++ b/lib/libvarnish/vsb.c @@ -73,7 +73,7 @@ SVNID("$Id$") */ #if !defined(NDEBUG) static void -_vsb_assert_integrity(const char *fun, struct vsb *s) +_assert_vsb_integrity(const char *fun, struct vsb *s) { (void)fun; @@ -89,7 +89,7 @@ _vsb_assert_integrity(const char *fun, struct vsb *s) } static void -_vsb_assert_state(const char *fun, struct vsb *s, int state) +_assert_vsb_state(const char *fun, struct vsb *s, int state) { (void)fun; @@ -99,11 +99,11 @@ _vsb_assert_state(const char *fun, struct vsb *s, int state) ("%s called with %sfinished or corrupt vsb", fun, (state ? "un" : ""))); } -#define vsb_assert_integrity(s) _vsb_assert_integrity(__func__, (s)) -#define vsb_assert_state(s, i) _vsb_assert_state(__func__, (s), (i)) +#define assert_vsb_integrity(s) _assert_vsb_integrity(__func__, (s)) +#define assert_vsb_state(s, i) _assert_vsb_state(__func__, (s), (i)) #else -#define vsb_assert_integrity(s) do { } while (0) -#define vsb_assert_state(s, i) do { } while (0) +#define assert_vsb_integrity(s) do { } while (0) +#define assert_vsb_state(s, i) do { } while (0) #endif static int @@ -195,7 +195,7 @@ void vsb_clear(struct vsb *s) { - vsb_assert_integrity(s); + assert_vsb_integrity(s); /* don't care if it's finished or not */ VSB_CLEARFLAG(s, VSB_FINISHED); @@ -211,8 +211,8 @@ int vsb_setpos(struct vsb *s, int pos) { - vsb_assert_integrity(s); - vsb_assert_state(s, 0); + assert_vsb_integrity(s); + assert_vsb_state(s, 0); KASSERT(pos >= 0, ("attempt to seek to a negative position (%d)", pos)); @@ -233,8 +233,8 @@ vsb_bcat(struct vsb *s, const void *buf, size_t len) { const char *str = buf; - vsb_assert_integrity(s); - vsb_assert_state(s, 0); + assert_vsb_integrity(s); + assert_vsb_state(s, 0); if (VSB_HASOVERFLOWED(s)) return (-1); @@ -257,8 +257,8 @@ int vsb_bcpy(struct vsb *s, const void *buf, size_t len) { - vsb_assert_integrity(s); - vsb_assert_state(s, 0); + assert_vsb_integrity(s); + assert_vsb_state(s, 0); vsb_clear(s); return (vsb_bcat(s, buf, len)); @@ -271,8 +271,8 @@ int vsb_cat(struct vsb *s, const char *str) { - vsb_assert_integrity(s); - vsb_assert_state(s, 0); + assert_vsb_integrity(s); + assert_vsb_state(s, 0); if (VSB_HASOVERFLOWED(s)) return (-1); @@ -296,8 +296,8 @@ int vsb_cpy(struct vsb *s, const char *str) { - vsb_assert_integrity(s); - vsb_assert_state(s, 0); + assert_vsb_integrity(s); + assert_vsb_state(s, 0); vsb_clear(s); return (vsb_cat(s, str)); @@ -312,8 +312,8 @@ vsb_vprintf(struct vsb *s, const char *fmt, va_list ap) va_list ap_copy; int len; - vsb_assert_integrity(s); - vsb_assert_state(s, 0); + assert_vsb_integrity(s); + assert_vsb_state(s, 0); KASSERT(fmt != NULL, ("%s called with a NULL format string", __func__)); @@ -372,8 +372,8 @@ int vsb_putc(struct vsb *s, int c) { - vsb_assert_integrity(s); - vsb_assert_state(s, 0); + assert_vsb_integrity(s); + assert_vsb_state(s, 0); if (VSB_HASOVERFLOWED(s)) return (-1); @@ -393,8 +393,8 @@ int vsb_trim(struct vsb *s) { - vsb_assert_integrity(s); - vsb_assert_state(s, 0); + assert_vsb_integrity(s); + assert_vsb_state(s, 0); if (VSB_HASOVERFLOWED(s)) return (-1); @@ -422,8 +422,8 @@ void vsb_finish(struct vsb *s) { - vsb_assert_integrity(s); - vsb_assert_state(s, 0); + assert_vsb_integrity(s); + assert_vsb_state(s, 0); s->s_buf[s->s_len] = '\0'; VSB_CLEARFLAG(s, VSB_OVERFLOWED); @@ -437,8 +437,8 @@ char * vsb_data(struct vsb *s) { - vsb_assert_integrity(s); - vsb_assert_state(s, VSB_FINISHED); + assert_vsb_integrity(s); + assert_vsb_state(s, VSB_FINISHED); return (s->s_buf); } @@ -450,7 +450,7 @@ int vsb_len(struct vsb *s) { - vsb_assert_integrity(s); + assert_vsb_integrity(s); /* don't care if it's finished or not */ if (VSB_HASOVERFLOWED(s)) @@ -466,7 +466,7 @@ vsb_delete(struct vsb *s) { int isdyn; - vsb_assert_integrity(s); + assert_vsb_integrity(s); /* don't care if it's finished or not */ if (VSB_ISDYNAMIC(s)) From phk at varnish-cache.org Mon Apr 4 12:59:17 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 14:59:17 +0200 Subject: [master] 8631295 More mechanical changes to track FreeBSD's sbufs closer Message-ID: commit 86312952c5036efdf731f0004bbb969fba93e833 Author: Poul-Henning Kamp Date: Mon Apr 4 12:58:57 2011 +0000 More mechanical changes to track FreeBSD's sbufs closer diff --git a/bin/varnishd/cache_backend_poll.c b/bin/varnishd/cache_backend_poll.c index 50b4b41..9cf241c 100644 --- a/bin/varnishd/cache_backend_poll.c +++ b/bin/varnishd/cache_backend_poll.c @@ -323,7 +323,7 @@ vbp_build_req(struct vsb *vsb, const struct vbp_vcl *vcl) vsb_printf(vsb, "\r\n"); } vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); } /*-------------------------------------------------------------------- @@ -488,7 +488,7 @@ VBP_Start(struct backend *b, const struct vrt_backend_probe *p, const char *host XXXAN(vt); VTAILQ_INIT(&vt->vcls); vt->backend = b; - vt->vsb = vsb_newauto(); + vt->vsb = vsb_new_auto(); XXXAN(vt->vsb); b->probe = vt; startthread = 1; diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c index f156018..c21db4f 100644 --- a/bin/varnishd/cache_ban.c +++ b/bin/varnishd/cache_ban.c @@ -75,7 +75,7 @@ BAN_New(void) ALLOC_OBJ(b, BAN_MAGIC); if (b == NULL) return (b); - b->vsb = vsb_newauto(); + b->vsb = vsb_new_auto(); if (b->vsb == NULL) { FREE_OBJ(b); return (NULL); @@ -314,7 +314,7 @@ BAN_Insert(struct ban *b) b->t0 = TIM_real(); vsb_finish(b->vsb); - AZ(vsb_overflowed(b->vsb)); + AZ(vsb_error(b->vsb)); b->test = strdup(vsb_data(b->vsb)); AN(b->test); vsb_delete(b->vsb); diff --git a/bin/varnishd/cache_esi_parse.c b/bin/varnishd/cache_esi_parse.c index dcf6ba7..ad18a86 100644 --- a/bin/varnishd/cache_esi_parse.c +++ b/bin/varnishd/cache_esi_parse.c @@ -846,7 +846,7 @@ VEP_parse(const struct sess *sp, const char *p, size_t l) vep->state = VEP_TAGERROR; } } else if (vep->state == VEP_ATTRGETVAL) { - vep->attr_vsb = vsb_newauto(); + vep->attr_vsb = vsb_new_auto(); vep->state = VEP_ATTRDELIM; } else if (vep->state == VEP_ATTRDELIM) { AZ(vep->attr_delim); @@ -1005,7 +1005,7 @@ VEP_Init(const struct sess *sp, vep_callback_t *cb) memset(vep, 0, sizeof *vep); vep->magic = VEP_MAGIC; vep->sp = sp; - vep->vsb = vsb_newauto(); + vep->vsb = vsb_new_auto(); AN(vep->vsb); if (cb != NULL) { diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index 9149df0..f079156 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -75,11 +75,11 @@ VRY_Create(const struct sess *sp, const struct http *hp) return (NULL); /* For vary matching string */ - sb = vsb_newauto(); + sb = vsb_new_auto(); AN(sb); /* For header matching strings */ - sbh = vsb_newauto(); + sbh = vsb_new_auto(); AN(sbh); if (*v == ':') { @@ -98,7 +98,7 @@ VRY_Create(const struct sess *sp, const struct http *hp) vsb_clear(sbh); vsb_printf(sbh, "%c%.*s:%c", 1 + (q - p), q - p, p, 0); vsb_finish(sbh); - AZ(vsb_overflowed(sbh)); + AZ(vsb_error(sbh)); /* Append to vary matching string */ vsb_bcat(sb, vsb_data(sbh), vsb_len(sbh)); @@ -132,7 +132,7 @@ VRY_Create(const struct sess *sp, const struct http *hp) vsb_delete(sbh); vsb_finish(sb); - AZ(vsb_overflowed(sb)); + AZ(vsb_error(sb)); return(sb); } diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c index a670a36..a11da9e 100644 --- a/bin/varnishd/mgt_child.c +++ b/bin/varnishd/mgt_child.c @@ -444,13 +444,13 @@ mgt_save_panic(void) if (child_panic) vsb_delete(child_panic); - child_panic = vsb_newauto(); + child_panic = vsb_new_auto(); XXXAN(child_panic); TIM_format(TIM_real(), time_str); vsb_printf(child_panic, "Last panic at: %s\n", time_str); vsb_cat(child_panic, vsm_head->panicstr); vsb_finish(child_panic); - AZ(vsb_overflowed(child_panic)); + AZ(vsb_error(child_panic)); } static void @@ -482,7 +482,7 @@ mgt_sigchld(const struct vev *e, int what) if (r == 0 || (r == -1 && errno == ECHILD)) return (0); assert(r == child_pid); - vsb = vsb_newauto(); + vsb = vsb_new_auto(); XXXAN(vsb); vsb_printf(vsb, "Child (%d) %s", r, status ? "died" : "ended"); if (!WIFEXITED(status) && WEXITSTATUS(status)) { @@ -500,7 +500,7 @@ mgt_sigchld(const struct vev *e, int what) } #endif vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); REPORT(LOG_INFO, "%s", vsb_data(vsb)); vsb_delete(vsb); diff --git a/bin/varnishd/mgt_cli.c b/bin/varnishd/mgt_cli.c index 0b364fd..713d097 100644 --- a/bin/varnishd/mgt_cli.c +++ b/bin/varnishd/mgt_cli.c @@ -444,13 +444,13 @@ sock_id(const char *pfx, int fd) char abuf1[TCP_ADDRBUFSIZE], abuf2[TCP_ADDRBUFSIZE]; char pbuf1[TCP_PORTBUFSIZE], pbuf2[TCP_PORTBUFSIZE]; - vsb = vsb_newauto(); + vsb = vsb_new_auto(); AN(vsb); TCP_myname(fd, abuf1, sizeof abuf1, pbuf1, sizeof pbuf1); TCP_hisname(fd, abuf2, sizeof abuf2, pbuf2, sizeof pbuf2); vsb_printf(vsb, "%s %s %s %s %s", pfx, abuf2, pbuf2, abuf1, pbuf1); vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); return (vsb); } @@ -559,7 +559,7 @@ mgt_cli_telnet(const char *T_arg) exit(2); } good = 0; - vsb = vsb_newauto(); + vsb = vsb_new_auto(); XXXAN(vsb); for (i = 0; i < n; ++i) { sock = VSS_listen(ta[i], 10); @@ -584,7 +584,7 @@ mgt_cli_telnet(const char *T_arg) exit(2); } vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); /* Save in shmem */ p = VSM_Alloc(vsb_len(vsb) + 1, "Arg", "-T", ""); AN(p); diff --git a/bin/varnishd/mgt_vcc.c b/bin/varnishd/mgt_vcc.c index 9c42393..3ba8af3 100644 --- a/bin/varnishd/mgt_vcc.c +++ b/bin/varnishd/mgt_vcc.c @@ -89,7 +89,7 @@ mgt_make_cc_cmd(const char *sf, const char *of) int pct; char *p; - sb = vsb_newauto(); + sb = vsb_new_auto(); XXXAN(sb); for (p = mgt_cc_cmd, pct = 0; *p; ++p) { if (pct) { @@ -118,7 +118,7 @@ mgt_make_cc_cmd(const char *sf, const char *of) if (pct) vsb_putc(sb, '%'); vsb_finish(sb); - AZ(vsb_overflowed(sb)); + AZ(vsb_error(sb)); return (sb); } @@ -142,14 +142,14 @@ run_vcc(void *priv) int fd, i, l; CAST_OBJ_NOTNULL(vp, priv, VCC_PRIV_MAGIC); - sb = vsb_newauto(); + sb = vsb_new_auto(); XXXAN(sb); VCC_VCL_dir(vcc, mgt_vcl_dir); VCC_VMOD_dir(vcc, mgt_vmod_dir); VCC_Err_Unref(vcc, mgt_vcc_err_unref); csrc = VCC_Compile(vcc, sb, vp->vcl); vsb_finish(sb); - AZ(vsb_overflowed(sb)); + AZ(vsb_error(sb)); if (vsb_len(sb)) printf("%s", vsb_data(sb)); vsb_delete(sb); @@ -299,11 +299,11 @@ mgt_VccCompile(struct vsb **sb, const char *b, int C_flag) { char *vf; - *sb = vsb_newauto(); + *sb = vsb_new_auto(); XXXAN(*sb); vf = mgt_run_cc(b, *sb, C_flag); vsb_finish(*sb); - AZ(vsb_overflowed(*sb)); + AZ(vsb_error(*sb)); return (vf); } diff --git a/bin/varnishd/storage_synth.c b/bin/varnishd/storage_synth.c index 4ee4337..02f58e6 100644 --- a/bin/varnishd/storage_synth.c +++ b/bin/varnishd/storage_synth.c @@ -89,7 +89,7 @@ SMS_Makesynth(struct object *obj) sto = calloc(sizeof *sto, 1); XXXAN(sto); - vsb = vsb_newauto(); + vsb = vsb_new_auto(); XXXAN(vsb); sto->priv = vsb; sto->len = 0; @@ -113,7 +113,7 @@ SMS_Finish(struct object *obj) assert(sto->stevedore == &sms_stevedore); vsb = sto->priv; vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); sto->ptr = (void*)vsb_data(vsb); sto->len = vsb_len(vsb); diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c index 68037ed..df64f18 100644 --- a/bin/varnishd/varnishd.c +++ b/bin/varnishd/varnishd.c @@ -90,7 +90,7 @@ build_vident(void) { struct utsname uts; - vident = vsb_newauto(); + vident = vsb_new_auto(); AN(vident); if (!uname(&uts)) { vsb_printf(vident, ",%s", uts.sysname); @@ -230,7 +230,7 @@ cli_check(const struct cli *cli) return; } vsb_finish(cli->sb); - AZ(vsb_overflowed(cli->sb)); + AZ(vsb_error(cli->sb)); fprintf(stderr, "Error:\n%s\n", vsb_data(cli->sb)); exit (2); } @@ -402,7 +402,7 @@ main(int argc, char * const *argv) SHA256_Test(); memset(cli, 0, sizeof cli); - cli[0].sb = vsb_newauto(); + cli[0].sb = vsb_new_auto(); XXXAN(cli[0].sb); cli[0].result = CLIS_OK; @@ -535,7 +535,7 @@ main(int argc, char * const *argv) if (cli[0].result != CLIS_OK) { fprintf(stderr, "Parameter errors:\n"); vsb_finish(cli[0].sb); - AZ(vsb_overflowed(cli[0].sb)); + AZ(vsb_error(cli[0].sb)); fprintf(stderr, "%s\n", vsb_data(cli[0].sb)); exit(1); } @@ -623,7 +623,7 @@ main(int argc, char * const *argv) mgt_SHM_Init(l_arg); vsb_finish(vident); - AZ(vsb_overflowed(vident)); + AZ(vsb_error(vident)); if (!d_flag && !F_flag) AZ(varnish_daemon(1, 0)); diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c index 0d78bf2..9659046 100644 --- a/bin/varnishlog/varnishlog.c +++ b/bin/varnishlog/varnishlog.c @@ -127,7 +127,7 @@ h_order(void *priv, enum vsl_tag tag, unsigned fd, unsigned len, return (0); } if (ob[fd] == NULL) { - ob[fd] = vsb_newauto(); + ob[fd] = vsb_new_auto(); assert(ob[fd] != NULL); } if (tag == match_tag && diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c index 1cc16cf..e374988 100644 --- a/bin/varnishtest/vtc.c +++ b/bin/varnishtest/vtc.c @@ -164,7 +164,7 @@ macro_expand(struct vtclog *vl, const char *text) const char *p, *q; char *m; - vsb = vsb_newauto(); + vsb = vsb_new_auto(); AN(vsb); while (*text != '\0') { p = strstr(text, "${"); diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c index 66c0308..95d41e8 100644 --- a/bin/varnishtest/vtc_http.c +++ b/bin/varnishtest/vtc_http.c @@ -142,7 +142,7 @@ http_write(const struct http *hp, int lvl, const char *pfx) int l; vsb_finish(hp->vsb); - AZ(vsb_overflowed(hp->vsb)); + AZ(vsb_error(hp->vsb)); vtc_dump(hp->vl, lvl, pfx, vsb_data(hp->vsb), vsb_len(hp->vsb)); l = write(hp->fd, vsb_data(hp->vsb), vsb_len(hp->vsb)); if (l != vsb_len(hp->vsb)) @@ -1073,7 +1073,7 @@ http_process(struct vtclog *vl, const char *spec, int sock, int sfd) hp->fd = sock; hp->timeout = 5000; hp->nrxbuf = 640*1024; - hp->vsb = vsb_newauto(); + hp->vsb = vsb_new_auto(); hp->rxbuf = malloc(hp->nrxbuf); /* XXX */ hp->sfd = sfd; hp->vl = vl; diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c index 08e683e..bee6fe2 100644 --- a/bin/varnishtest/vtc_log.c +++ b/bin/varnishtest/vtc_log.c @@ -82,7 +82,7 @@ vtc_logopen(const char *id) ALLOC_OBJ(vl, VTCLOG_MAGIC); AN(vl); vl->id = id; - vl->vsb = vsb_newauto(); + vl->vsb = vsb_new_auto(); AZ(pthread_mutex_init(&vl->mtx, NULL)); AZ(pthread_setspecific(log_key, vl)); return (vl); @@ -141,7 +141,7 @@ vtc_log(struct vtclog *vl, unsigned lvl, const char *fmt, ...) va_end(ap); vsb_putc(vl->vsb, '\n'); vsb_finish(vl->vsb); - AZ(vsb_overflowed(vl->vsb)); + AZ(vsb_error(vl->vsb)); vtc_log_emit(vl, lvl); @@ -212,7 +212,7 @@ vtc_dump(struct vtclog *vl, unsigned lvl, const char *pfx, const char *str, int if (!nl) vsb_printf(vl->vsb, "\n"); vsb_finish(vl->vsb); - AZ(vsb_overflowed(vl->vsb)); + AZ(vsb_error(vl->vsb)); vtc_log_emit(vl, lvl); @@ -267,7 +267,7 @@ vtc_hexdump(struct vtclog *vl, unsigned lvl, const char *pfx, const unsigned cha if (!nl) vsb_printf(vl->vsb, "\n"); vsb_finish(vl->vsb); - AZ(vsb_overflowed(vl->vsb)); + AZ(vsb_error(vl->vsb)); vtc_log_emit(vl, lvl); diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c index 30ab828..c4a9477 100644 --- a/bin/varnishtest/vtc_varnish.c +++ b/bin/varnishtest/vtc_varnish.c @@ -154,9 +154,9 @@ varnish_new(const char *name) if (*v->name != 'v') vtc_log(v->vl, 0, "Varnish name must start with 'v'"); - v->args = vsb_newauto(); + v->args = vsb_new_auto(); - v->storage = vsb_newauto(); + v->storage = vsb_new_auto(); vsb_printf(v->storage, "-sfile,%s,10M", v->workdir); vsb_finish(v->storage); @@ -251,9 +251,9 @@ varnish_launch(struct varnish *v) TCP_myname(v->cli_fd, abuf, sizeof abuf, pbuf, sizeof pbuf); vsb_finish(v->args); - AZ(vsb_overflowed(v->args)); + AZ(vsb_error(v->args)); vtc_log(v->vl, 2, "Launch"); - vsb = vsb_newauto(); + vsb = vsb_new_auto(); AN(vsb); vsb_printf(vsb, "cd ${topbuild}/bin/varnishd &&"); vsb_printf(vsb, " ./varnishd -d -d -n %s", v->workdir); @@ -267,7 +267,7 @@ varnish_launch(struct varnish *v) vsb_printf(vsb, " %s", vsb_data(v->storage)); vsb_printf(vsb, " %s", vsb_data(v->args)); vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); vtc_log(v->vl, 3, "CMD: %s", vsb_data(vsb)); vsb1 = macro_expand(v->vl, vsb_data(vsb)); AN(vsb1); @@ -509,13 +509,13 @@ varnish_vcl(struct varnish *v, const char *vcl, enum cli_status_e expect) varnish_launch(v); if (vtc_error) return; - vsb = vsb_newauto(); + vsb = vsb_new_auto(); AN(vsb); vsb_printf(vsb, "vcl.inline vcl%d << %s\n%s\n%s\n", ++v->vcl_nbr, NONSENSE, vcl, NONSENSE); vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); u = varnish_ask_cli(v, vsb_data(vsb), NULL); if (u != expect) { @@ -529,7 +529,7 @@ varnish_vcl(struct varnish *v, const char *vcl, enum cli_status_e expect) vsb_clear(vsb); vsb_printf(vsb, "vcl.use vcl%d", v->vcl_nbr); vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); u = varnish_ask_cli(v, vsb_data(vsb), NULL); assert(u == CLIS_OK); } else { @@ -552,20 +552,20 @@ varnish_vclbackend(struct varnish *v, const char *vcl) varnish_launch(v); if (vtc_error) return; - vsb = vsb_newauto(); + vsb = vsb_new_auto(); AN(vsb); - vsb2 = vsb_newauto(); + vsb2 = vsb_new_auto(); AN(vsb2); cmd_server_genvcl(vsb2); vsb_finish(vsb2); - AZ(vsb_overflowed(vsb2)); + AZ(vsb_error(vsb2)); vsb_printf(vsb, "vcl.inline vcl%d << %s\n%s\n%s\n%s\n", ++v->vcl_nbr, NONSENSE, vsb_data(vsb2), vcl, NONSENSE); vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); u = varnish_ask_cli(v, vsb_data(vsb), NULL); if (u != CLIS_OK) { @@ -577,7 +577,7 @@ varnish_vclbackend(struct varnish *v, const char *vcl) vsb_clear(vsb); vsb_printf(vsb, "vcl.use vcl%d", v->vcl_nbr); vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); u = varnish_ask_cli(v, vsb_data(vsb), NULL); assert(u == CLIS_OK); vsb_delete(vsb); diff --git a/include/vsb.h b/include/vsb.h index 63fd984..db65eae 100644 --- a/include/vsb.h +++ b/include/vsb.h @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Sm?rgrav + * Copyright (c) 2000-2008 Poul-Henning Kamp + * Copyright (c) 2000-2008 Dag-Erling Co?dan Sm?rgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -12,19 +13,19 @@ * 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 ``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 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. + * 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. * - * $Id$ - * $FreeBSD: src/sys/sys/vsb.h,v 1.14 2004/07/09 11:35:30 des Exp $ + * $FreeBSD: head/sys/sys/sbuf.h 212425 2010-09-10 16:42:16Z mdf $ */ #ifndef VSB_H_INCLUDED @@ -55,7 +56,8 @@ extern "C" { * API functions */ struct vsb *vsb_new(struct vsb *, char *, int, int); -#define vsb_newauto() vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND) +#define vsb_new_auto() \ + vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND) void vsb_clear(struct vsb *); int vsb_setpos(struct vsb *, int); int vsb_bcat(struct vsb *, const void *, size_t); @@ -63,15 +65,15 @@ int vsb_bcpy(struct vsb *, const void *, size_t); int vsb_cat(struct vsb *, const char *); int vsb_cpy(struct vsb *, const char *); int vsb_printf(struct vsb *, const char *, ...) - /* __printflike(2, 3) */; + /* __printflike(2, 3) */; #ifdef va_start int vsb_vprintf(struct vsb *, const char *, va_list) - /* __printflike(2, 0) */; + /* __printflike(2, 0) */; #endif int vsb_putc(struct vsb *, int); int vsb_trim(struct vsb *); -int vsb_overflowed(const struct vsb *); -void vsb_finish(struct vsb *); +int vsb_error(const struct vsb *); +int vsb_finish(struct vsb *); char *vsb_data(struct vsb *); int vsb_len(struct vsb *); int vsb_done(const struct vsb *); diff --git a/lib/libvarnish/cli_serve.c b/lib/libvarnish/cli_serve.c index 347c396..f727b0b 100644 --- a/lib/libvarnish/cli_serve.c +++ b/lib/libvarnish/cli_serve.c @@ -290,7 +290,7 @@ cls_vlu2(void *priv, char * const *av) } while (0); vsb_finish(cli->sb); - AZ(vsb_overflowed(cli->sb)); + AZ(vsb_error(cli->sb)); if (cs->after != NULL) cs->after(cli); @@ -347,7 +347,7 @@ cls_vlu(void *priv, const char *p) } cfd->argv = av; cfd->last_idx = i - 2; - cfd->last_arg = vsb_newauto(); + cfd->last_arg = vsb_new_auto(); AN(cfd->last_arg); return (0); } else { @@ -360,7 +360,7 @@ cls_vlu(void *priv, const char *p) return (0); } vsb_finish(cfd->last_arg); - AZ(vsb_overflowed(cfd->last_arg)); + AZ(vsb_error(cfd->last_arg)); free(cfd->argv[cfd->last_idx]); cfd->argv[cfd->last_idx] = NULL; free(cfd->argv[cfd->last_idx + 1]); @@ -410,7 +410,7 @@ CLS_AddFd(struct cls *cs, int fdi, int fdo, cls_cb_f *closefunc, void *priv) cfd->cli = &cfd->clis; cfd->cli->magic = CLI_MAGIC; cfd->cli->vlu = VLU_New(cfd, cls_vlu, cs->maxlen); - cfd->cli->sb = vsb_newauto(); + cfd->cli->sb = vsb_new_auto(); cfd->closefunc = closefunc; cfd->priv = priv; AN(cfd->cli->sb); diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c index 1983824..28333eb 100644 --- a/lib/libvarnish/vsb.c +++ b/lib/libvarnish/vsb.c @@ -409,7 +409,7 @@ vsb_trim(struct vsb *s) * Check if an vsb overflowed */ int -vsb_overflowed(const struct vsb *s) +vsb_error(const struct vsb *s) { return (VSB_HASOVERFLOWED(s)); @@ -418,7 +418,7 @@ vsb_overflowed(const struct vsb *s) /* * Finish off an vsb. */ -void +int vsb_finish(struct vsb *s) { @@ -428,6 +428,7 @@ vsb_finish(struct vsb *s) s->s_buf[s->s_len] = '\0'; VSB_CLEARFLAG(s, VSB_OVERFLOWED); VSB_SETFLAG(s, VSB_FINISHED); + return (0); } /* diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c index 889b672..0fe8608 100644 --- a/lib/libvcl/vcc_backend.c +++ b/lib/libvcl/vcc_backend.c @@ -464,7 +464,7 @@ vcc_ParseHostDef(struct vcc *tl, int serial, const char *vgcname) SkipToken(tl, '{'); - vsb = vsb_newauto(); + vsb = vsb_new_auto(); AN(vsb); tl->fb = vsb; @@ -603,7 +603,7 @@ vcc_ParseHostDef(struct vcc *tl, int serial, const char *vgcname) tl->fb = NULL; vsb_finish(vsb); - AZ(vsb_overflowed(vsb)); + AZ(vsb_error(vsb)); Fh(tl, 0, "%s", vsb_data(vsb)); vsb_delete(vsb); diff --git a/lib/libvcl/vcc_compile.c b/lib/libvcl/vcc_compile.c index 1ac6069..df1d0e4 100644 --- a/lib/libvcl/vcc_compile.c +++ b/lib/libvcl/vcc_compile.c @@ -315,7 +315,7 @@ EmitInitFunc(const struct vcc *tl) Fc(tl, 0, "\nstatic void\nVGC_Init(struct cli *cli)\n{\n\n"); vsb_finish(tl->fi); - AZ(vsb_overflowed(tl->fi)); + AZ(vsb_error(tl->fi)); vsb_cat(tl->fc, vsb_data(tl->fi)); Fc(tl, 0, "}\n"); } @@ -335,7 +335,7 @@ EmitFiniFunc(const struct vcc *tl) Fc(tl, 0, "\tvmod_priv_fini(&vmod_priv_%u);\n", u); vsb_finish(tl->ff); - AZ(vsb_overflowed(tl->ff)); + AZ(vsb_error(tl->ff)); vsb_cat(tl->fc, vsb_data(tl->ff)); Fc(tl, 0, "}\n"); } @@ -512,24 +512,24 @@ vcc_NewVcc(const struct vcc *tl0) tl->ndirector = 1; /* General C code */ - tl->fc = vsb_newauto(); + tl->fc = vsb_new_auto(); assert(tl->fc != NULL); /* Forward decls (.h like) */ - tl->fh = vsb_newauto(); + tl->fh = vsb_new_auto(); assert(tl->fh != NULL); /* Init C code */ - tl->fi = vsb_newauto(); + tl->fi = vsb_new_auto(); assert(tl->fi != NULL); /* Finish C code */ - tl->ff = vsb_newauto(); + tl->ff = vsb_new_auto(); assert(tl->ff != NULL); /* body code of methods */ for (i = 0; i < VCL_MET_MAX; i++) { - tl->fm[i] = vsb_newauto(); + tl->fm[i] = vsb_new_auto(); assert(tl->fm[i] != NULL); } return (tl); @@ -679,7 +679,7 @@ vcc_CompileSource(const struct vcc *tl0, struct vsb *sb, struct source *sp) Fc(tl, 1, "VGC_function_%s (struct sess *sp)\n", method_tab[i].name); vsb_finish(tl->fm[i]); - AZ(vsb_overflowed(tl->fm[i])); + AZ(vsb_error(tl->fm[i])); Fc(tl, 1, "{\n"); Fc(tl, 1, "%s", vsb_data(tl->fm[i])); Fc(tl, 1, "}\n"); @@ -695,10 +695,10 @@ vcc_CompileSource(const struct vcc *tl0, struct vsb *sb, struct source *sp) /* Combine it all in the fh vsb */ vsb_finish(tl->fc); - AZ(vsb_overflowed(tl->fc)); + AZ(vsb_error(tl->fc)); vsb_cat(tl->fh, vsb_data(tl->fc)); vsb_finish(tl->fh); - AZ(vsb_overflowed(tl->fh)); + AZ(vsb_error(tl->fh)); of = strdup(vsb_data(tl->fh)); AN(of); diff --git a/lib/libvcl/vcc_dir_dns.c b/lib/libvcl/vcc_dir_dns.c index d5a4c34..5d2c761 100644 --- a/lib/libvcl/vcc_dir_dns.c +++ b/lib/libvcl/vcc_dir_dns.c @@ -87,7 +87,7 @@ print_backend(struct vcc *tl, bprintf(strip, "%u.%u.%u.%u", ip[3], ip[2], ip[1], ip[0]); tmptok.dec = strip; bprintf(vgcname, "%.*s_%d", PF(tl->t_dir), serial); - vsb = vsb_newauto(); + vsb = vsb_new_auto(); AN(vsb); tl->fb = vsb; Fc(tl, 0, "\t{ .host = VGC_backend_%s },\n",vgcname); diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c index 9261963..1c14503 100644 --- a/lib/libvcl/vcc_expr.c +++ b/lib/libvcl/vcc_expr.c @@ -253,7 +253,7 @@ vcc_new_expr(void) /* XXX: use TlAlloc() ? */ ALLOC_OBJ(e, EXPR_MAGIC); AN(e); - e->vsb = vsb_newauto(); + e->vsb = vsb_new_auto(); e->fmt = VOID; return (e); } @@ -270,7 +270,7 @@ vcc_mk_expr(enum var_type fmt, const char *str, ...) vsb_vprintf(e->vsb, str, ap); va_end(ap); vsb_finish(e->vsb); - AZ(vsb_overflowed(e->vsb)); + AZ(vsb_error(e->vsb)); return (e); } @@ -346,7 +346,7 @@ vcc_expr_edit(enum var_type fmt, const char *p, struct expr *e1, p++; } vsb_finish(e->vsb); - AZ(vsb_overflowed(e->vsb)); + AZ(vsb_error(e->vsb)); if (e1 != NULL) e->t1 = e1->t1; else if (e2 != NULL) @@ -697,7 +697,7 @@ vcc_expr4(struct vcc *tl, struct expr **e, enum var_type fmt) e1->constant = 1; vcc_NextToken(tl); vsb_finish(e1->vsb); - AZ(vsb_overflowed(e1->vsb)); + AZ(vsb_error(e1->vsb)); *e = e1; break; case CNUM: From phk at varnish-cache.org Mon Apr 4 14:05:25 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 16:05:25 +0200 Subject: [master] 2811421 Move much closer to FreeBSD current sbuf implementation. Message-ID: commit 2811421b19c5fbbdf8f7c3b4fa9cd1263962df6e Author: Poul-Henning Kamp Date: Mon Apr 4 13:52:25 2011 +0000 Move much closer to FreeBSD current sbuf implementation. diff --git a/include/vsb.h b/include/vsb.h index db65eae..0ab0ee1 100644 --- a/include/vsb.h +++ b/include/vsb.h @@ -37,14 +37,14 @@ struct vsb { unsigned s_magic; char *s_buf; /* storage buffer */ - size_t s_size; /* size of storage buffer */ - size_t s_len; /* current length of string */ + ssize_t s_size; /* size of storage buffer */ + ssize_t s_len; /* current length of string */ + int s_error; /* current error code */ #define VSB_FIXEDLEN 0x00000000 /* fixed length buffer (default) */ #define VSB_AUTOEXTEND 0x00000001 /* automatically extend buffer */ #define VSB_USRFLAGMSK 0x0000ffff /* mask of flags the user may specify */ #define VSB_DYNAMIC 0x00010000 /* s_buf must be freed */ #define VSB_FINISHED 0x00020000 /* set by vsb_finish() */ -#define VSB_OVERFLOWED 0x00040000 /* vsb overflowed */ #define VSB_DYNSTRUCT 0x00080000 /* vsb must be freed */ int s_flags; /* flags */ }; diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c index 28333eb..bfe9735 100644 --- a/lib/libvarnish/vsb.c +++ b/lib/libvarnish/vsb.c @@ -46,6 +46,9 @@ SVNID("$Id$") #define SBFREE(buf) free(buf) #define min(x,y) (x < y ? x : y) +// #define bzero(x,y) memset(x,0,y) +#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ + #define VSB_MAGIC 0x4a82dd8a /* * Predicates @@ -53,7 +56,6 @@ SVNID("$Id$") #define VSB_ISDYNAMIC(s) ((s)->s_flags & VSB_DYNAMIC) #define VSB_ISDYNSTRUCT(s) ((s)->s_flags & VSB_DYNSTRUCT) #define VSB_ISFINISHED(s) ((s)->s_flags & VSB_FINISHED) -#define VSB_HASOVERFLOWED(s) ((s)->s_flags & VSB_OVERFLOWED) #define VSB_HASROOM(s) ((s)->s_len < (s)->s_size - 1) #define VSB_FREESPACE(s) ((s)->s_size - ((s)->s_len + 1)) #define VSB_CANEXTEND(s) ((s)->s_flags & VSB_AUTOEXTEND) @@ -111,13 +113,14 @@ vsb_extendsize(int size) { int newsize; - newsize = VSB_MINEXTENDSIZE; - while (newsize < size) { - if (newsize < (int)VSB_MAXEXTENDSIZE) + if (size < (int)VSB_MAXEXTENDSIZE) { + newsize = VSB_MINEXTENDSIZE; + while (newsize < size) newsize *= 2; - else - newsize += VSB_MAXEXTENDINCR; + } else { + newsize = roundup2(size, VSB_MAXEXTENDINCR); } + KASSERT(newsize >= size, ("%s: %d < %d\n", __func__, newsize, size)); return (newsize); } @@ -166,17 +169,21 @@ vsb_new(struct vsb *s, char *buf, int length, int flags) s = SBMALLOC(sizeof(*s)); if (s == NULL) return (NULL); - flags |= VSB_DYNSTRUCT; + bzero(s, sizeof(*s)); + s->s_flags = flags; + VSB_SETFLAG(s, VSB_DYNSTRUCT); + } else { + bzero(s, sizeof(*s)); + s->s_flags = flags; } - memset(s, 0, sizeof *s); - s->s_flags = flags; + s->s_magic = VSB_MAGIC; s->s_size = length; - if (buf) { + if (buf != NULL) { s->s_buf = buf; return (s); } - if (flags & VSB_AUTOEXTEND) + if ((flags & VSB_AUTOEXTEND) != 0) s->s_size = vsb_extendsize(s->s_size); s->s_buf = SBMALLOC(s->s_size); if (s->s_buf == NULL) { @@ -199,7 +206,7 @@ vsb_clear(struct vsb *s) /* don't care if it's finished or not */ VSB_CLEARFLAG(s, VSB_FINISHED); - VSB_CLEARFLAG(s, VSB_OVERFLOWED); + s->s_error = 0; s->s_len = 0; } @@ -226,26 +233,47 @@ vsb_setpos(struct vsb *s, int pos) } /* + * Append a byte to an vsb. This is the core function for appending + * to an vsb and is the main place that deals with extending the + * buffer and marking overflow. + */ +static void +vsb_put_byte(int c, struct vsb *s) +{ + + assert_vsb_integrity(s); + assert_vsb_state(s, 0); + + if (s->s_error != 0) + return; + if (VSB_FREESPACE(s) <= 0) { + if (vsb_extend(s, 1) < 0) + s->s_error = ENOMEM; + if (s->s_error != 0) + return; + } + s->s_buf[s->s_len++] = c; +} + + +/* * Append a byte string to an vsb. */ int vsb_bcat(struct vsb *s, const void *buf, size_t len) { const char *str = buf; + const char *end = str + len; assert_vsb_integrity(s); assert_vsb_state(s, 0); - if (VSB_HASOVERFLOWED(s)) - return (-1); - for (; len; len--) { - if (!VSB_HASROOM(s) && vsb_extend(s, len) < 0) - break; - s->s_buf[s->s_len++] = *str++; - } - if (len) { - VSB_SETFLAG(s, VSB_OVERFLOWED); + if (s->s_error != 0) return (-1); + for (; str < end; str++) { + vsb_put_byte(*str, s); + if (s->s_error != 0) + return (-1); } return (0); } @@ -274,17 +302,13 @@ vsb_cat(struct vsb *s, const char *str) assert_vsb_integrity(s); assert_vsb_state(s, 0); - if (VSB_HASOVERFLOWED(s)) + if (s->s_error != 0) return (-1); - while (*str) { - if (!VSB_HASROOM(s) && vsb_extend(s, strlen(str)) < 0) - break; - s->s_buf[s->s_len++] = *str++; - } - if (*str) { - VSB_SETFLAG(s, VSB_OVERFLOWED); - return (-1); + while (*str != '\0') { + vsb_put_byte(*str++, s); + if (s->s_error != 0) + return (-1); } return (0); } @@ -318,7 +342,7 @@ vsb_vprintf(struct vsb *s, const char *fmt, va_list ap) KASSERT(fmt != NULL, ("%s called with a NULL format string", __func__)); - if (VSB_HASOVERFLOWED(s)) + if (s->s_error != 0) return (-1); do { @@ -336,16 +360,18 @@ vsb_vprintf(struct vsb *s, const char *fmt, va_list ap) * terminating nul. * * vsnprintf() returns the amount that would have been copied, - * given sufficient space, hence the min() calculation below. + * given sufficient space, so don't over-increment s_len. */ - s->s_len += min(len, VSB_FREESPACE(s)); + if (VSB_FREESPACE(s) < len) + len = VSB_FREESPACE(s); + s->s_len += len; if (!VSB_HASROOM(s) && !VSB_CANEXTEND(s)) - VSB_SETFLAG(s, VSB_OVERFLOWED); + s->s_error = ENOMEM; KASSERT(s->s_len < s->s_size, ("wrote past end of vsb (%d >= %d)", s->s_len, s->s_size)); - if (VSB_HASOVERFLOWED(s)) + if (s->s_error != 0) return (-1); return (0); } @@ -362,7 +388,7 @@ vsb_printf(struct vsb *s, const char *fmt, ...) va_start(ap, fmt); result = vsb_vprintf(s, fmt, ap); va_end(ap); - return(result); + return (result); } /* @@ -372,17 +398,9 @@ int vsb_putc(struct vsb *s, int c) { - assert_vsb_integrity(s); - assert_vsb_state(s, 0); - - if (VSB_HASOVERFLOWED(s)) + vsb_put_byte(c, s); + if (s->s_error != 0) return (-1); - if (!VSB_HASROOM(s) && vsb_extend(s, 1) < 0) { - VSB_SETFLAG(s, VSB_OVERFLOWED); - return (-1); - } - if (c != '\0') - s->s_buf[s->s_len++] = (char)c; return (0); } @@ -396,23 +414,23 @@ vsb_trim(struct vsb *s) assert_vsb_integrity(s); assert_vsb_state(s, 0); - if (VSB_HASOVERFLOWED(s)) + if (s->s_error != 0) return (-1); - while (s->s_len && isspace(s->s_buf[s->s_len-1])) + while (s->s_len > 0 && isspace(s->s_buf[s->s_len-1])) --s->s_len; return (0); } /* - * Check if an vsb overflowed + * Check if an vsb has an error. */ int vsb_error(const struct vsb *s) { - return (VSB_HASOVERFLOWED(s)); + return (s->s_error); } /* @@ -426,8 +444,10 @@ vsb_finish(struct vsb *s) assert_vsb_state(s, 0); s->s_buf[s->s_len] = '\0'; - VSB_CLEARFLAG(s, VSB_OVERFLOWED); VSB_SETFLAG(s, VSB_FINISHED); + errno = s->s_error; + if (s->s_error) + return (-1); return (0); } @@ -454,7 +474,7 @@ vsb_len(struct vsb *s) assert_vsb_integrity(s); /* don't care if it's finished or not */ - if (VSB_HASOVERFLOWED(s)) + if (s->s_error != 0) return (-1); return (s->s_len); } @@ -473,7 +493,7 @@ vsb_delete(struct vsb *s) if (VSB_ISDYNAMIC(s)) SBFREE(s->s_buf); isdyn = VSB_ISDYNSTRUCT(s); - memset(s, 0, sizeof *s); + bzero(s, sizeof(*s)); if (isdyn) SBFREE(s); } From phk at varnish-cache.org Mon Apr 4 14:05:26 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 16:05:26 +0200 Subject: [master] e85eec4 With the new sbuf version, vsb_finish() reports any errors, so we can save a lot of asserts and calls. Message-ID: commit e85eec42dfa4b5913fa4d4876b748896ce2a8bd2 Author: Poul-Henning Kamp Date: Mon Apr 4 14:04:45 2011 +0000 With the new sbuf version, vsb_finish() reports any errors, so we can save a lot of asserts and calls. diff --git a/bin/varnishd/cache_backend_poll.c b/bin/varnishd/cache_backend_poll.c index 9cf241c..abd5ccc 100644 --- a/bin/varnishd/cache_backend_poll.c +++ b/bin/varnishd/cache_backend_poll.c @@ -322,8 +322,7 @@ vbp_build_req(struct vsb *vsb, const struct vbp_vcl *vcl) vsb_printf(vsb, "Connection: close\r\n"); vsb_printf(vsb, "\r\n"); } - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); } /*-------------------------------------------------------------------- diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c index c21db4f..0d27bbc 100644 --- a/bin/varnishd/cache_ban.c +++ b/bin/varnishd/cache_ban.c @@ -313,8 +313,7 @@ BAN_Insert(struct ban *b) CHECK_OBJ_NOTNULL(b, BAN_MAGIC); b->t0 = TIM_real(); - vsb_finish(b->vsb); - AZ(vsb_error(b->vsb)); + AZ(vsb_finish(b->vsb)); b->test = strdup(vsb_data(b->vsb)); AN(b->test); vsb_delete(b->vsb); diff --git a/bin/varnishd/cache_esi_parse.c b/bin/varnishd/cache_esi_parse.c index ad18a86..d8d4f88 100644 --- a/bin/varnishd/cache_esi_parse.c +++ b/bin/varnishd/cache_esi_parse.c @@ -875,7 +875,7 @@ VEP_parse(const struct sess *sp, const char *p, size_t l) vep->state = VEP_TAGERROR; vep->attr_delim = 0; if (vep->attr_vsb != NULL) { - vsb_finish(vep->attr_vsb); + AZ(vsb_finish(vep->attr_vsb)); vsb_delete(vep->attr_vsb); vep->attr_vsb = NULL; } @@ -884,7 +884,7 @@ VEP_parse(const struct sess *sp, const char *p, size_t l) p++; vep->state = VEP_INTAG; if (vep->attr_vsb != NULL) { - vsb_finish(vep->attr_vsb); + AZ(vsb_finish(vep->attr_vsb)); AN(vep->dostuff); vep->dostuff(vep, DO_ATTR); vep->attr_vsb = NULL; @@ -1056,7 +1056,7 @@ VEP_Finish(const struct sess *sp) sp->wrk->vep = NULL; - vsb_finish(vep->vsb); + AZ(vsb_finish(vep->vsb)); l = vsb_len(vep->vsb); if (vep->state != VEP_NOTXML && l > 0) return (vep->vsb); diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index f079156..69ff52f 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -97,8 +97,7 @@ VRY_Create(const struct sess *sp, const struct http *hp) /* Build a header-matching string out of it */ vsb_clear(sbh); vsb_printf(sbh, "%c%.*s:%c", 1 + (q - p), q - p, p, 0); - vsb_finish(sbh); - AZ(vsb_error(sbh)); + AZ(vsb_finish(sbh)); /* Append to vary matching string */ vsb_bcat(sb, vsb_data(sbh), vsb_len(sbh)); @@ -131,8 +130,7 @@ VRY_Create(const struct sess *sp, const struct http *hp) vsb_printf(sb, "%c", 0); vsb_delete(sbh); - vsb_finish(sb); - AZ(vsb_error(sb)); + AZ(vsb_finish(sb)); return(sb); } diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c index a11da9e..df8c77f 100644 --- a/bin/varnishd/mgt_child.c +++ b/bin/varnishd/mgt_child.c @@ -449,8 +449,7 @@ mgt_save_panic(void) TIM_format(TIM_real(), time_str); vsb_printf(child_panic, "Last panic at: %s\n", time_str); vsb_cat(child_panic, vsm_head->panicstr); - vsb_finish(child_panic); - AZ(vsb_error(child_panic)); + AZ(vsb_finish(child_panic)); } static void @@ -499,8 +498,7 @@ mgt_sigchld(const struct vev *e, int what) exit_status |= 0x80; } #endif - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); REPORT(LOG_INFO, "%s", vsb_data(vsb)); vsb_delete(vsb); diff --git a/bin/varnishd/mgt_cli.c b/bin/varnishd/mgt_cli.c index 713d097..7618e97 100644 --- a/bin/varnishd/mgt_cli.c +++ b/bin/varnishd/mgt_cli.c @@ -420,7 +420,7 @@ mgt_cli_setup(int fdi, int fdo, int verbose, const char *ident, mgt_cli_close_f cli->auth = MCF_AUTH; mcf_banner(cli, NULL, NULL); } - vsb_finish(cli->sb); + AZ(vsb_finish(cli->sb)); (void)cli_writeres(fdo, cli); @@ -449,8 +449,7 @@ sock_id(const char *pfx, int fd) TCP_myname(fd, abuf1, sizeof abuf1, pbuf1, sizeof pbuf1); TCP_hisname(fd, abuf2, sizeof abuf2, pbuf2, sizeof pbuf2); vsb_printf(vsb, "%s %s %s %s %s", pfx, abuf2, pbuf2, abuf1, pbuf1); - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); return (vsb); } @@ -583,8 +582,7 @@ mgt_cli_telnet(const char *T_arg) REPORT(LOG_ERR, "-T %s could not be listened on.", T_arg); exit(2); } - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); /* Save in shmem */ p = VSM_Alloc(vsb_len(vsb) + 1, "Arg", "-T", ""); AN(p); diff --git a/bin/varnishd/mgt_vcc.c b/bin/varnishd/mgt_vcc.c index 3ba8af3..17b49c6 100644 --- a/bin/varnishd/mgt_vcc.c +++ b/bin/varnishd/mgt_vcc.c @@ -117,8 +117,7 @@ mgt_make_cc_cmd(const char *sf, const char *of) } if (pct) vsb_putc(sb, '%'); - vsb_finish(sb); - AZ(vsb_error(sb)); + AZ(vsb_finish(sb)); return (sb); } @@ -148,8 +147,7 @@ run_vcc(void *priv) VCC_VMOD_dir(vcc, mgt_vmod_dir); VCC_Err_Unref(vcc, mgt_vcc_err_unref); csrc = VCC_Compile(vcc, sb, vp->vcl); - vsb_finish(sb); - AZ(vsb_error(sb)); + AZ(vsb_finish(sb)); if (vsb_len(sb)) printf("%s", vsb_data(sb)); vsb_delete(sb); @@ -302,8 +300,7 @@ mgt_VccCompile(struct vsb **sb, const char *b, int C_flag) *sb = vsb_new_auto(); XXXAN(*sb); vf = mgt_run_cc(b, *sb, C_flag); - vsb_finish(*sb); - AZ(vsb_error(*sb)); + AZ(vsb_finish(*sb)); return (vf); } diff --git a/bin/varnishd/storage_synth.c b/bin/varnishd/storage_synth.c index 02f58e6..74f22d2 100644 --- a/bin/varnishd/storage_synth.c +++ b/bin/varnishd/storage_synth.c @@ -112,8 +112,7 @@ SMS_Finish(struct object *obj) sto = VTAILQ_FIRST(&obj->store); assert(sto->stevedore == &sms_stevedore); vsb = sto->priv; - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); sto->ptr = (void*)vsb_data(vsb); sto->len = vsb_len(vsb); diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c index df64f18..3597867 100644 --- a/bin/varnishd/varnishd.c +++ b/bin/varnishd/varnishd.c @@ -229,8 +229,7 @@ cli_check(const struct cli *cli) vsb_clear(cli->sb); return; } - vsb_finish(cli->sb); - AZ(vsb_error(cli->sb)); + AZ(vsb_finish(cli->sb)); fprintf(stderr, "Error:\n%s\n", vsb_data(cli->sb)); exit (2); } @@ -534,8 +533,7 @@ main(int argc, char * const *argv) /* XXX: we can have multiple CLI actions above, is this enough ? */ if (cli[0].result != CLIS_OK) { fprintf(stderr, "Parameter errors:\n"); - vsb_finish(cli[0].sb); - AZ(vsb_error(cli[0].sb)); + AZ(vsb_finish(cli[0].sb)); fprintf(stderr, "%s\n", vsb_data(cli[0].sb)); exit(1); } @@ -622,8 +620,7 @@ main(int argc, char * const *argv) mgt_SHM_Init(l_arg); - vsb_finish(vident); - AZ(vsb_error(vident)); + AZ(vsb_finish(vident)); if (!d_flag && !F_flag) AZ(varnish_daemon(1, 0)); diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c index 9659046..80771aa 100644 --- a/bin/varnishlog/varnishlog.c +++ b/bin/varnishlog/varnishlog.c @@ -85,7 +85,7 @@ static void h_order_finish(int fd) { - vsb_finish(ob[fd]); + AZ(vsb_finish(ob[fd])); if (vsb_len(ob[fd]) > 1 && (match_tag == -1 || flg[fd] & F_MATCH)) printf("%s\n", vsb_data(ob[fd])); @@ -101,7 +101,7 @@ clean_order(void) for (u = 0; u < 65536; u++) { if (ob[u] == NULL) continue; - vsb_finish(ob[u]); + AZ(vsb_finish(ob[u])); if (vsb_len(ob[u]) > 1 && (match_tag == -1 || flg[u] & F_MATCH)) printf("%s\n", vsb_data(ob[u])); diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c index e374988..0a33ada 100644 --- a/bin/varnishtest/vtc.c +++ b/bin/varnishtest/vtc.c @@ -191,7 +191,7 @@ macro_expand(struct vtclog *vl, const char *text) vsb_printf(vsb, "%s", m); text = q + 1; } - vsb_finish(vsb); + AZ(vsb_finish(vsb)); return (vsb); } diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c index 95d41e8..486b656 100644 --- a/bin/varnishtest/vtc_http.c +++ b/bin/varnishtest/vtc_http.c @@ -141,8 +141,7 @@ http_write(const struct http *hp, int lvl, const char *pfx) { int l; - vsb_finish(hp->vsb); - AZ(vsb_error(hp->vsb)); + AZ(vsb_finish(hp->vsb)); vtc_dump(hp->vl, lvl, pfx, vsb_data(hp->vsb), vsb_len(hp->vsb)); l = write(hp->fd, vsb_data(hp->vsb), vsb_len(hp->vsb)); if (l != vsb_len(hp->vsb)) diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c index bee6fe2..7e9c84c 100644 --- a/bin/varnishtest/vtc_log.c +++ b/bin/varnishtest/vtc_log.c @@ -140,8 +140,7 @@ vtc_log(struct vtclog *vl, unsigned lvl, const char *fmt, ...) (void)vsb_vprintf(vl->vsb, fmt, ap); va_end(ap); vsb_putc(vl->vsb, '\n'); - vsb_finish(vl->vsb); - AZ(vsb_error(vl->vsb)); + AZ(vsb_finish(vl->vsb)); vtc_log_emit(vl, lvl); @@ -211,8 +210,7 @@ vtc_dump(struct vtclog *vl, unsigned lvl, const char *pfx, const char *str, int } if (!nl) vsb_printf(vl->vsb, "\n"); - vsb_finish(vl->vsb); - AZ(vsb_error(vl->vsb)); + AZ(vsb_finish(vl->vsb)); vtc_log_emit(vl, lvl); @@ -266,8 +264,7 @@ vtc_hexdump(struct vtclog *vl, unsigned lvl, const char *pfx, const unsigned cha } if (!nl) vsb_printf(vl->vsb, "\n"); - vsb_finish(vl->vsb); - AZ(vsb_error(vl->vsb)); + AZ(vsb_finish(vl->vsb)); vtc_log_emit(vl, lvl); diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c index c4a9477..4f9c668 100644 --- a/bin/varnishtest/vtc_varnish.c +++ b/bin/varnishtest/vtc_varnish.c @@ -158,7 +158,7 @@ varnish_new(const char *name) v->storage = vsb_new_auto(); vsb_printf(v->storage, "-sfile,%s,10M", v->workdir); - vsb_finish(v->storage); + AZ(vsb_finish(v->storage)); v->cli_fd = -1; VTAILQ_INSERT_TAIL(&varnishes, v, list); @@ -250,8 +250,7 @@ varnish_launch(struct varnish *v) v->cli_fd = VSS_listen(ap[0], 1); TCP_myname(v->cli_fd, abuf, sizeof abuf, pbuf, sizeof pbuf); - vsb_finish(v->args); - AZ(vsb_error(v->args)); + AZ(vsb_finish(v->args)); vtc_log(v->vl, 2, "Launch"); vsb = vsb_new_auto(); AN(vsb); @@ -266,8 +265,7 @@ varnish_launch(struct varnish *v) vsb_printf(vsb, " -P %s/varnishd.pid", v->workdir); vsb_printf(vsb, " %s", vsb_data(v->storage)); vsb_printf(vsb, " %s", vsb_data(v->args)); - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); vtc_log(v->vl, 3, "CMD: %s", vsb_data(vsb)); vsb1 = macro_expand(v->vl, vsb_data(vsb)); AN(vsb1); @@ -514,8 +512,7 @@ varnish_vcl(struct varnish *v, const char *vcl, enum cli_status_e expect) vsb_printf(vsb, "vcl.inline vcl%d << %s\n%s\n%s\n", ++v->vcl_nbr, NONSENSE, vcl, NONSENSE); - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); u = varnish_ask_cli(v, vsb_data(vsb), NULL); if (u != expect) { @@ -528,8 +525,7 @@ varnish_vcl(struct varnish *v, const char *vcl, enum cli_status_e expect) if (u == CLIS_OK) { vsb_clear(vsb); vsb_printf(vsb, "vcl.use vcl%d", v->vcl_nbr); - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); u = varnish_ask_cli(v, vsb_data(vsb), NULL); assert(u == CLIS_OK); } else { @@ -559,13 +555,11 @@ varnish_vclbackend(struct varnish *v, const char *vcl) AN(vsb2); cmd_server_genvcl(vsb2); - vsb_finish(vsb2); - AZ(vsb_error(vsb2)); + AZ(vsb_finish(vsb2)); vsb_printf(vsb, "vcl.inline vcl%d << %s\n%s\n%s\n%s\n", ++v->vcl_nbr, NONSENSE, vsb_data(vsb2), vcl, NONSENSE); - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); u = varnish_ask_cli(v, vsb_data(vsb), NULL); if (u != CLIS_OK) { @@ -576,8 +570,7 @@ varnish_vclbackend(struct varnish *v, const char *vcl) } vsb_clear(vsb); vsb_printf(vsb, "vcl.use vcl%d", v->vcl_nbr); - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); u = varnish_ask_cli(v, vsb_data(vsb), NULL); assert(u == CLIS_OK); vsb_delete(vsb); @@ -712,7 +705,7 @@ cmd_varnish(CMD_ARGS) if (!strcmp(*av, "-storage")) { vsb_clear(v->storage); vsb_cat(v->storage, av[1]); - vsb_finish(v->storage); + AZ(vsb_finish(v->storage)); av++; continue; } diff --git a/lib/libvarnish/cli_serve.c b/lib/libvarnish/cli_serve.c index f727b0b..31bdfe6 100644 --- a/lib/libvarnish/cli_serve.c +++ b/lib/libvarnish/cli_serve.c @@ -289,8 +289,7 @@ cls_vlu2(void *priv, char * const *av) } } while (0); - vsb_finish(cli->sb); - AZ(vsb_error(cli->sb)); + AZ(vsb_finish(cli->sb)); if (cs->after != NULL) cs->after(cli); @@ -359,8 +358,7 @@ cls_vlu(void *priv, const char *p) vsb_cat(cfd->last_arg, "\n"); return (0); } - vsb_finish(cfd->last_arg); - AZ(vsb_error(cfd->last_arg)); + AZ(vsb_finish(cfd->last_arg)); free(cfd->argv[cfd->last_idx]); cfd->argv[cfd->last_idx] = NULL; free(cfd->argv[cfd->last_idx + 1]); diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c index 0fe8608..e0e7279 100644 --- a/lib/libvcl/vcc_backend.c +++ b/lib/libvcl/vcc_backend.c @@ -602,8 +602,7 @@ vcc_ParseHostDef(struct vcc *tl, int serial, const char *vgcname) vcc_NextToken(tl); tl->fb = NULL; - vsb_finish(vsb); - AZ(vsb_error(vsb)); + AZ(vsb_finish(vsb)); Fh(tl, 0, "%s", vsb_data(vsb)); vsb_delete(vsb); diff --git a/lib/libvcl/vcc_compile.c b/lib/libvcl/vcc_compile.c index df1d0e4..3a518b8 100644 --- a/lib/libvcl/vcc_compile.c +++ b/lib/libvcl/vcc_compile.c @@ -314,8 +314,7 @@ EmitInitFunc(const struct vcc *tl) { Fc(tl, 0, "\nstatic void\nVGC_Init(struct cli *cli)\n{\n\n"); - vsb_finish(tl->fi); - AZ(vsb_error(tl->fi)); + AZ(vsb_finish(tl->fi)); vsb_cat(tl->fc, vsb_data(tl->fi)); Fc(tl, 0, "}\n"); } @@ -334,8 +333,7 @@ EmitFiniFunc(const struct vcc *tl) for (u = 0; u < tl->nvmodpriv; u++) Fc(tl, 0, "\tvmod_priv_fini(&vmod_priv_%u);\n", u); - vsb_finish(tl->ff); - AZ(vsb_error(tl->ff)); + AZ(vsb_finish(tl->ff)); vsb_cat(tl->fc, vsb_data(tl->ff)); Fc(tl, 0, "}\n"); } @@ -678,8 +676,7 @@ vcc_CompileSource(const struct vcc *tl0, struct vsb *sb, struct source *sp) 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]); - AZ(vsb_error(tl->fm[i])); + AZ(vsb_finish(tl->fm[i])); Fc(tl, 1, "{\n"); Fc(tl, 1, "%s", vsb_data(tl->fm[i])); Fc(tl, 1, "}\n"); @@ -694,11 +691,9 @@ vcc_CompileSource(const struct vcc *tl0, struct vsb *sb, struct source *sp) EmitStruct(tl); /* Combine it all in the fh vsb */ - vsb_finish(tl->fc); - AZ(vsb_error(tl->fc)); + AZ(vsb_finish(tl->fc)); vsb_cat(tl->fh, vsb_data(tl->fc)); - vsb_finish(tl->fh); - AZ(vsb_error(tl->fh)); + AZ(vsb_finish(tl->fh)); of = strdup(vsb_data(tl->fh)); AN(of); diff --git a/lib/libvcl/vcc_dir_dns.c b/lib/libvcl/vcc_dir_dns.c index 5d2c761..e24dcc4 100644 --- a/lib/libvcl/vcc_dir_dns.c +++ b/lib/libvcl/vcc_dir_dns.c @@ -120,7 +120,7 @@ print_backend(struct vcc *tl, Fb(tl, 0, "};\n"); tl->fb = NULL; - vsb_finish(vsb); + AZ(vsb_finish(vsb)); Fh(tl, 0, "%s", vsb_data(vsb)); vsb_delete(vsb); Fi(tl, 0, "\tVRT_init_dir(cli, VCL_conf.director, \"simple\",\n" diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c index 1c14503..659b8b9 100644 --- a/lib/libvcl/vcc_expr.c +++ b/lib/libvcl/vcc_expr.c @@ -269,8 +269,7 @@ vcc_mk_expr(enum var_type fmt, const char *str, ...) va_start(ap, str); vsb_vprintf(e->vsb, str, ap); va_end(ap); - vsb_finish(e->vsb); - AZ(vsb_error(e->vsb)); + AZ(vsb_finish(e->vsb)); return (e); } @@ -345,8 +344,7 @@ vcc_expr_edit(enum var_type fmt, const char *p, struct expr *e1, } p++; } - vsb_finish(e->vsb); - AZ(vsb_error(e->vsb)); + AZ(vsb_finish(e->vsb)); if (e1 != NULL) e->t1 = e1->t1; else if (e2 != NULL) @@ -696,8 +694,7 @@ vcc_expr4(struct vcc *tl, struct expr **e, enum var_type fmt) e1->t1 = tl->t; e1->constant = 1; vcc_NextToken(tl); - vsb_finish(e1->vsb); - AZ(vsb_error(e1->vsb)); + AZ(vsb_finish(e1->vsb)); *e = e1; break; case CNUM: From phk at varnish-cache.org Mon Apr 4 14:24:39 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 16:24:39 +0200 Subject: [master] 35d57e0 Pull in ssize_t definition Message-ID: commit 35d57e02a68e8c444677000b6d67412d243b8f46 Author: Poul-Henning Kamp Date: Mon Apr 4 14:24:29 2011 +0000 Pull in ssize_t definition diff --git a/include/vsb.h b/include/vsb.h index 0ab0ee1..da4a1e0 100644 --- a/include/vsb.h +++ b/include/vsb.h @@ -31,6 +31,8 @@ #ifndef VSB_H_INCLUDED #define VSB_H_INCLUDED +#include + /* * Structure definition */ From phk at varnish-cache.org Mon Apr 4 14:37:49 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 16:37:49 +0200 Subject: [master] d4f532d Some vsb polishing that will be pushed back to FreeBSD at a later date. Message-ID: commit d4f532d22ba78993e49877ca7acadbe53d8aef73 Author: Poul-Henning Kamp Date: Mon Apr 4 14:37:24 2011 +0000 Some vsb polishing that will be pushed back to FreeBSD at a later date. diff --git a/include/vsb.h b/include/vsb.h index da4a1e0..278dcb5 100644 --- a/include/vsb.h +++ b/include/vsb.h @@ -72,7 +72,7 @@ int vsb_printf(struct vsb *, const char *, ...) int vsb_vprintf(struct vsb *, const char *, va_list) /* __printflike(2, 0) */; #endif -int vsb_putc(struct vsb *, int); +int vsb_putc(struct vsb *, char); int vsb_trim(struct vsb *); int vsb_error(const struct vsb *); int vsb_finish(struct vsb *); diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c index bfe9735..b7ba1e3 100644 --- a/lib/libvarnish/vsb.c +++ b/lib/libvarnish/vsb.c @@ -44,9 +44,7 @@ SVNID("$Id$") #define KASSERT(e, m) assert(e) #define SBMALLOC(size) malloc(size) #define SBFREE(buf) free(buf) -#define min(x,y) (x < y ? x : y) -// #define bzero(x,y) memset(x,0,y) #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ #define VSB_MAGIC 0x4a82dd8a @@ -151,51 +149,62 @@ vsb_extend(struct vsb *s, int addlen) } /* - * Initialize an vsb. + * Initialize the internals of an vsb. * If buf is non-NULL, it points to a static or already-allocated string * big enough to hold at least length characters. */ -struct vsb * -vsb_new(struct vsb *s, char *buf, int length, int flags) +static struct vsb * +vsb_newbuf(struct vsb *s, char *buf, int length, int flags) { - KASSERT(length >= 0, - ("attempt to create an vsb of negative length (%d)", length)); - KASSERT((flags & ~VSB_USRFLAGMSK) == 0, - ("%s called with invalid flags", __func__)); - - flags &= VSB_USRFLAGMSK; - if (s == NULL) { - s = SBMALLOC(sizeof(*s)); - if (s == NULL) - return (NULL); - bzero(s, sizeof(*s)); - s->s_flags = flags; - VSB_SETFLAG(s, VSB_DYNSTRUCT); - } else { - bzero(s, sizeof(*s)); - s->s_flags = flags; - } - + memset(s, 0, sizeof(*s)); s->s_magic = VSB_MAGIC; - s->s_size = length; + s->s_flags = flags; if (buf != NULL) { + KASSERT(length > 0, + ("zero or negative length (%d)", length)); + s->s_size = length; s->s_buf = buf; return (s); } + s->s_size = length; if ((flags & VSB_AUTOEXTEND) != 0) s->s_size = vsb_extendsize(s->s_size); s->s_buf = SBMALLOC(s->s_size); - if (s->s_buf == NULL) { - if (VSB_ISDYNSTRUCT(s)) - SBFREE(s); + if (s->s_buf == NULL) return (NULL); - } VSB_SETFLAG(s, VSB_DYNAMIC); return (s); } /* + * Initialize an vsb. + */ +struct vsb * +vsb_new(struct vsb *s, char *buf, int length, int flags) +{ + + KASSERT(length >= 0, + ("attempt to create an vsb of negative length (%d)", length)); + KASSERT((flags & ~VSB_USRFLAGMSK) == 0, + ("%s called with invalid flags", __func__)); + + flags &= VSB_USRFLAGMSK; + if (s != NULL) + return (vsb_newbuf(s, buf, length, flags)); + + s = SBMALLOC(sizeof(*s)); + if (s == NULL) + return (NULL); + if (vsb_newbuf(s, buf, length, flags) == NULL) { + SBFREE(s); + return (NULL); + } + VSB_SETFLAG(s, VSB_DYNSTRUCT); + return (s); +} + +/* * Clear an vsb and reset its position. */ void @@ -238,7 +247,7 @@ vsb_setpos(struct vsb *s, int pos) * buffer and marking overflow. */ static void -vsb_put_byte(int c, struct vsb *s) +vsb_put_byte(struct vsb *s, char c) { assert_vsb_integrity(s); @@ -271,7 +280,7 @@ vsb_bcat(struct vsb *s, const void *buf, size_t len) if (s->s_error != 0) return (-1); for (; str < end; str++) { - vsb_put_byte(*str, s); + vsb_put_byte(s, *str); if (s->s_error != 0) return (-1); } @@ -306,7 +315,7 @@ vsb_cat(struct vsb *s, const char *str) return (-1); while (*str != '\0') { - vsb_put_byte(*str++, s); + vsb_put_byte(s, *str++); if (s->s_error != 0) return (-1); } @@ -395,10 +404,10 @@ vsb_printf(struct vsb *s, const char *fmt, ...) * Append a character to an vsb. */ int -vsb_putc(struct vsb *s, int c) +vsb_putc(struct vsb *s, char c) { - vsb_put_byte(c, s); + vsb_put_byte(s, c); if (s->s_error != 0) return (-1); return (0); @@ -493,7 +502,7 @@ vsb_delete(struct vsb *s) if (VSB_ISDYNAMIC(s)) SBFREE(s->s_buf); isdyn = VSB_ISDYNSTRUCT(s); - bzero(s, sizeof(*s)); + memset(s, 0, sizeof(*s)); if (isdyn) SBFREE(s); } From phk at varnish-cache.org Mon Apr 4 15:08:26 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 17:08:26 +0200 Subject: [master] 0d1e783 And one more sweep over FreeBSD/Varnish sbuf/vsb differences. Message-ID: commit 0d1e7837a6dbe5a8eb851740dcea0ab1ffadf0d7 Author: Poul-Henning Kamp Date: Mon Apr 4 15:08:04 2011 +0000 And one more sweep over FreeBSD/Varnish sbuf/vsb differences. diff --git a/bin/varnishd/cache_panic.c b/bin/varnishd/cache_panic.c index 3405d92..715bfb6 100644 --- a/bin/varnishd/cache_panic.c +++ b/bin/varnishd/cache_panic.c @@ -71,15 +71,15 @@ pan_ws(const struct ws *ws, int indent) vsb_printf(vsp, "%*sid = \"%s\",\n", indent + 2, "", ws->id); vsb_printf(vsp, "%*s{s,f,r,e} = {%p", indent + 2, "", ws->s); if (ws->f > ws->s) - vsb_printf(vsp, ",+%d", ws->f - ws->s); + vsb_printf(vsp, ",+%ld", ws->f - ws->s); else vsb_printf(vsp, ",%p", ws->f); if (ws->r > ws->s) - vsb_printf(vsp, ",+%d", ws->r - ws->s); + vsb_printf(vsp, ",+%ld", ws->r - ws->s); else vsb_printf(vsp, ",%p", ws->r); if (ws->e > ws->s) - vsb_printf(vsp, ",+%d", ws->e - ws->s); + vsb_printf(vsp, ",+%ld", ws->e - ws->s); else vsb_printf(vsp, ",%p", ws->e); vsb_printf(vsp, "},\n"); @@ -166,7 +166,7 @@ pan_object(const struct object *o) vsb_printf(vsp, " xid = %u,\n", o->xid); pan_ws(o->ws_o, 4); pan_http("obj", o->http, 4); - vsb_printf(vsp, " len = %u,\n", o->len); + vsb_printf(vsp, " len = %lu,\n", o->len); vsb_printf(vsp, " store = {\n"); VTAILQ_FOREACH(st, &o->store, list) pan_storage(st); diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index 69ff52f..3a4fa59 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -96,7 +96,8 @@ VRY_Create(const struct sess *sp, const struct http *hp) /* Build a header-matching string out of it */ vsb_clear(sbh); - vsb_printf(sbh, "%c%.*s:%c", 1 + (q - p), q - p, p, 0); + vsb_printf(sbh, "%c%.*s:%c", + (char)(1 + (q - p)), (int)(q - p), p, 0); AZ(vsb_finish(sbh)); /* Append to vary matching string */ diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c index 486b656..74cf65f 100644 --- a/bin/varnishtest/vtc_http.c +++ b/bin/varnishtest/vtc_http.c @@ -845,7 +845,7 @@ cmd_http_txreq(CMD_ARGS) if (*av != NULL) vtc_log(hp->vl, 0, "Unknown http txreq spec: %s\n", *av); if (body != NULL) - vsb_printf(hp->vsb, "Content-Length: %d%s", strlen(body), nl); + vsb_printf(hp->vsb, "Content-Length: %lu%s", strlen(body), nl); vsb_cat(hp->vsb, nl); if (body != NULL) { vsb_cat(hp->vsb, body); @@ -890,7 +890,7 @@ cmd_http_chunked(CMD_ARGS) AN(av[1]); AZ(av[2]); vsb_clear(hp->vsb); - vsb_printf(hp->vsb, "%x%s%s%s", strlen(av[1]), nl, av[1], nl); + vsb_printf(hp->vsb, "%lx%s%s%s", strlen(av[1]), nl, av[1], nl); http_write(hp, 4, "chunked"); } diff --git a/include/vsb.h b/include/vsb.h index 278dcb5..e7b62ef 100644 --- a/include/vsb.h +++ b/include/vsb.h @@ -39,12 +39,12 @@ struct vsb { unsigned s_magic; char *s_buf; /* storage buffer */ + int s_error; /* current error code */ ssize_t s_size; /* size of storage buffer */ ssize_t s_len; /* current length of string */ - int s_error; /* current error code */ #define VSB_FIXEDLEN 0x00000000 /* fixed length buffer (default) */ #define VSB_AUTOEXTEND 0x00000001 /* automatically extend buffer */ -#define VSB_USRFLAGMSK 0x0000ffff /* mask of flags the user may specify */ +#define VSB_USRFLAGMSK 0x0000ffff /* mask of flags the user may specify */ #define VSB_DYNAMIC 0x00010000 /* s_buf must be freed */ #define VSB_FINISHED 0x00020000 /* set by vsb_finish() */ #define VSB_DYNSTRUCT 0x00080000 /* vsb must be freed */ @@ -61,23 +61,23 @@ struct vsb *vsb_new(struct vsb *, char *, int, int); #define vsb_new_auto() \ vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND) void vsb_clear(struct vsb *); -int vsb_setpos(struct vsb *, int); +int vsb_setpos(struct vsb *, ssize_t); int vsb_bcat(struct vsb *, const void *, size_t); int vsb_bcpy(struct vsb *, const void *, size_t); int vsb_cat(struct vsb *, const char *); int vsb_cpy(struct vsb *, const char *); int vsb_printf(struct vsb *, const char *, ...) - /* __printflike(2, 3) */; + __printflike(2, 3); #ifdef va_start int vsb_vprintf(struct vsb *, const char *, va_list) - /* __printflike(2, 0) */; + __printflike(2, 0); #endif int vsb_putc(struct vsb *, char); int vsb_trim(struct vsb *); int vsb_error(const struct vsb *); int vsb_finish(struct vsb *); char *vsb_data(struct vsb *); -int vsb_len(struct vsb *); +ssize_t vsb_len(struct vsb *); int vsb_done(const struct vsb *); void vsb_delete(struct vsb *); void vsb_quote(struct vsb *s, const char *p, int len, int how); diff --git a/lib/libvarnish/cli_common.c b/lib/libvarnish/cli_common.c index a3bbb94..c0efc27 100644 --- a/lib/libvarnish/cli_common.c +++ b/lib/libvarnish/cli_common.c @@ -100,7 +100,7 @@ cli_writeres(int fd, const struct cli *cli) assert(cli->result <= 999); /*lint !e650 const out of range */ i = snprintf(res, sizeof res, - "%-3d %-8d\n", cli->result, vsb_len(cli->sb)); + "%-3d %-8ld\n", cli->result, (long)vsb_len(cli->sb)); assert(i == CLI_LINE0_LEN); iov[0].iov_base = res; diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c index b7ba1e3..bdc40b1 100644 --- a/lib/libvarnish/vsb.c +++ b/lib/libvarnish/vsb.c @@ -24,7 +24,7 @@ * 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. -__FBSDID("$FreeBSD: head/sys/kern/subr_sbuf.c 181462 2008-08-09 10:26:21Z des $"); +__FBSDID("$FreeBSD: head/sys/kern/subr_vsb.c 212750 2010-09-16 16:13:12Z mdf $ */ #include "config.h" @@ -65,8 +65,13 @@ SVNID("$Id$") #define VSB_CLEARFLAG(s, f) do { (s)->s_flags &= ~(f); } while (0) #define VSB_MINEXTENDSIZE 16 /* Should be power of 2. */ +#ifdef PAGE_SIZE +#define VSB_MAXEXTENDSIZE PAGE_SIZE +#define VSB_MAXEXTENDINCR PAGE_SIZE +#else #define VSB_MAXEXTENDSIZE 4096 #define VSB_MAXEXTENDINCR 4096 +#endif /* * Debugging support @@ -158,8 +163,9 @@ vsb_newbuf(struct vsb *s, char *buf, int length, int flags) { memset(s, 0, sizeof(*s)); - s->s_magic = VSB_MAGIC; s->s_flags = flags; + s->s_magic = VSB_MAGIC; + if (buf != NULL) { KASSERT(length > 0, ("zero or negative length (%d)", length)); @@ -224,7 +230,7 @@ vsb_clear(struct vsb *s) * Effectively truncates the vsb at the new position. */ int -vsb_setpos(struct vsb *s, int pos) +vsb_setpos(struct vsb *s, ssize_t pos) { assert_vsb_integrity(s); @@ -476,7 +482,7 @@ vsb_data(struct vsb *s) /* * Return the length of the vsb data. */ -int +ssize_t vsb_len(struct vsb *s) { From phk at varnish-cache.org Mon Apr 4 15:46:45 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 04 Apr 2011 17:46:45 +0200 Subject: [master] b33d675 Not everybody has __printflike() Message-ID: commit b33d675720c4ea3a082f962f27135f052284bc1c Author: Poul-Henning Kamp Date: Mon Apr 4 15:46:34 2011 +0000 Not everybody has __printflike() diff --git a/include/vsb.h b/include/vsb.h index e7b62ef..5db06b9 100644 --- a/include/vsb.h +++ b/include/vsb.h @@ -51,6 +51,10 @@ struct vsb { int s_flags; /* flags */ }; +#ifndef __printflike +#define __printflike(a,b) +#endif + #ifdef __cplusplus extern "C" { #endif From tfheen at varnish-cache.org Wed Apr 6 06:35:07 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Wed, 06 Apr 2011 08:35:07 +0200 Subject: [master] 020df86 Fix up documentation for ESI syntax Message-ID: commit 020df8664a41057ccc3e87cd8c4dc7b57be95274 Author: Tollef Fog Heen Date: Wed Apr 6 08:34:28 2011 +0200 Fix up documentation for ESI syntax The syntax for enabling ESI has changed in trunk, update the documentation to match. diff --git a/doc/sphinx/tutorial/advanced_topics.rst b/doc/sphinx/tutorial/advanced_topics.rst index 4491c28..1045de9 100644 --- a/doc/sphinx/tutorial/advanced_topics.rst +++ b/doc/sphinx/tutorial/advanced_topics.rst @@ -54,10 +54,10 @@ your hit rate and reduce the load on your servers. ESI looks like this:: -ESI is processed in vcl_fetch by using the *esi* keyword.:: +ESI is processed in vcl_fetch by setting *do_esi* to true.:: sub vcl_fetch { if (req.url == "/test.html") { - esi; /* Do ESI processing */ + set beresp.do_esi = true; /* Do ESI processing */ } } diff --git a/doc/sphinx/tutorial/esi.rst b/doc/sphinx/tutorial/esi.rst index e2002bd..ef79f3e 100644 --- a/doc/sphinx/tutorial/esi.rst +++ b/doc/sphinx/tutorial/esi.rst @@ -47,7 +47,7 @@ For ESI to work you need to activate ESI processing in VCL, like this::: sub vcl_fetch { if (req.url == "/test.html") { - esi; /* Do ESI processing */ + set beresp.do_esi = true; /* Do ESI processing */ set obj.ttl = 24 h; /* Sets the TTL on the HTML above */ } elseif (req.url == "/cgi-bin/date.cgi") { set obj.ttl = 1m; /* Sets a one minute TTL on */ diff --git a/doc/sphinx/tutorial/vcl.rst b/doc/sphinx/tutorial/vcl.rst index ccf43d2..39b1e92 100644 --- a/doc/sphinx/tutorial/vcl.rst +++ b/doc/sphinx/tutorial/vcl.rst @@ -77,9 +77,6 @@ The most common actions to call are these: *deliver* Deliver the cached object to the client. Usually called in vcl_fetch. -*esi* - ESI-process the fetched document. - Requests, responses and objects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From tfheen at varnish-cache.org Wed Apr 6 07:29:44 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Wed, 06 Apr 2011 09:29:44 +0200 Subject: [master] 7ef9377 Add casts for to make LLVM on Mac OS X happy Message-ID: commit 7ef9377d84ec99de6ebecf67d11cd013eb6fbe04 Author: Tollef Fog Heen Date: Wed Apr 6 09:29:26 2011 +0200 Add casts for to make LLVM on Mac OS X happy diff --git a/bin/varnishd/cache_panic.c b/bin/varnishd/cache_panic.c index 715bfb6..55efa7a 100644 --- a/bin/varnishd/cache_panic.c +++ b/bin/varnishd/cache_panic.c @@ -71,15 +71,15 @@ pan_ws(const struct ws *ws, int indent) vsb_printf(vsp, "%*sid = \"%s\",\n", indent + 2, "", ws->id); vsb_printf(vsp, "%*s{s,f,r,e} = {%p", indent + 2, "", ws->s); if (ws->f > ws->s) - vsb_printf(vsp, ",+%ld", ws->f - ws->s); + vsb_printf(vsp, ",+%ld", (long) (ws->f - ws->s)); else vsb_printf(vsp, ",%p", ws->f); if (ws->r > ws->s) - vsb_printf(vsp, ",+%ld", ws->r - ws->s); + vsb_printf(vsp, ",+%ld", (long) (ws->r - ws->s)); else vsb_printf(vsp, ",%p", ws->r); if (ws->e > ws->s) - vsb_printf(vsp, ",+%ld", ws->e - ws->s); + vsb_printf(vsp, ",+%ld", (long) (ws->e - ws->s)); else vsb_printf(vsp, ",%p", ws->e); vsb_printf(vsp, "},\n"); From tfheen at varnish-cache.org Fri Apr 8 06:05:48 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Fri, 08 Apr 2011 08:05:48 +0200 Subject: [master] a1ed842 Allow strings longer than 256 bytes Message-ID: commit a1ed842aa2a16a95acc889ab2d158c1afa087e6d Author: Tollef Fog Heen Date: Fri Apr 8 08:04:27 2011 +0200 Allow strings longer than 256 bytes Use an int rather than a char for counting. Thanks to Thierry for the diagnosis. Fixes #896 diff --git a/bin/varnishtest/tests/r00896.vtc b/bin/varnishtest/tests/r00896.vtc new file mode 100644 index 0000000..6eb4287 --- /dev/null +++ b/bin/varnishtest/tests/r00896.vtc @@ -0,0 +1,20 @@ +test "Ticket #896, strings over 256 bytes" + +server s1 { + rxreq + txresp +} -start + +varnish v1 -vcl+backend { + sub vcl_recv { + if (req.http.host ~ "^(abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij|abcdefghij)") { + error 500 "not ok"; + } + } +} -start + +client c1 { + txreq + rxresp + expect resp.status == 200 +} -run diff --git a/lib/libvcl/vcc_token.c b/lib/libvcl/vcc_token.c index 6818777..56c9672 100644 --- a/lib/libvcl/vcc_token.c +++ b/lib/libvcl/vcc_token.c @@ -350,7 +350,7 @@ static int vcc_decstr(struct vcc *tl) { char *q; - unsigned char l; + unsigned int l; assert(tl->t->tok == CSTR); l = (tl->t->e - tl->t->b) - 2; From tfheen at varnish-cache.org Fri Apr 8 06:05:49 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Fri, 08 Apr 2011 08:05:49 +0200 Subject: [master] 2071d37 Ignore emacs backup files Message-ID: commit 2071d371c603f95cf659c52ba35d9a566bbb4dfc Author: Tollef Fog Heen Date: Fri Apr 8 08:05:39 2011 +0200 Ignore emacs backup files diff --git a/.gitignore b/.gitignore index 2a94b5c..922414b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ Makefile.in *.o *.lo *.la +*~ # Various auto-tools artifacts /aclocal.m4 From tfheen at varnish-cache.org Fri Apr 8 14:26:03 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Fri, 08 Apr 2011 16:26:03 +0200 Subject: [master] 259d869 Typos in docs Message-ID: commit 259d869d95e9d59acf3b6622d01c0b10271ac76d Author: Tollef Fog Heen Date: Fri Apr 8 16:25:39 2011 +0200 Typos in docs Thanks to Magnus Hagander for spotting one of those. diff --git a/doc/sphinx/phk/gzip.rst b/doc/sphinx/phk/gzip.rst index 53bb1c9..4200db8 100644 --- a/doc/sphinx/phk/gzip.rst +++ b/doc/sphinx/phk/gzip.rst @@ -62,8 +62,8 @@ ungzip the object during deliver. Tuning, tweaking and frobbing ----------------------------- -In vcl_recv{} you have a chance t modify the clients Accept-Encoding: header -before anything else happens. +In vcl_recv{} you have a chance to modify the client's +Accept-Encoding: header before anything else happens. In vcl_pass{} the clients Accept-Encoding header is copied to the backend request unchanged. From phk at varnish-cache.org Mon Apr 11 08:32:03 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 11 Apr 2011 10:32:03 +0200 Subject: [master] 3b1f918 Introduce the control variable for streaming. Message-ID: commit 3b1f918e29d06aed9bec1e1be765fb18d4baf8f3 Author: Poul-Henning Kamp Date: Mon Apr 11 07:00:48 2011 +0000 Introduce the control variable for streaming. diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index 4bc7309..95a8dbf 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -303,6 +303,7 @@ struct worker { struct vfp *vfp; struct vgz *vgz_rx; struct vef_priv *vef_priv; + unsigned do_stream; unsigned do_esi; unsigned do_gzip; unsigned is_gzip; diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index ba418b6..fb65242 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -664,6 +664,9 @@ cnt_fetchbody(struct sess *sp) else if (sp->wrk->is_gzip) sp->wrk->vfp = &vfp_testgzip; + if (sp->wrk->do_esi) + sp->wrk->do_stream = 0; + l = http_EstimateWS(sp->wrk->beresp, pass ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp); @@ -1177,10 +1180,12 @@ cnt_recv(struct sess *sp) return (0); } + /* XXX: do_esi ? */ sp->wrk->is_gzip = 0; sp->wrk->is_gunzip = 0; sp->wrk->do_gzip = 0; sp->wrk->do_gunzip = 0; + sp->wrk->do_stream = 0; if (params->http_gzip_support && (recv_handling != VCL_RET_PIPE) && diff --git a/bin/varnishd/cache_vrt_var.c b/bin/varnishd/cache_vrt_var.c index 8faf2c4..b9b99a9 100644 --- a/bin/varnishd/cache_vrt_var.c +++ b/bin/varnishd/cache_vrt_var.c @@ -197,6 +197,7 @@ VRT_r_##dir##_##onm(const struct sess *sp) \ VBERESP(beresp, unsigned, do_esi, do_esi) VBERESP(beresp, unsigned, do_gzip, do_gzip) VBERESP(beresp, unsigned, do_gunzip, do_gunzip) +VBERESP(beresp, unsigned, do_stream, do_stream) /*--------------------------------------------------------------------*/ diff --git a/lib/libvcl/generate.py b/lib/libvcl/generate.py index 969fbc8..b9e1cc3 100755 --- a/lib/libvcl/generate.py +++ b/lib/libvcl/generate.py @@ -310,6 +310,12 @@ sp_variables = ( ( 'fetch',), 'const struct sess *' ), + ('beresp.do_stream', + 'BOOL', + ( 'miss', 'pass', 'fetch',), + ( 'miss', 'pass', 'fetch',), + 'const struct sess *' + ), ('beresp.do_gzip', 'BOOL', ( 'fetch',), From phk at varnish-cache.org Mon Apr 11 08:32:04 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 11 Apr 2011 10:32:04 +0200 Subject: [master] 949d532 We only have beresp in vcl_fetch{} Message-ID: commit 949d5320006d2aa189e2ff72b57306f5670bd62b Author: Poul-Henning Kamp Date: Mon Apr 11 07:04:39 2011 +0000 We only have beresp in vcl_fetch{} diff --git a/lib/libvcl/generate.py b/lib/libvcl/generate.py index b9e1cc3..262b25b 100755 --- a/lib/libvcl/generate.py +++ b/lib/libvcl/generate.py @@ -312,8 +312,8 @@ sp_variables = ( ), ('beresp.do_stream', 'BOOL', - ( 'miss', 'pass', 'fetch',), - ( 'miss', 'pass', 'fetch',), + ( 'fetch',), + ( 'fetch',), 'const struct sess *' ), ('beresp.do_gzip', From phk at varnish-cache.org Mon Apr 11 08:32:05 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 11 Apr 2011 10:32:05 +0200 Subject: [master] e6b43a5 Slice and dice cache_center to make space for streaming. Message-ID: commit e6b43a5365340d0afe602cb3ceecf0ecd6a20a8a Author: Poul-Henning Kamp Date: Mon Apr 11 08:31:17 2011 +0000 Slice and dice cache_center to make space for streaming. NB: no streaming happening yet. diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index fb65242..5045c2c 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -52,7 +52,7 @@ DOT label="Request received" DOT ] DOT ERROR [shape=plaintext] DOT RESTART [shape=plaintext] -DOT acceptor -> start [style=bold,color=green,weight=4] +DOT acceptor -> start [style=bold,color=green] */ #include "config.h" @@ -134,8 +134,8 @@ cnt_wait(struct sess *sp) /*-------------------------------------------------------------------- * We have a refcounted object on the session, now deliver it. * -DOT subgraph xcluster_deliver { -DOT deliver [ +DOT subgraph xcluster_prepresp { +DOT prepresp [ DOT shape=ellipse DOT label="Filter obj.->resp." DOT ] @@ -143,30 +143,34 @@ DOT vcl_deliver [ DOT shape=record DOT label="vcl_deliver()|resp." DOT ] -DOT deliver2 [ -DOT shape=ellipse -DOT label="Send resp + body" -DOT ] -DOT deliver -> vcl_deliver [style=bold,color=green,weight=4] -DOT vcl_deliver -> deliver2 [style=bold,color=green,weight=4,label=deliver] +DOT prepresp -> vcl_deliver [style=bold,color=green] +DOT prepresp -> vcl_deliver [style=bold,color=cyan] +DOT prepresp -> vcl_deliver [style=bold,color=red] +DOT prepresp -> vcl_deliver [style=bold,color=blue,] +DOT vcl_deliver -> deliver [style=bold,color=green,label=deliver] +DOT vcl_deliver -> deliver [style=bold,color=red] +DOT vcl_deliver -> deliver [style=bold,color=blue] DOT vcl_deliver -> errdeliver [label="error"] DOT errdeliver [label="ERROR",shape=plaintext] DOT vcl_deliver -> rstdeliver [label="restart",color=purple] DOT rstdeliver [label="RESTART",shape=plaintext] +DOT vcl_deliver -> streambody [style=bold,color=cyan,label="deliver"] DOT } -DOT deliver2 -> DONE [style=bold,color=green,weight=4] * */ static int -cnt_deliver(struct sess *sp) +cnt_prepresp(struct sess *sp) { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC); - sp->wrk->res_mode = RES_LEN; + sp->wrk->res_mode = 0; + + if (!sp->wrk->do_stream) + sp->wrk->res_mode |= RES_LEN; if (!sp->disable_esi && sp->obj->esidata != NULL) { /* In ESI mode, we don't know the aggregate length */ @@ -190,7 +194,7 @@ cnt_deliver(struct sess *sp) } if (!(sp->wrk->res_mode & (RES_LEN|RES_CHUNKED|RES_EOF))) { - if (sp->obj->len == 0) + if (sp->obj->len == 0 && !sp->wrk->do_stream) /* * If the object is empty, neither ESI nor GUNZIP * can make it any different size @@ -222,7 +226,12 @@ cnt_deliver(struct sess *sp) case VCL_RET_RESTART: if (sp->restarts >= params->max_restarts) break; - (void)HSH_Deref(sp->wrk, NULL, &sp->obj); + if (sp->wrk->do_stream) { + VDI_CloseFd(sp); + HSH_Drop(sp); + } else { + (void)HSH_Deref(sp->wrk, NULL, &sp->obj); + } AZ(sp->obj); sp->restarts++; sp->director = NULL; @@ -234,6 +243,31 @@ cnt_deliver(struct sess *sp) default: WRONG("Illegal action in vcl_deliver{}"); } + if (sp->wrk->do_stream) + sp->step = STP_STREAMBODY; + else + sp->step = STP_DELIVER; + return (0); +} + +/*-------------------------------------------------------------------- + * Deliver an already stored object + * +DOT subgraph xcluster_deliver { +DOT deliver [ +DOT shape=ellipse +DOT label="Send body" +DOT ] +DOT } +DOT deliver -> DONE [style=bold,color=green] +DOT deliver -> DONE [style=bold,color=red] +DOT deliver -> DONE [style=bold,color=blue] + * + */ + +static int +cnt_deliver(struct sess *sp) +{ sp->director = NULL; sp->restarts = 0; @@ -363,7 +397,7 @@ DOT shape=record DOT label="vcl_error()|resp." DOT ] DOT ERROR -> vcl_error -DOT vcl_error-> deliver [label=deliver] +DOT vcl_error-> prepresp [label=deliver] DOT } */ @@ -426,7 +460,7 @@ cnt_error(struct sess *sp) sp->err_code = 0; sp->err_reason = NULL; http_Setup(sp->wrk->bereq, NULL); - sp->step = STP_DELIVER; + sp->step = STP_PREPRESP; return (0); } @@ -442,15 +476,16 @@ DOT vcl_fetch [ DOT shape=record DOT label="vcl_fetch()|req.\nbereq.\nberesp." DOT ] -DOT fetch -> vcl_fetch [style=bold,color=blue,weight=2] +DOT fetch -> vcl_fetch [style=bold,color=blue] +DOT fetch -> vcl_fetch [style=bold,color=red] DOT fetch_pass [ DOT shape=ellipse -DOT label="obj.pass=true" +DOT label="obj.f.pass=true" DOT ] DOT vcl_fetch -> fetch_pass [label="hit_for_pass",style=bold,color=red] DOT } DOT fetch_pass -> fetchbody [style=bold,color=red] -DOT vcl_fetch -> fetchbody [label="deliver",style=bold,color=blue,weight=2] +DOT vcl_fetch -> fetchbody [label="deliver",style=bold,color=blue] DOT vcl_fetch -> rstfetch [label="restart",color=purple] DOT rstfetch [label="RESTART",shape=plaintext] DOT fetch -> errfetch @@ -571,11 +606,19 @@ cnt_fetch(struct sess *sp) * DOT subgraph xcluster_body { DOT fetchbody [ +DOT shape=diamond +DOT label="stream ?" +DOT ] +DOT fetchbody2 [ DOT shape=ellipse DOT label="fetch body\nfrom backend\n" DOT ] DOT } -DOT fetchbody -> deliver [style=bold,color=red] +DOT fetchbody -> fetchbody2 [label=no,style=bold,color=red] +DOT fetchbody -> fetchbody2 [style=bold,color=blue] +DOT fetchbody -> prepresp [label=yes,style=bold,color=cyan] +DOT fetchbody2 -> prepresp [style=bold,color=red] +DOT fetchbody2 -> prepresp [style=bold,color=blue] */ @@ -744,6 +787,13 @@ cnt_fetchbody(struct sess *sp) else sp->obj->last_modified = sp->wrk->entered; + assert(WRW_IsReleased(sp->wrk)); + + if (sp->wrk->do_stream) { + sp->step = STP_PREPRESP; + return (0); + } + /* Use unmodified headers*/ i = FetchBody(sp); @@ -771,6 +821,52 @@ cnt_fetchbody(struct sess *sp) HSH_Unbusy(sp); } sp->acct_tmp.fetch++; + sp->step = STP_PREPRESP; + return (0); +} + +/*-------------------------------------------------------------------- + * Stream the body as we fetch it +DOT subgraph xstreambody { +DOT streambody [ +DOT shape=ellipse +DOT label="streaming\nfetch/deliver" +DOT ] +DOT } +DOT streambody -> DONE [style=bold,color=cyan] + */ + +static int +cnt_streambody(struct sess *sp) +{ + int i; + + /* Use unmodified headers*/ + i = FetchBody(sp); + + sp->wrk->h_content_length = NULL; + + http_Setup(sp->wrk->bereq, NULL); + http_Setup(sp->wrk->beresp, NULL); + sp->wrk->vfp = NULL; + AZ(sp->vbc); + AN(sp->director); + + if (i) { + HSH_Drop(sp); + AZ(sp->obj); + sp->err_code = 503; + sp->step = STP_ERROR; + return (0); + } + + if (sp->obj->objcore != NULL) { + EXP_Insert(sp->obj); + AN(sp->obj->objcore); + AN(sp->obj->objcore->ban); + HSH_Unbusy(sp); + } + sp->acct_tmp.fetch++; sp->step = STP_DELIVER; return (0); } @@ -821,7 +917,7 @@ DOT err_hit [label="ERROR",shape=plaintext] DOT hit -> rst_hit [label="restart",color=purple] DOT rst_hit [label="RESTART",shape=plaintext] DOT hit -> pass [label=pass,style=bold,color=red] -DOT hit -> deliver [label="deliver",style=bold,color=green,weight=4] +DOT hit -> prepresp [label="deliver",style=bold,color=green] */ static int @@ -841,7 +937,7 @@ cnt_hit(struct sess *sp) (void)FetchReqBody(sp); AZ(sp->wrk->bereq->ws); AZ(sp->wrk->beresp->ws); - sp->step = STP_DELIVER; + sp->step = STP_PREPRESP; return (0); } @@ -884,14 +980,14 @@ DOT label="obj in cache ?\ncreate if not" DOT ] DOT lookup2 [ DOT shape=diamond -DOT label="obj.pass ?" +DOT label="obj.f.pass ?" DOT ] -DOT hash -> lookup [label="hash",style=bold,color=green,weight=4] -DOT lookup -> lookup2 [label="yes",style=bold,color=green,weight=4] +DOT hash -> lookup [label="hash",style=bold,color=green] +DOT lookup -> lookup2 [label="yes",style=bold,color=green] DOT } -DOT lookup2 -> hit [label="no", style=bold,color=green,weight=4] +DOT lookup2 -> hit [label="no", style=bold,color=green] DOT lookup2 -> pass [label="yes",style=bold,color=red] -DOT lookup -> miss [label="no",style=bold,color=blue,weight=2] +DOT lookup -> miss [label="no",style=bold,color=blue] */ static int @@ -960,13 +1056,13 @@ DOT vcl_miss [ DOT shape=record DOT label="vcl_miss()|req.\nbereq." DOT ] -DOT miss -> vcl_miss [style=bold,color=blue,weight=2] +DOT miss -> vcl_miss [style=bold,color=blue] DOT } DOT vcl_miss -> rst_miss [label="restart",color=purple] DOT rst_miss [label="RESTART",shape=plaintext] DOT vcl_miss -> err_miss [label="error"] DOT err_miss [label="ERROR",shape=plaintext] -DOT vcl_miss -> fetch [label="fetch",style=bold,color=blue,weight=2] +DOT vcl_miss -> fetch [label="fetch",style=bold,color=blue] DOT vcl_miss -> pass [label="pass",style=bold,color=red] DOT */ @@ -1145,7 +1241,7 @@ DOT recv -> pipe [label="pipe",style=bold,color=orange] DOT recv -> pass2 [label="pass",style=bold,color=red] DOT recv -> err_recv [label="error"] DOT err_recv [label="ERROR",shape=plaintext] -DOT recv -> hash [label="lookup",style=bold,color=green,weight=4] +DOT recv -> hash [label="lookup",style=bold,color=green] */ static int @@ -1241,7 +1337,7 @@ cnt_recv(struct sess *sp) * Handle a request, wherever it came from recv/restart. * DOT start [shape=box,label="Dissect request"] -DOT start -> recv [style=bold,color=green,weight=4] +DOT start -> recv [style=bold,color=green] */ static int diff --git a/bin/varnishd/steps.h b/bin/varnishd/steps.h index 59d4779..9a00b2c 100644 --- a/bin/varnishd/steps.h +++ b/bin/varnishd/steps.h @@ -41,6 +41,8 @@ STEP(miss, MISS) STEP(hit, HIT) STEP(fetch, FETCH) STEP(fetchbody, FETCHBODY) +STEP(streambody,STREAMBODY) +STEP(prepresp, PREPRESP) STEP(deliver, DELIVER) STEP(error, ERROR) STEP(done, DONE) From phk at varnish-cache.org Mon Apr 11 09:18:38 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 11 Apr 2011 11:18:38 +0200 Subject: [master] 2eae667 Make range-stuff 4GB+ compliant Start streaming response code Message-ID: commit 2eae66796c08050cfd0b340cdfb24d8f6c774b7c Author: Poul-Henning Kamp Date: Mon Apr 11 09:18:08 2011 +0000 Make range-stuff 4GB+ compliant Start streaming response code diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index 95a8dbf..d280bb1 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -856,6 +856,8 @@ void WSL_Flush(struct worker *w, int overflow); /* cache_response.c */ void RES_BuildHttp(struct sess *sp); void RES_WriteObj(struct sess *sp); +void RES_StreamStart(struct sess *sp); +void RES_StreamEnd(struct sess *sp); /* cache_vary.c */ struct vsb *VRY_Create(const struct sess *sp, const struct http *hp); diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index 5045c2c..1c1118c 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -709,6 +709,8 @@ cnt_fetchbody(struct sess *sp) if (sp->wrk->do_esi) sp->wrk->do_stream = 0; + if (!sp->wantbody) + sp->wrk->do_stream = 0; l = http_EstimateWS(sp->wrk->beresp, pass ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp); @@ -841,6 +843,8 @@ cnt_streambody(struct sess *sp) { int i; + RES_StreamStart(sp); + /* Use unmodified headers*/ i = FetchBody(sp); @@ -867,7 +871,16 @@ cnt_streambody(struct sess *sp) HSH_Unbusy(sp); } sp->acct_tmp.fetch++; - sp->step = STP_DELIVER; + sp->director = NULL; + sp->restarts = 0; + + RES_StreamEnd(sp); + + assert(WRW_IsReleased(sp->wrk)); + assert(sp->wrk->wrw.ciov == sp->wrk->wrw.siov); + (void)HSH_Deref(sp->wrk, NULL, &sp->obj); + http_Setup(sp->wrk->resp, NULL); + sp->step = STP_DONE; return (0); } diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c index 87f6f6f..4771c54 100644 --- a/bin/varnishd/cache_response.c +++ b/bin/varnishd/cache_response.c @@ -125,9 +125,9 @@ res_do_conds(struct sess *sp) /*--------------------------------------------------------------------*/ static void -res_dorange(struct sess *sp, const char *r, unsigned *plow, unsigned *phigh) +res_dorange(struct sess *sp, const char *r, ssize_t *plow, ssize_t *phigh) { - unsigned low, high, has_low; + ssize_t low, high, has_low; (void)sp; if (strncmp(r, "bytes=", 6)) @@ -176,11 +176,12 @@ res_dorange(struct sess *sp, const char *r, unsigned *plow, unsigned *phigh) return; http_PrintfHeader(sp->wrk, sp->fd, sp->wrk->resp, - "Content-Range: bytes %u-%u/%u", low, high, sp->obj->len); + "Content-Range: bytes %jd-%jd/%jd", + (intmax_t)low, (intmax_t)high, (intmax_t)sp->obj->len); http_Unset(sp->wrk->resp, H_Content_Length); assert(sp->wrk->res_mode & RES_LEN); http_PrintfHeader(sp->wrk, sp->fd, sp->wrk->resp, - "Content-Length: %u", 1 + high - low); + "Content-Length: %jd", (intmax_t)(1 + high - low)); http_SetResp(sp->wrk->resp, "HTTP/1.1", 206, "Partial Content"); *plow = low; @@ -337,7 +338,7 @@ void RES_WriteObj(struct sess *sp) { char *r; - unsigned low, high; + ssize_t low, high; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); @@ -390,3 +391,45 @@ RES_WriteObj(struct sess *sp) if (WRW_FlushRelease(sp->wrk)) vca_close_session(sp, "remote closed"); } + +/*--------------------------------------------------------------------*/ + +void +RES_StreamStart(struct sess *sp) +{ + + AZ(sp->wrk->res_mode & RES_ESI_CHILD); + AN(sp->wantbody); + + WRW_Reserve(sp->wrk, &sp->fd); + /* + * Always remove C-E if client don't grok it + */ + if (sp->wrk->res_mode & RES_GUNZIP) + http_Unset(sp->wrk->resp, H_Content_Encoding); + + sp->acct_tmp.hdrbytes += + http_Write(sp->wrk, sp->wrk->resp, 1); + + if (sp->wrk->res_mode & RES_CHUNKED) + WRW_Chunked(sp->wrk); +} + +void +RES_StreamEnd(struct sess *sp) +{ + ssize_t low, high; + + if (sp->wrk->res_mode & RES_GUNZIP) { + res_WriteGunzipObj(sp); + } else { + low = 0; + high = sp->obj->len - 1; + res_WriteDirObj(sp, low, high); + } + if (sp->wrk->res_mode & RES_CHUNKED && + !(sp->wrk->res_mode & RES_ESI_CHILD)) + WRW_EndChunk(sp->wrk); + if (WRW_FlushRelease(sp->wrk)) + vca_close_session(sp, "remote closed"); +} From phk at varnish-cache.org Mon Apr 11 10:50:17 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 11 Apr 2011 12:50:17 +0200 Subject: [master] cf7c641 Add "rxchunk" primitive Message-ID: commit cf7c641fe61f53b11ca3f15f517d99965f0511f9 Author: Poul-Henning Kamp Date: Mon Apr 11 10:29:18 2011 +0000 Add "rxchunk" primitive diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c index 74cf65f..3e0fbab 100644 --- a/bin/varnishtest/vtc_http.c +++ b/bin/varnishtest/vtc_http.c @@ -69,6 +69,7 @@ struct http { char *body; unsigned bodyl; char bodylen[20]; + char chunklen[20]; char *req[MAX_HDR]; char *resp[MAX_HDR]; @@ -191,6 +192,8 @@ cmd_var_resolve(struct http *hp, char *spec) return(hp->resp[1]); if (!strcmp(spec, "resp.msg")) return(hp->resp[2]); + if (!strcmp(spec, "resp.chunklen")) + return(hp->chunklen); if (!strcmp(spec, "resp.bodylen")) return(hp->bodylen); if (!memcmp(spec, "req.http.", 9)) { @@ -371,6 +374,47 @@ http_rxchar(struct http *hp, int n) assert(i > 0); } +static int +http_rxchunk(struct http *hp) +{ + char *q; + int l, i; + + l = hp->prxbuf; + do + http_rxchar(hp, 1); + while (hp->rxbuf[hp->prxbuf - 1] != '\n'); + vtc_dump(hp->vl, 4, "len", hp->rxbuf + l, -1); + i = strtoul(hp->rxbuf + l, &q, 16); + bprintf(hp->chunklen, "%d", i); + if ((q == hp->rxbuf + l) || + (*q != '\0' && !vct_islws(*q))) { + vtc_log(hp->vl, 0, "chunked fail %02x @ %d", + *q, q - (hp->rxbuf + l)); + } + assert(q != hp->rxbuf + l); + assert(*q == '\0' || vct_islws(*q)); + hp->prxbuf = l; + if (i > 0) { + http_rxchar(hp, i); + vtc_dump(hp->vl, 4, "chunk", + hp->rxbuf + l, i); + } + l = hp->prxbuf; + http_rxchar(hp, 2); + if(!vct_iscrlf(hp->rxbuf[l])) + vtc_log(hp->vl, 0, + "Wrong chunk tail[0] = %02x", + hp->rxbuf[l] & 0xff); + if(!vct_iscrlf(hp->rxbuf[l + 1])) + vtc_log(hp->vl, 0, + "Wrong chunk tail[1] = %02x", + hp->rxbuf[l + 1] & 0xff); + hp->prxbuf = l; + hp->rxbuf[l] = '\0'; + return (i); +} + /********************************************************************** * Swallow a HTTP message body */ @@ -378,15 +422,13 @@ http_rxchar(struct http *hp, int n) static void http_swallow_body(struct http *hp, char * const *hh, int body) { - char *p, *q; + char *p; int i, l, ll; - ll = 0; p = http_find_header(hh, "content-length"); if (p != NULL) { l = strtoul(p, NULL, 0); - hp->body = hp->rxbuf + hp->prxbuf; http_rxchar(hp, l); vtc_dump(hp->vl, 4, "body", hp->body, l); hp->bodyl = l; @@ -395,44 +437,10 @@ http_swallow_body(struct http *hp, char * const *hh, int body) } p = http_find_header(hh, "transfer-encoding"); if (p != NULL && !strcmp(p, "chunked")) { - hp->body = hp->rxbuf + hp->prxbuf; - while (1) { - l = hp->prxbuf; - do - http_rxchar(hp, 1); - while (hp->rxbuf[hp->prxbuf - 1] != '\n'); - vtc_dump(hp->vl, 4, "len", hp->rxbuf + l, -1); - i = strtoul(hp->rxbuf + l, &q, 16); - if ((q == hp->rxbuf + l) || - (*q != '\0' && !vct_islws(*q))) { - vtc_log(hp->vl, 0, "chunked fail %02x @ %d", - *q, q - (hp->rxbuf + l)); - } - assert(q != hp->rxbuf + l); - assert(*q == '\0' || vct_islws(*q)); - hp->prxbuf = l; - if (i > 0) { - ll += i; - http_rxchar(hp, i); - vtc_dump(hp->vl, 4, "chunk", - hp->rxbuf + l, i); - } - l = hp->prxbuf; - http_rxchar(hp, 2); - if(!vct_iscrlf(hp->rxbuf[l])) - vtc_log(hp->vl, 0, - "Wrong chunk tail[0] = %02x", - hp->rxbuf[l] & 0xff); - if(!vct_iscrlf(hp->rxbuf[l + 1])) - vtc_log(hp->vl, 0, - "Wrong chunk tail[1] = %02x", - hp->rxbuf[l + 1] & 0xff); - hp->prxbuf = l; - hp->rxbuf[l] = '\0'; - if (i == 0) - break; - } + while (http_rxchunk(hp) != 0) + continue; vtc_dump(hp->vl, 4, "body", hp->body, ll); + ll = hp->rxbuf + hp->prxbuf - hp->body; hp->bodyl = ll; sprintf(hp->bodylen, "%d", ll); return; @@ -505,8 +513,9 @@ cmd_http_rxresp(CMD_ARGS) "Unknown http rxresp spec: %s\n", *av); http_rxhdr(hp); http_splitheader(hp, 0); + hp->body = hp->rxbuf + hp->prxbuf; if (!has_obj) - ; + return; else if (!strcmp(hp->resp[1], "200")) http_swallow_body(hp, hp->resp, 1); else @@ -787,6 +796,26 @@ cmd_http_rxbody(CMD_ARGS) vtc_log(hp->vl, 4, "bodylen = %s", hp->bodylen); } +static void +cmd_http_rxchunk(CMD_ARGS) +{ + struct http *hp; + int ll, i; + + (void)cmd; + (void)vl; + CAST_OBJ_NOTNULL(hp, priv, HTTP_MAGIC); + ONLY_CLIENT(hp, av); + + i = http_rxchunk(hp); + if (i == 0) { + ll = hp->rxbuf + hp->prxbuf - hp->body; + hp->bodyl = ll; + sprintf(hp->bodylen, "%d", ll); + vtc_log(hp->vl, 4, "bodylen = %s", hp->bodylen); + } +} + /********************************************************************** * Transmit a request */ @@ -1043,6 +1072,7 @@ static const struct cmds http_cmds[] = { { "rxreq", cmd_http_rxreq }, { "rxhdrs", cmd_http_rxhdrs }, + { "rxchunk", cmd_http_rxchunk }, { "rxbody", cmd_http_rxbody }, { "txresp", cmd_http_txresp }, From phk at varnish-cache.org Mon Apr 11 10:50:18 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 11 Apr 2011 12:50:18 +0200 Subject: [master] 4b9ac08 Add a "hole-through" path that does the trivial bit of streaming. Message-ID: commit 4b9ac086b43104be28ee09abf882592d20f2fb87 Author: Poul-Henning Kamp Date: Mon Apr 11 10:49:41 2011 +0000 Add a "hole-through" path that does the trivial bit of streaming. Now for all the hard bits... diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index d280bb1..a1ea70c 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -312,6 +312,9 @@ struct worker { unsigned do_close; char *h_content_length; + /* Stream state */ + ssize_t stream_next; + /* ESI stuff */ struct vep_state *vep; int gzip_resp; @@ -858,6 +861,7 @@ void RES_BuildHttp(struct sess *sp); void RES_WriteObj(struct sess *sp); void RES_StreamStart(struct sess *sp); void RES_StreamEnd(struct sess *sp); +void RES_StreamPoll(const struct sess *sp); /* cache_vary.c */ struct vsb *VRY_Create(const struct sess *sp, const struct http *hp); diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c index 78c7af8..87ce092 100644 --- a/bin/varnishd/cache_fetch.c +++ b/bin/varnishd/cache_fetch.c @@ -102,6 +102,8 @@ vfp_nop_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) st->len += w; sp->obj->len += w; bytes -= w; + if (sp->wrk->do_stream) + RES_StreamPoll(sp); } return (1); } diff --git a/bin/varnishd/cache_gzip.c b/bin/varnishd/cache_gzip.c index 7e389c9..a07eeeb 100644 --- a/bin/varnishd/cache_gzip.c +++ b/bin/varnishd/cache_gzip.c @@ -477,6 +477,8 @@ vfp_gunzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) i = VGZ_Gunzip(vg, &dp, &dl); assert(i == VGZ_OK || i == VGZ_END); sp->obj->len += dl; + if (sp->wrk->do_stream) + RES_StreamPoll(sp); } if (i == Z_OK || i == Z_STREAM_END) return (1); @@ -547,6 +549,8 @@ vfp_gzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) i = VGZ_Gzip(vg, &dp, &dl, VGZ_NORMAL); assert(i == Z_OK); sp->obj->len += dl; + if (sp->wrk->do_stream) + RES_StreamPoll(sp); } return (1); } @@ -623,6 +627,8 @@ vfp_testgzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) VGZ_Ibuf(vg, st->ptr + st->len, w); st->len += w; sp->obj->len += w; + if (sp->wrk->do_stream) + RES_StreamPoll(sp); while (!VGZ_IbufEmpty(vg)) { VGZ_Obuf(vg, ibuf, sizeof ibuf); diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c index 4771c54..2fbf120 100644 --- a/bin/varnishd/cache_response.c +++ b/bin/varnishd/cache_response.c @@ -270,7 +270,7 @@ res_WriteGunzipObj(struct sess *sp) } if (obufl) { (void)WRW_Write(sp->wrk, obuf, obufl); - WRW_Flush(sp->wrk); + (void)WRW_Flush(sp->wrk); } VGZ_Destroy(&vg); assert(u == sp->obj->len); @@ -413,19 +413,42 @@ RES_StreamStart(struct sess *sp) if (sp->wrk->res_mode & RES_CHUNKED) WRW_Chunked(sp->wrk); + + sp->wrk->stream_next = 0; +} + +void +RES_StreamPoll(const struct sess *sp) +{ + struct storage *st; + ssize_t l, l2; + void *ptr; + + if (sp->obj->len == sp->wrk->stream_next) + return; + assert(sp->obj->len > sp->wrk->stream_next); + l = 0; + VTAILQ_FOREACH(st, &sp->obj->store, list) { + if (st->len + l <= sp->wrk->stream_next) { + l += st->len; + continue; + } + l2 = st->len + l - sp->wrk->stream_next; + ptr = st->ptr + (sp->wrk->stream_next - l); + (void)WRW_Write(sp->wrk, ptr, l2); + l += st->len; + sp->wrk->stream_next += l2; + } + (void)WRW_Flush(sp->wrk); } void RES_StreamEnd(struct sess *sp) { - ssize_t low, high; if (sp->wrk->res_mode & RES_GUNZIP) { + INCOMPL(); res_WriteGunzipObj(sp); - } else { - low = 0; - high = sp->obj->len - 1; - res_WriteDirObj(sp, low, high); } if (sp->wrk->res_mode & RES_CHUNKED && !(sp->wrk->res_mode & RES_ESI_CHILD)) diff --git a/bin/varnishtest/tests/README b/bin/varnishtest/tests/README index 8b2ec15..48924a2 100644 --- a/bin/varnishtest/tests/README +++ b/bin/varnishtest/tests/README @@ -15,10 +15,14 @@ Naming scheme [id]%05d.vtc - id ~ [a] --> varnishtester(1) tests + id ~ [a] --> varnishtest(1) tests id ~ [b] --> Basic functionality tests id ~ [c] --> Complex functionality tests id ~ [e] --> ESI tests + id ~ [g] --> GZIP tests + id ~ [m] --> VMOD tests + id ~ [p] --> Persistent tests id ~ [r] --> Regression tests, same number as ticket id ~ [s] --> Slow tests, expiry, grace etc. + id ~ [t] --> sTreaming tests id ~ [v] --> VCL tests: execute VRT functions diff --git a/bin/varnishtest/tests/t00000.vtc b/bin/varnishtest/tests/t00000.vtc new file mode 100644 index 0000000..7116b42 --- /dev/null +++ b/bin/varnishtest/tests/t00000.vtc @@ -0,0 +1,50 @@ +# $Id$ + +test "Ticket #873" + +server s1 { + rxreq + txresp -nolen -hdr "Transfer-encoding: chunked" + chunked "<1>------------------------<1>\n" + sema r1 sync 2 + chunked "<2>------------------------<2>\n" + sema r2 sync 2 + chunked "<3>------------------------<3>\n" + sema r1 sync 2 + chunked "<4>------------------------<4>\n" + sema r2 sync 2 + chunkedlen 0 +} -start + +varnish v1 -vcl+backend { + sub vcl_fetch { + set beresp.do_stream = true; + } +} -start + +varnish v1 -cliok "param.set diag_bitmap 1" + +client c1 { + txreq -hdr "foo: /foo" + rxresp -no_obj + + rxchunk + expect resp.chunklen == 31 + sema r1 sync 2 + + rxchunk + expect resp.chunklen == 31 + sema r2 sync 2 + + rxchunk + expect resp.chunklen == 31 + sema r1 sync 2 + + rxchunk + expect resp.chunklen == 31 + sema r2 sync 2 + + rxchunk + expect resp.chunklen == 0 + expect resp.bodylen == 124 +} -run From phk at varnish-cache.org Tue Apr 12 11:57:22 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Tue, 12 Apr 2011 13:57:22 +0200 Subject: [master] 1ef6740 Don't go exponential in VSL Message-ID: commit 1ef67408352ed7350d7ea4e8da8d713c0a6429e0 Author: Poul-Henning Kamp Date: Tue Apr 12 11:56:00 2011 +0000 Don't go exponential in VSL diff --git a/bin/varnishd/rfc2616.c b/bin/varnishd/rfc2616.c index d581444..20d3b7c 100644 --- a/bin/varnishd/rfc2616.c +++ b/bin/varnishd/rfc2616.c @@ -170,7 +170,7 @@ RFC2616_Ttl(const struct sess *sp) } /* calculated TTL, Our time, Date, Expires, max-age, age */ - WSP(sp, SLT_TTL, "%u RFC %g %g %g %g %u %u", sp->xid, + WSP(sp, SLT_TTL, "%u RFC %g %.0f %.0f %.0f %u %u", sp->xid, ttl, sp->wrk->entered, h_date, h_expires, max_age, age); return (ttl); From phk at varnish-cache.org Tue Apr 12 11:57:23 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Tue, 12 Apr 2011 13:57:23 +0200 Subject: [master] 2c8505b VGZ_OK is acceptable at end of gzip objects. Message-ID: commit 2c8505ba39f2e7997efd6f5eb28cfb3cbb5c3822 Author: Poul-Henning Kamp Date: Tue Apr 12 11:56:34 2011 +0000 VGZ_OK is acceptable at end of gzip objects. Fixes #891 diff --git a/bin/varnishd/cache_gzip.c b/bin/varnishd/cache_gzip.c index a07eeeb..6a817c2 100644 --- a/bin/varnishd/cache_gzip.c +++ b/bin/varnishd/cache_gzip.c @@ -640,9 +640,9 @@ vfp_testgzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) } } } - if (i == Z_STREAM_END) + if (i == VGZ_OK || i == VGZ_END) return (1); - WSP(sp, SLT_FetchError, "Incomplete Gzip data (not STREAM_END)"); + WSP(sp, SLT_FetchError, "Gunzip trouble (%d)", i); return (-1); } From tfheen at varnish-cache.org Wed Apr 13 11:08:50 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Wed, 13 Apr 2011 13:08:50 +0200 Subject: [master] c6a24d7 Fix memory leak in time to first byte handling Message-ID: commit c6a24d71bb1a0354bd94f537507852b1cbe76bac Author: Tollef Fog Heen Date: Wed Apr 13 13:06:40 2011 +0200 Fix memory leak in time to first byte handling Fixes #898 Thanks to omes and vorpal for diagnosis and patch diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index 8367ba4..9a95ab5 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -219,6 +219,7 @@ clean_logline(struct logline *lp) freez(lp->df_m); freez(lp->df_s); freez(lp->df_u); + freez(lp->df_ttfb); #undef freez memset(lp, 0, sizeof *lp); } @@ -471,7 +472,7 @@ collect_client(struct logline *lp, enum vsl_tag tag, unsigned spec, char ttfb[64]; if (!lp->active) break; - if (sscanf(ptr, "%*u %*u.%*u %ld.%*u %*u.%*u %s", &l, ttfb) != 2) { + if (lp->df_ttfb != NULL || sscanf(ptr, "%*u %*u.%*u %ld.%*u %*u.%*u %s", &l, ttfb) != 2) { clean_logline(lp); break; } From tfheen at varnish-cache.org Wed Apr 13 11:08:51 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Wed, 13 Apr 2011 13:08:51 +0200 Subject: [master] aa10339 Fix memory leak on repeated headers Message-ID: commit aa1033975112a7a58d4d37cef646dc1cd51b7f95 Author: Tollef Fog Heen Date: Wed Apr 13 13:07:38 2011 +0200 Fix memory leak on repeated headers If there was more than one of the User-Agent, Referer, Authorization, X-Forwarded-For or Host header in a request, varnishncsa would leak some memory. We now just use the last value. diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index 9a95ab5..717e9e6 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -416,17 +416,23 @@ collect_client(struct logline *lp, enum vsl_tag tag, unsigned spec, case SLT_RxHeader: if (!lp->active) break; - if (isprefix(ptr, "user-agent:", end, &next)) + if (isprefix(ptr, "user-agent:", end, &next)) { + free(lp->df_User_agent); lp->df_User_agent = trimline(next, end); - else if (isprefix(ptr, "referer:", end, &next)) + } else if (isprefix(ptr, "referer:", end, &next)) { + free(lp->df_Referer); lp->df_Referer = trimline(next, end); - else if (isprefix(ptr, "authorization:", end, &next) && - isprefix(next, "basic", end, &next)) + } else if (isprefix(ptr, "authorization:", end, &next) && + isprefix(next, "basic", end, &next)) { + free(lp->df_u); lp->df_u = trimline(next, end); - else if (isprefix(ptr, "x-forwarded-for:", end, &next)) + } else if (isprefix(ptr, "x-forwarded-for:", end, &next)) { + free(lp->df_X_Forwarded_For); lp->df_X_Forwarded_For = trimline(next, end); - else if (isprefix(ptr, "host:", end, &next)) + } else if (isprefix(ptr, "host:", end, &next)) { + free(lp->df_Host); lp->df_Host = trimline(next, end); + } break; case SLT_VCL_call: From tfheen at varnish-cache.org Wed Apr 13 11:16:19 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Wed, 13 Apr 2011 13:16:19 +0200 Subject: [2.1] varnish-2.1.5-10-gfbee94e Message-ID: commit fbee94e1dd2edbefdfbed58a0f9d56c41a6c08fc Author: Tollef Fog Heen Date: Wed Apr 13 13:07:38 2011 +0200 Fix memory leak on repeated headers If there was more than one of the User-Agent, Referer, Authorization, X-Forwarded-For or Host header in a request, varnishncsa would leak some memory. We now just use the last value. diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index 566a269..dd9f43a 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -366,17 +366,23 @@ collect_client(struct logline *lp, enum shmlogtag tag, unsigned spec, case SLT_RxHeader: if(!lp->active) break; - if (isprefix(ptr, "user-agent:", end, &next)) + if (isprefix(ptr, "user-agent:", end, &next)) { + free(lp->df_User_agent); lp->df_User_agent = trimline(next, end); - else if (isprefix(ptr, "referer:", end, &next)) + } else if (isprefix(ptr, "referer:", end, &next)) { + free(lp->df_Referer); lp->df_Referer = trimline(next, end); - else if (isprefix(ptr, "authorization:", end, &next) && - isprefix(next, "basic", end, &next)) + } else if (isprefix(ptr, "authorization:", end, &next) && + isprefix(next, "basic", end, &next)) { + free(lp->df_u); lp->df_u = trimline(next, end); - else if (isprefix(ptr, "x-forwarded-for:", end, &next)) + } else if (isprefix(ptr, "x-forwarded-for:", end, &next)) { + free(lp->df_X_Forwarded_For); lp->df_X_Forwarded_For = trimline(next, end); - else if (isprefix(ptr, "host:", end, &next)) + } else if (isprefix(ptr, "host:", end, &next)) { + free(lp->df_Host); lp->df_Host = trimline(next, end); + } break; case SLT_Length: From tfheen at varnish-cache.org Wed Apr 13 13:01:43 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Wed, 13 Apr 2011 15:01:43 +0200 Subject: [2.1] varnish-2.1.5-11-gb3fe835 Message-ID: commit b3fe83574776b005ec028c700a2ab94eb5a65574 Author: Tollef Fog Heen Date: Wed Apr 13 14:59:51 2011 +0200 Fix formatting of broken Authorization headers in varnishncsa varnishncsa would format an authorization headers like Authorization: Basic as 127.0.0.1 - [?] rather than 127.0.0.1 - - [?] diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index dd9f43a..4adf60b 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -499,7 +499,7 @@ h_ncsa(void *priv, enum shmlogtag tag, unsigned fd, q = strchr(rubuf, ':'); if (q != NULL) *q = '\0'; - fprintf(fo, "%s ", rubuf); + fprintf(fo, "%s ", (rubuf[0] != '\0' ? rubuf : "-")); free(rubuf); } else { fprintf(fo, "- "); From tfheen at varnish-cache.org Wed Apr 13 13:02:33 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Wed, 13 Apr 2011 15:02:33 +0200 Subject: [2.1] varnish-2.1.5-11-g59bab9f Message-ID: commit 59bab9f19ae226fe0c553a202b66d630cf5f32ef Author: Tollef Fog Heen Date: Wed Apr 13 14:59:51 2011 +0200 Fix formatting of broken Authorization headers in varnishncsa varnishncsa would format an authorization headers like Authorization: Basic as 127.0.0.1 - [?] rather than 127.0.0.1 - - [?] Fixes #868 diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index dd9f43a..4adf60b 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -499,7 +499,7 @@ h_ncsa(void *priv, enum shmlogtag tag, unsigned fd, q = strchr(rubuf, ':'); if (q != NULL) *q = '\0'; - fprintf(fo, "%s ", rubuf); + fprintf(fo, "%s ", (rubuf[0] != '\0' ? rubuf : "-")); free(rubuf); } else { fprintf(fo, "- "); From tfheen at varnish-cache.org Wed Apr 13 13:02:35 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Wed, 13 Apr 2011 15:02:35 +0200 Subject: [2.1] varnish-2.1.5-13-g9dcad6a Message-ID: commit 9dcad6a5ac111bdca3c0a9578b5a49a2f55469c0 Merge: 59bab9f b3fe835 Author: Tollef Fog Heen Date: Wed Apr 13 15:02:21 2011 +0200 Merge branch '2.1' of ssh://git.varnish-cache.org/git/varnish-cache into 2.1 From tfheen at varnish-cache.org Fri Apr 15 06:25:35 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Fri, 15 Apr 2011 08:25:35 +0200 Subject: [master] 3b48594 Fix TCP_Check for NetBSD/EINVAL Message-ID: commit 3b4859455803b606107c07b25b784372d5665a1f Author: Daniel Bilik Date: Fri Apr 15 08:24:05 2011 +0200 Fix TCP_Check for NetBSD/EINVAL NetBSD returns EINVAL when the other end unexpectedly shuts down the connection, the same as Solaris, but on NetBSD it is documented. diff --git a/include/libvarnish.h b/include/libvarnish.h index f89a763..fb028d7 100644 --- a/include/libvarnish.h +++ b/include/libvarnish.h @@ -56,10 +56,10 @@ int SUB_run(struct vsb *sb, sub_func_f *func, void *priv, const char *name, #define TCP_ADDRBUFSIZE 64 #define TCP_PORTBUFSIZE 16 -#if defined (__SVR4) && defined (__sun) +#if (defined (__SVR4) && defined (__sun)) || defined (__NetBSD__) /* * Solaris returns EINVAL if the other end unexepectedly reset the - * connection. This is a bug in Solaris. + * connection. This is a bug in Solaris and documented behaviour on NetBSD. */ #define TCP_Check(a) ((a) == 0 || errno == ECONNRESET || errno == ENOTCONN \ || errno == EINVAL) From tfheen at varnish-cache.org Fri Apr 15 13:15:20 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Fri, 15 Apr 2011 15:15:20 +0200 Subject: [master] d75d6d2 Don't require initscripts on SUSE Message-ID: commit d75d6d2b8c8725b965216d78eec01afe5035432b Author: Tollef Fog Heen Date: Fri Apr 15 15:09:17 2011 +0200 Don't require initscripts on SUSE Fixes #825 diff --git a/redhat/varnish.spec b/redhat/varnish.spec index 13e628e..46072af 100644 --- a/redhat/varnish.spec +++ b/redhat/varnish.spec @@ -20,7 +20,9 @@ Requires(pre): shadow-utils Requires(post): /sbin/chkconfig, /usr/bin/uuidgen Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service +%if %{undefined suse_version} Requires(preun): initscripts +%endif # Varnish actually needs gcc installed to work. It uses the C compiler # at runtime to compile the VCL configuration files. This is by design. From phk at varnish-cache.org Mon Apr 18 08:09:43 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 18 Apr 2011 10:09:43 +0200 Subject: [master] 9ee9923 Fix a problem in http_CollectHdr() where it would overlook the second of two headers in a row. Message-ID: commit 9ee99237d6a3d6b584d6b2e5af32006a2af06284 Author: Poul-Henning Kamp Date: Mon Apr 18 08:09:09 2011 +0000 Fix a problem in http_CollectHdr() where it would overlook the second of two headers in a row. Fixes #902 diff --git a/bin/varnishd/cache_http.c b/bin/varnishd/cache_http.c index b8cdb3a..3a7935b 100644 --- a/bin/varnishd/cache_http.c +++ b/bin/varnishd/cache_http.c @@ -189,44 +189,44 @@ http_CollectHdr(struct http *hp, const char *hdr) char *b = NULL, *e = NULL; for (u = HTTP_HDR_FIRST; u < hp->nhd; u++) { - Tcheck(hp->hd[u]); - if (!http_IsHdr(&hp->hd[u], hdr)) - continue; - if (f == 0) { - /* Found first header, just record the fact */ - f = u; - continue; - } - if (b == NULL) { - /* Found second header */ - ml = WS_Reserve(hp->ws, 0); - b = hp->ws->f; - e = b + ml; - x = Tlen(hp->hd[f]); + while (u < hp->nhd && http_IsHdr(&hp->hd[u], hdr)) { + Tcheck(hp->hd[u]); + if (f == 0) { + /* Found first header, just record the fact */ + f = u; + break; + } + if (b == NULL) { + /* Found second header, start our collection */ + ml = WS_Reserve(hp->ws, 0); + b = hp->ws->f; + e = b + ml; + x = Tlen(hp->hd[f]); + if (b + x < e) { + memcpy(b, hp->hd[f].b, x); + b += x; + } else + b = e; + } + + AN(b); + AN(e); + + /* Append the Nth header we found */ + if (b < e) + *b++ = ','; + x = Tlen(hp->hd[u]) - *hdr; if (b + x < e) { - memcpy(b, hp->hd[f].b, x); + memcpy(b, hp->hd[u].b + *hdr, x); b += x; } else b = e; - } - AN(b); - AN(e); - - /* Append the Nth header we found */ - if (b < e) - *b++ = ','; - x = Tlen(hp->hd[u]) - *hdr; - if (b + x < e) { - memcpy(b, hp->hd[u].b + *hdr, x); - b += x; - } else - b = e; - - /* Shift remaining headers up one slot */ - for (v = u; v < hp->nhd + 1; v++) - hp->hd[v] = hp->hd[v + 1]; - hp->nhd--; + /* Shift remaining headers up one slot */ + for (v = u; v < hp->nhd - 1; v++) + hp->hd[v] = hp->hd[v + 1]; + hp->nhd--; + } } if (b == NULL) diff --git a/bin/varnishtest/tests/r00902.vtc b/bin/varnishtest/tests/r00902.vtc new file mode 100644 index 0000000..e082529 --- /dev/null +++ b/bin/varnishtest/tests/r00902.vtc @@ -0,0 +1,27 @@ +# $Id$ + +test "Ticket #902 http_CollectHdr() failure on consequitive headers" + +server s1 { + rxreq + txresp \ + -hdr "Server: Microsoft-IIS/5.0" \ + -hdr "Cache-Control: A" \ + -hdr "Cache-Control: B" \ + -hdr "Cache-Control: C" \ + -hdr "Cache-Control: D" \ + -hdr "Foo: bar" \ + -bodylen 5 +} -start + +varnish v1 -vcl+backend { +} -start + +varnish v1 -cliok "param.set diag_bitmap 1" + +client c1 { + txreq -hdr "foo: /foo" + rxresp + expect resp.http.cache-control == "A, B, C, D" + expect resp.http.foo == "bar" +} -run From phk at varnish-cache.org Mon Apr 18 10:39:31 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 18 Apr 2011 12:39:31 +0200 Subject: [master] aa11a71 Fix totally bogus file comments. Message-ID: commit aa11a719eddb82c2336f5f807acd7431c87363d7 Author: Poul-Henning Kamp Date: Mon Apr 18 10:09:39 2011 +0000 Fix totally bogus file comments. diff --git a/bin/varnishd/cache_wrw.c b/bin/varnishd/cache_wrw.c index 2340aa3..8b79347 100644 --- a/bin/varnishd/cache_wrw.c +++ b/bin/varnishd/cache_wrw.c @@ -26,18 +26,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * We maintain a number of worker thread pools, to spread lock contention. - * - * Pools can be added on the fly, as a means to mitigate lock contention, - * but can only be removed again by a restart. (XXX: we could fix that) - * - * Two threads herd the pools, one eliminates idle threads and aggregates - * statistics for all the pools, the other thread creates new threads - * on demand, subject to various numerical constraints. - * - * The algorithm for when to create threads needs to be reactive enough - * to handle startup spikes, but sufficiently attenuated to not cause - * thread pileups. This remains subject for improvement. + * Write data to fd + * We try to use writev() if possible in order to minimize number of + * syscalls made and packets sent. It also just might allow the worker + * thread to complete the request without holding stuff locked. */ #include "config.h" @@ -64,10 +56,6 @@ SVNID("$Id$") #include "cache.h" /*-------------------------------------------------------------------- - * Write data to fd - * We try to use writev() if possible in order to minimize number of - * syscalls made and packets sent. It also just might allow the worker - * thread to complete the request without holding stuff locked. */ void From phk at varnish-cache.org Mon Apr 18 10:39:32 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 18 Apr 2011 12:39:32 +0200 Subject: [master] 6400876 64 bit fix Message-ID: commit 640087625620b9d3520376aff920364c8f35d4fc Author: Poul-Henning Kamp Date: Mon Apr 18 10:12:09 2011 +0000 64 bit fix diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c index 2fbf120..fb5e752 100644 --- a/bin/varnishd/cache_response.c +++ b/bin/varnishd/cache_response.c @@ -279,9 +279,9 @@ res_WriteGunzipObj(struct sess *sp) /*--------------------------------------------------------------------*/ static void -res_WriteDirObj(struct sess *sp, size_t low, size_t high) +res_WriteDirObj(struct sess *sp, ssize_t low, ssize_t high) { - unsigned u = 0; + ssize_t u = 0; size_t ptr, off, len; struct storage *st; From phk at varnish-cache.org Mon Apr 18 10:39:33 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 18 Apr 2011 12:39:33 +0200 Subject: [master] 85f5706 Add a parameter to limit how big chunks we attempt to allocate from storage. Asking for more than 256M at a time will not actually improve performance and is quite likely to hurt it. Message-ID: commit 85f57069f70fc56d6e2c351539ef322be96dafc0 Author: Poul-Henning Kamp Date: Mon Apr 18 10:25:42 2011 +0000 Add a parameter to limit how big chunks we attempt to allocate from storage. Asking for more than 256M at a time will not actually improve performance and is quite likely to hurt it. diff --git a/bin/varnishd/heritage.h b/bin/varnishd/heritage.h index c1a251f..b45e5ee 100644 --- a/bin/varnishd/heritage.h +++ b/bin/varnishd/heritage.h @@ -118,6 +118,7 @@ struct params { /* Fetcher hints */ unsigned fetch_chunksize; + unsigned fetch_maxchunksize; #ifdef SENDFILE_WORKS /* Sendfile object minimum size */ diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c index d0e9c20..7c5a328 100644 --- a/bin/varnishd/mgt_param.c +++ b/bin/varnishd/mgt_param.c @@ -629,6 +629,13 @@ static const struct parspec input_parspec[] = { "above 128kb a dubious idea.", EXPERIMENTAL, "128", "kilobytes" }, + { "fetch_maxchunksize", + tweak_uint, &master.fetch_maxchunksize, 64, UINT_MAX / 1024., + "The maximum chunksize we attempt to allocate from storage. " + "Making this too large may cause delays and storage " + "fragmentation.\n", + EXPERIMENTAL, + "262144", "kilobytes" }, #ifdef SENDFILE_WORKS { "sendfile_threshold", tweak_uint, &master.sendfile_threshold, 0, UINT_MAX, diff --git a/bin/varnishd/stevedore.c b/bin/varnishd/stevedore.c index 5344bac..8ee4040 100644 --- a/bin/varnishd/stevedore.c +++ b/bin/varnishd/stevedore.c @@ -171,6 +171,9 @@ stv_alloc(const struct sess *sp, size_t size) } CHECK_OBJ_NOTNULL(stv, STEVEDORE_MAGIC); + if (size > (size_t)(params->fetch_maxchunksize) << 10) + size = (size_t)(params->fetch_maxchunksize) << 10; + for (;;) { /* try to allocate from it */ AN(stv->alloc); From phk at varnish-cache.org Mon Apr 18 10:39:33 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Mon, 18 Apr 2011 12:39:33 +0200 Subject: [master] d046301 Fix a couple of printfs to be 64/intmax correct. Message-ID: commit d04630124946b33bbd6da2853317844c87f96a3a Author: Poul-Henning Kamp Date: Mon Apr 18 10:30:54 2011 +0000 Fix a couple of printfs to be 64/intmax correct. diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index 1c1118c..691187c 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -325,7 +325,7 @@ cnt_done(struct sess *sp) da = sp->t_end - sp->t_resp; dh = sp->t_req - sp->t_open; /* XXX: Add StatReq == StatSess */ - WSP(sp, SLT_Length, "%u", sp->acct_req.bodybytes); + WSP(sp, SLT_Length, "%ju", (uintmax_t)sp->acct_req.bodybytes); WSL(sp->wrk, SLT_ReqEnd, sp->id, "%u %.9f %.9f %.9f %.9f %.9f", sp->xid, sp->t_req, sp->t_end, dh, dp, da); } diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c index 87ce092..488575d 100644 --- a/bin/varnishd/cache_fetch.c +++ b/bin/varnishd/cache_fetch.c @@ -585,7 +585,7 @@ FetchBody(struct sess *sp) if (mklen > 0) { http_Unset(sp->obj->http, H_Content_Length); http_PrintfHeader(sp->wrk, sp->fd, sp->obj->http, - "Content-Length: %u", sp->obj->len); + "Content-Length: %jd", (intmax_t)sp->obj->len); } if (cls) From phk at varnish-cache.org Wed Apr 20 10:35:38 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 20 Apr 2011 12:35:38 +0200 Subject: [master] 9d5ca14 White-space fixups Message-ID: commit 9d5ca140785c40197988f731920831ea4d6fe19f Author: Poul-Henning Kamp Date: Wed Apr 20 09:52:25 2011 +0000 White-space fixups diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index 691187c..671cf9f 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -535,8 +535,8 @@ cnt_fetch(struct sess *sp) /* * Figure out how the fetch is supposed to happen, before the * headers are adultered by VCL - * NB: Also sets other sp->wrk variables - */ + * NB: Also sets other sp->wrk variables + */ sp->wrk->body_status = RFC2616_Body(sp); sp->err_code = http_GetStatus(sp->wrk->beresp); diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c index 488575d..dfa43cc 100644 --- a/bin/varnishd/cache_fetch.c +++ b/bin/varnishd/cache_fetch.c @@ -538,7 +538,7 @@ FetchBody(struct sess *sp) INCOMPL(); } AZ(sp->wrk->vgz_rx); - + /* * It is OK for ->end to just leave the last storage segment * sitting on sp->wrk->storage, we will always call vfp_nop_end() diff --git a/bin/varnishd/mgt_sandbox.c b/bin/varnishd/mgt_sandbox.c index c6ec1e8..9f6d343 100644 --- a/bin/varnishd/mgt_sandbox.c +++ b/bin/varnishd/mgt_sandbox.c @@ -106,7 +106,7 @@ mgt_sandbox(void) */ priv_addset(minimal, "net_access"); -#define SETPPRIV(which, set) \ +#define SETPPRIV(which, set) \ if (setppriv(PRIV_SET, which, set)) \ REPORT0(LOG_ERR, \ "Waiving privileges failed on " #which) diff --git a/bin/varnishd/rfc2616.c b/bin/varnishd/rfc2616.c index 20d3b7c..a871ae3 100644 --- a/bin/varnishd/rfc2616.c +++ b/bin/varnishd/rfc2616.c @@ -167,7 +167,7 @@ RFC2616_Ttl(const struct sess *sp) ttl = (int)(h_expires - h_date); } - } + } /* calculated TTL, Our time, Date, Expires, max-age, age */ WSP(sp, SLT_TTL, "%u RFC %g %.0f %.0f %.0f %u %u", sp->xid, diff --git a/bin/varnishd/storage_persistent_silo.c b/bin/varnishd/storage_persistent_silo.c index 12de04a..9635628 100644 --- a/bin/varnishd/storage_persistent_silo.c +++ b/bin/varnishd/storage_persistent_silo.c @@ -433,7 +433,7 @@ smp_oc_getobj(struct worker *wrk, struct objcore *oc) if(bad) { EXP_Set_ttl(&o->exp, -1); so->ttl = 0; - } + } sg->nfixed++; wrk->stats.n_object++; diff --git a/bin/varnishd/vsm.c b/bin/varnishd/vsm.c index 92c3830..3771aab 100644 --- a/bin/varnishd/vsm.c +++ b/bin/varnishd/vsm.c @@ -33,7 +33,7 @@ * The VSM studying programs only have read-only access to the VSM * so everybody else must use memory barriers, stable storage and * similar tricks to keep the VSM image in sync (long enough) for - * the studying programs. + * the studying programs. * * Manager process vs child process. * Will only muck about in VSM when child process is not running diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c index c2066b0..d53e991 100644 --- a/bin/varnishtest/vtc_main.c +++ b/bin/varnishtest/vtc_main.c @@ -340,7 +340,7 @@ main(int argc, char * const *argv) switch (ch) { case 'D': if (!parse_D_opt(optarg)) { - fprintf(stderr, "Cannot parse D opt '%s'\n", + fprintf(stderr, "Cannot parse D opt '%s'\n", optarg); exit(2); } diff --git a/include/vsm.h b/include/vsm.h index caaae06..2beb530 100644 --- a/include/vsm.h +++ b/include/vsm.h @@ -92,7 +92,7 @@ vsm_iter_0(void) CHECK_OBJ_NOTNULL(&vsm_head->head, VSM_CHUNK_MAGIC); return (&vsm_head->head); } - + static inline void vsm_iter_n(struct vsm_chunk **pp) { From phk at varnish-cache.org Wed Apr 20 10:35:39 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 20 Apr 2011 12:35:39 +0200 Subject: [master] 6f038c1 Remove $Id$ from the source code, git does not support it. Message-ID: commit 6f038c18768b6dd524c392ebe2765b06f5650b27 Author: Poul-Henning Kamp Date: Wed Apr 20 10:35:13 2011 +0000 Remove $Id$ from the source code, git does not support it. diff --git a/Makefile.am b/Makefile.am index 4797573..802c91e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# ACLOCAL_AMFLAGS = -I m4 diff --git a/autogen.des b/autogen.des index 0c272bc..1bed874 100755 --- a/autogen.des +++ b/autogen.des @@ -1,7 +1,6 @@ #!/bin/sh # -# $Id$ -# +# Use this when doing code development set -ex diff --git a/autogen.sh b/autogen.sh index 53d0f73..07df626 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,5 @@ #!/bin/sh # -# $Id$ -# warn() { echo "WARNING: $@" 1>&2 diff --git a/bin/Makefile.am b/bin/Makefile.am index c081ea8..7bdddbb 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# SUBDIRS = varnishadm varnishd varnishlog varnishncsa varnishreplay varnishtest diff --git a/bin/flint.lnt b/bin/flint.lnt index e510817..b10ceba 100644 --- a/bin/flint.lnt +++ b/bin/flint.lnt @@ -9,8 +9,6 @@ +libh ../../config.h -efile(451, ../../config.h) // No include guard --esym(528, svnid) // Sym not ref - -efile(451, vsl_tags.h) // No include guard -efile(451, vsc_fields.h) // No include guard diff --git a/bin/varnishadm/Makefile.am b/bin/varnishadm/Makefile.am index 2717acb..03fb471 100644 --- a/bin/varnishadm/Makefile.am +++ b/bin/varnishadm/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c index 8d98181..f280b31 100644 --- a/bin/varnishadm/varnishadm.c +++ b/bin/varnishadm/varnishadm.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/Makefile.am b/bin/varnishd/Makefile.am index 1ca60b9..f293d09 100644 --- a/bin/varnishd/Makefile.am +++ b/bin/varnishd/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = \ -I$(top_srcdir)/include \ diff --git a/bin/varnishd/acct_fields.h b/bin/varnishd/acct_fields.h index 36dbe58..35565ab 100644 --- a/bin/varnishd/acct_fields.h +++ b/bin/varnishd/acct_fields.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * These are the stats we keep track of per session. They will be summed, * via the sp->wrk->stats into the s_ fields in the SHM file. * NB: Remember to mark those in vsc_fields.h to be included in struct dstat. diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h index a1ea70c..7e9c0d9 100644 --- a/bin/varnishd/cache.h +++ b/bin/varnishd/cache.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ /* diff --git a/bin/varnishd/cache_acceptor.c b/bin/varnishd/cache_acceptor.c index 4bdb9ff..264cfc0 100644 --- a/bin/varnishd/cache_acceptor.c +++ b/bin/varnishd/cache_acceptor.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_backend.c b/bin/varnishd/cache_backend.c index 93f4a77..8f2ebb8 100644 --- a/bin/varnishd/cache_backend.c +++ b/bin/varnishd/cache_backend.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_backend.h b/bin/varnishd/cache_backend.h index a437256..37796d4 100644 --- a/bin/varnishd/cache_backend.h +++ b/bin/varnishd/cache_backend.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * This is the central switch-board for backend connections and it is * slightly complicated by a number of optimizations. * diff --git a/bin/varnishd/cache_backend_cfg.c b/bin/varnishd/cache_backend_cfg.c index 15dcc80..2e54fd5 100644 --- a/bin/varnishd/cache_backend_cfg.c +++ b/bin/varnishd/cache_backend_cfg.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_backend_poll.c b/bin/varnishd/cache_backend_poll.c index abd5ccc..543840a 100644 --- a/bin/varnishd/cache_backend_poll.c +++ b/bin/varnishd/cache_backend_poll.c @@ -37,9 +37,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_backend_poll.h b/bin/varnishd/cache_backend_poll.h index 270f0ac..2612916 100644 --- a/bin/varnishd/cache_backend_poll.h +++ b/bin/varnishd/cache_backend_poll.h @@ -25,8 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * */ BITMAP(good_ipv4, '4', "Good IPv4", 0) diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c index 0d27bbc..2ba366c 100644 --- a/bin/varnishd/cache_ban.c +++ b/bin/varnishd/cache_ban.c @@ -42,9 +42,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/cache_ban.h b/bin/varnishd/cache_ban.h index a93b368..700bc12 100644 --- a/bin/varnishd/cache_ban.h +++ b/bin/varnishd/cache_ban.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * */ struct ban_test; diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c index 671cf9f..de7632a 100644 --- a/bin/varnishd/cache_center.c +++ b/bin/varnishd/cache_center.c @@ -57,9 +57,6 @@ DOT acceptor -> start [style=bold,color=green] #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_cli.c b/bin/varnishd/cache_cli.c index 056a63c..0ea5ba7 100644 --- a/bin/varnishd/cache_cli.c +++ b/bin/varnishd/cache_cli.c @@ -37,9 +37,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_dir.c b/bin/varnishd/cache_dir.c index 615ab87..f27f4f7 100644 --- a/bin/varnishd/cache_dir.c +++ b/bin/varnishd/cache_dir.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include "cache.h" #include "cache_backend.h" diff --git a/bin/varnishd/cache_dir_dns.c b/bin/varnishd/cache_dir_dns.c index 791cd31..b457d05 100644 --- a/bin/varnishd/cache_dir_dns.c +++ b/bin/varnishd/cache_dir_dns.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/cache_dir_random.c b/bin/varnishd/cache_dir_random.c index 9727232..eb415b9 100644 --- a/bin/varnishd/cache_dir_random.c +++ b/bin/varnishd/cache_dir_random.c @@ -41,9 +41,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/cache_dir_round_robin.c b/bin/varnishd/cache_dir_round_robin.c index e8615ac..70cac97 100644 --- a/bin/varnishd/cache_dir_round_robin.c +++ b/bin/varnishd/cache_dir_round_robin.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/cache_esi_deliver.c b/bin/varnishd/cache_esi_deliver.c index 6e82db1..c06679e 100644 --- a/bin/varnishd/cache_esi_deliver.c +++ b/bin/varnishd/cache_esi_deliver.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id") - #include #include diff --git a/bin/varnishd/cache_esi_fetch.c b/bin/varnishd/cache_esi_fetch.c index 8c94460..9dbb501 100644 --- a/bin/varnishd/cache_esi_fetch.c +++ b/bin/varnishd/cache_esi_fetch.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id") - #include #include diff --git a/bin/varnishd/cache_esi_parse.c b/bin/varnishd/cache_esi_parse.c index d8d4f88..856d63d 100644 --- a/bin/varnishd/cache_esi_parse.c +++ b/bin/varnishd/cache_esi_parse.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id") - #include #include diff --git a/bin/varnishd/cache_expire.c b/bin/varnishd/cache_expire.c index ec6ff66..f758053 100644 --- a/bin/varnishd/cache_expire.c +++ b/bin/varnishd/cache_expire.c @@ -39,9 +39,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c index dfa43cc..abd9e32 100644 --- a/bin/varnishd/cache_fetch.c +++ b/bin/varnishd/cache_fetch.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_gzip.c b/bin/varnishd/cache_gzip.c index 6a817c2..60e296d 100644 --- a/bin/varnishd/cache_gzip.c +++ b/bin/varnishd/cache_gzip.c @@ -68,9 +68,6 @@ #include #include -#include "svnid.h" -SVNID("$Id$") - #include "vsl.h" #include "cache.h" #include "stevedore.h" diff --git a/bin/varnishd/cache_hash.c b/bin/varnishd/cache_hash.c index 21007b5..249e1a7 100644 --- a/bin/varnishd/cache_hash.c +++ b/bin/varnishd/cache_hash.c @@ -52,9 +52,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_http.c b/bin/varnishd/cache_http.c index 3a7935b..fc03c1a 100644 --- a/bin/varnishd/cache_http.c +++ b/bin/varnishd/cache_http.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_httpconn.c b/bin/varnishd/cache_httpconn.c index 9f2640b..514aa3d 100644 --- a/bin/varnishd/cache_httpconn.c +++ b/bin/varnishd/cache_httpconn.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_lck.c b/bin/varnishd/cache_lck.c index 831ef7b..acb173a 100644 --- a/bin/varnishd/cache_lck.c +++ b/bin/varnishd/cache_lck.c @@ -35,9 +35,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/cache_main.c b/bin/varnishd/cache_main.c index 3387e9e..afd8265 100644 --- a/bin/varnishd/cache_main.c +++ b/bin/varnishd/cache_main.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_panic.c b/bin/varnishd/cache_panic.c index 55efa7a..f44584f 100644 --- a/bin/varnishd/cache_panic.c +++ b/bin/varnishd/cache_panic.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_pipe.c b/bin/varnishd/cache_pipe.c index 2658bb7..73d03e8 100644 --- a/bin/varnishd/cache_pipe.c +++ b/bin/varnishd/cache_pipe.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_pool.c b/bin/varnishd/cache_pool.c index 5b52934..f701442 100644 --- a/bin/varnishd/cache_pool.c +++ b/bin/varnishd/cache_pool.c @@ -42,9 +42,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c index fb5e752..5ff645c 100644 --- a/bin/varnishd/cache_response.c +++ b/bin/varnishd/cache_response.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/cache_session.c b/bin/varnishd/cache_session.c index 17d228d..05aaf19 100644 --- a/bin/varnishd/cache_session.c +++ b/bin/varnishd/cache_session.c @@ -40,9 +40,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_shmlog.c b/bin/varnishd/cache_shmlog.c index 62d6f92..dad28b6 100644 --- a/bin/varnishd/cache_shmlog.c +++ b/bin/varnishd/cache_shmlog.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_vary.c b/bin/varnishd/cache_vary.c index 3a4fa59..28ee29f 100644 --- a/bin/varnishd/cache_vary.c +++ b/bin/varnishd/cache_vary.c @@ -54,9 +54,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_vcl.c b/bin/varnishd/cache_vcl.c index d467661..0b25346 100644 --- a/bin/varnishd/cache_vcl.c +++ b/bin/varnishd/cache_vcl.c @@ -33,9 +33,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_vrt.c b/bin/varnishd/cache_vrt.c index 7c7e107..0d66435 100644 --- a/bin/varnishd/cache_vrt.c +++ b/bin/varnishd/cache_vrt.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/cache_vrt_re.c b/bin/varnishd/cache_vrt_re.c index 27d2b4c..97d657c 100644 --- a/bin/varnishd/cache_vrt_re.c +++ b/bin/varnishd/cache_vrt_re.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/cache_vrt_var.c b/bin/varnishd/cache_vrt_var.c index b9b99a9..ec82a06 100644 --- a/bin/varnishd/cache_vrt_var.c +++ b/bin/varnishd/cache_vrt_var.c @@ -30,9 +30,6 @@ */ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_vrt_vmod.c b/bin/varnishd/cache_vrt_vmod.c index 77e37e7..4ba4ca8 100644 --- a/bin/varnishd/cache_vrt_vmod.c +++ b/bin/varnishd/cache_vrt_vmod.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_waiter.h b/bin/varnishd/cache_waiter.h index b69981c..257a70b 100644 --- a/bin/varnishd/cache_waiter.h +++ b/bin/varnishd/cache_waiter.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ struct sess; diff --git a/bin/varnishd/cache_waiter_epoll.c b/bin/varnishd/cache_waiter_epoll.c index 52ff001..76d06f2 100644 --- a/bin/varnishd/cache_waiter_epoll.c +++ b/bin/varnishd/cache_waiter_epoll.c @@ -33,9 +33,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #if defined(HAVE_EPOLL_CTL) #include diff --git a/bin/varnishd/cache_waiter_kqueue.c b/bin/varnishd/cache_waiter_kqueue.c index ed8451e..b185592 100644 --- a/bin/varnishd/cache_waiter_kqueue.c +++ b/bin/varnishd/cache_waiter_kqueue.c @@ -33,9 +33,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #if defined(HAVE_KQUEUE) #include diff --git a/bin/varnishd/cache_waiter_poll.c b/bin/varnishd/cache_waiter_poll.c index 46b1525..6635cf2 100644 --- a/bin/varnishd/cache_waiter_poll.c +++ b/bin/varnishd/cache_waiter_poll.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_waiter_ports.c b/bin/varnishd/cache_waiter_ports.c index a3fe421..0858c67 100644 --- a/bin/varnishd/cache_waiter_ports.c +++ b/bin/varnishd/cache_waiter_ports.c @@ -31,8 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") #if defined(HAVE_PORT_CREATE) #include diff --git a/bin/varnishd/cache_wrw.c b/bin/varnishd/cache_wrw.c index 8b79347..10fe645 100644 --- a/bin/varnishd/cache_wrw.c +++ b/bin/varnishd/cache_wrw.c @@ -34,9 +34,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/cache_ws.c b/bin/varnishd/cache_ws.c index 62133d4..10f96ba 100644 --- a/bin/varnishd/cache_ws.c +++ b/bin/varnishd/cache_ws.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/common.h b/bin/varnishd/common.h index d17eca8..ae3ec16 100644 --- a/bin/varnishd/common.h +++ b/bin/varnishd/common.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ struct cli; diff --git a/bin/varnishd/default.vcl b/bin/varnishd/default.vcl index 919e651..3681ffe 100644 --- a/bin/varnishd/default.vcl +++ b/bin/varnishd/default.vcl @@ -26,8 +26,6 @@ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ - * * The default VCL code. * * NB! You do NOT need to copy & paste all of these functions into your diff --git a/bin/varnishd/hash_classic.c b/bin/varnishd/hash_classic.c index 0bee770..4b7c928 100644 --- a/bin/varnishd/hash_classic.c +++ b/bin/varnishd/hash_classic.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/hash_critbit.c b/bin/varnishd/hash_critbit.c index 21f2e5a..a5ad526 100644 --- a/bin/varnishd/hash_critbit.c +++ b/bin/varnishd/hash_critbit.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/hash_simple_list.c b/bin/varnishd/hash_simple_list.c index 3c538d4..811aa8a 100644 --- a/bin/varnishd/hash_simple_list.c +++ b/bin/varnishd/hash_simple_list.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/hash_slinger.h b/bin/varnishd/hash_slinger.h index d5e81e3..65367ad 100644 --- a/bin/varnishd/hash_slinger.h +++ b/bin/varnishd/hash_slinger.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ struct sess; diff --git a/bin/varnishd/heritage.h b/bin/varnishd/heritage.h index b45e5ee..2198b59 100644 --- a/bin/varnishd/heritage.h +++ b/bin/varnishd/heritage.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * This file contains the heritage passed when mgt forks cache */ diff --git a/bin/varnishd/locks.h b/bin/varnishd/locks.h index ec56832..1ca024f 100644 --- a/bin/varnishd/locks.h +++ b/bin/varnishd/locks.h @@ -25,7 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ /*lint -save -e525 -e539 */ diff --git a/bin/varnishd/mgt.h b/bin/varnishd/mgt.h index d4ecc47..7e03657 100644 --- a/bin/varnishd/mgt.h +++ b/bin/varnishd/mgt.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #include diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c index df8c77f..a7c91a4 100644 --- a/bin/varnishd/mgt_child.c +++ b/bin/varnishd/mgt_child.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/mgt_cli.c b/bin/varnishd/mgt_cli.c index 7618e97..aed41b1 100644 --- a/bin/varnishd/mgt_cli.c +++ b/bin/varnishd/mgt_cli.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/mgt_cli.h b/bin/varnishd/mgt_cli.h index f7a1797..9eef792 100644 --- a/bin/varnishd/mgt_cli.h +++ b/bin/varnishd/mgt_cli.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ /* mgt_child.c */ diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c index 7c5a328..72e5939 100644 --- a/bin/varnishd/mgt_param.c +++ b/bin/varnishd/mgt_param.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/mgt_pool.c b/bin/varnishd/mgt_pool.c index cd0a371..afa8435 100644 --- a/bin/varnishd/mgt_pool.c +++ b/bin/varnishd/mgt_pool.c @@ -42,8 +42,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") #include #include #include diff --git a/bin/varnishd/mgt_sandbox.c b/bin/varnishd/mgt_sandbox.c index 9f6d343..0922490 100644 --- a/bin/varnishd/mgt_sandbox.c +++ b/bin/varnishd/mgt_sandbox.c @@ -44,9 +44,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/mgt_shmem.c b/bin/varnishd/mgt_shmem.c index e55bcc2..e0a371d 100644 --- a/bin/varnishd/mgt_shmem.c +++ b/bin/varnishd/mgt_shmem.c @@ -86,9 +86,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/mgt_vcc.c b/bin/varnishd/mgt_vcc.c index 17b49c6..de70939 100644 --- a/bin/varnishd/mgt_vcc.c +++ b/bin/varnishd/mgt_vcc.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/rfc2616.c b/bin/varnishd/rfc2616.c index a871ae3..457edbe 100644 --- a/bin/varnishd/rfc2616.c +++ b/bin/varnishd/rfc2616.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/steps.h b/bin/varnishd/steps.h index 9a00b2c..d45b5a7 100644 --- a/bin/varnishd/steps.h +++ b/bin/varnishd/steps.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ /*lint -save -e525 -e539 */ diff --git a/bin/varnishd/stevedore.c b/bin/varnishd/stevedore.c index 8ee4040..5b3d94d 100644 --- a/bin/varnishd/stevedore.c +++ b/bin/varnishd/stevedore.c @@ -33,9 +33,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/stevedore.h b/bin/varnishd/stevedore.h index 6036b32..e284530 100644 --- a/bin/varnishd/stevedore.h +++ b/bin/varnishd/stevedore.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ struct stevedore; diff --git a/bin/varnishd/stevedore_utils.c b/bin/varnishd/stevedore_utils.c index 473d61a..1a4227c 100644 --- a/bin/varnishd/stevedore_utils.c +++ b/bin/varnishd/stevedore_utils.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/storage_file.c b/bin/varnishd/storage_file.c index c334b6b..63bcdf3 100644 --- a/bin/varnishd/storage_file.c +++ b/bin/varnishd/storage_file.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/storage_malloc.c b/bin/varnishd/storage_malloc.c index c934ab8..658ca6e 100644 --- a/bin/varnishd/storage_malloc.c +++ b/bin/varnishd/storage_malloc.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/storage_persistent.c b/bin/varnishd/storage_persistent.c index de28e7a..d5ee060 100644 --- a/bin/varnishd/storage_persistent.c +++ b/bin/varnishd/storage_persistent.c @@ -35,9 +35,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/storage_persistent_mgt.c b/bin/varnishd/storage_persistent_mgt.c index e206f1a..240057f 100644 --- a/bin/varnishd/storage_persistent_mgt.c +++ b/bin/varnishd/storage_persistent_mgt.c @@ -35,9 +35,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/storage_persistent_silo.c b/bin/varnishd/storage_persistent_silo.c index 9635628..18e6ea9 100644 --- a/bin/varnishd/storage_persistent_silo.c +++ b/bin/varnishd/storage_persistent_silo.c @@ -34,9 +34,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/storage_persistent_subr.c b/bin/varnishd/storage_persistent_subr.c index 03f6d28..86d1892 100644 --- a/bin/varnishd/storage_persistent_subr.c +++ b/bin/varnishd/storage_persistent_subr.c @@ -35,9 +35,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishd/storage_synth.c b/bin/varnishd/storage_synth.c index 74f22d2..b70e609 100644 --- a/bin/varnishd/storage_synth.c +++ b/bin/varnishd/storage_synth.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/storage_umem.c b/bin/varnishd/storage_umem.c index 4ec6e1d..016f5c9 100644 --- a/bin/varnishd/storage_umem.c +++ b/bin/varnishd/storage_umem.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #ifdef HAVE_LIBUMEM #include diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c index 3597867..aa9d876 100644 --- a/bin/varnishd/varnishd.c +++ b/bin/varnishd/varnishd.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishd/vparam.h b/bin/varnishd/vparam.h index 47eae29..fefbba1 100644 --- a/bin/varnishd/vparam.h +++ b/bin/varnishd/vparam.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ struct parspec; diff --git a/bin/varnishd/vsm.c b/bin/varnishd/vsm.c index 3771aab..4312d83 100644 --- a/bin/varnishd/vsm.c +++ b/bin/varnishd/vsm.c @@ -47,9 +47,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishhist/Makefile.am b/bin/varnishhist/Makefile.am index b05550a..8300e43 100644 --- a/bin/varnishhist/Makefile.am +++ b/bin/varnishhist/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c index f428a0b..bfda305 100644 --- a/bin/varnishhist/varnishhist.c +++ b/bin/varnishhist/varnishhist.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishlog/Makefile.am b/bin/varnishlog/Makefile.am index 7798d47..17474fc 100644 --- a/bin/varnishlog/Makefile.am +++ b/bin/varnishlog/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c index 80771aa..81593c6 100644 --- a/bin/varnishlog/varnishlog.c +++ b/bin/varnishlog/varnishlog.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishncsa/Makefile.am b/bin/varnishncsa/Makefile.am index da6029f..69ec4de 100644 --- a/bin/varnishncsa/Makefile.am +++ b/bin/varnishncsa/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index 717e9e6..0124705 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -61,9 +61,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishreplay/Makefile.am b/bin/varnishreplay/Makefile.am index d13916c..bca6b10 100644 --- a/bin/varnishreplay/Makefile.am +++ b/bin/varnishreplay/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include diff --git a/bin/varnishreplay/varnishreplay.c b/bin/varnishreplay/varnishreplay.c index 70a4e3a..b582d91 100644 --- a/bin/varnishreplay/varnishreplay.c +++ b/bin/varnishreplay/varnishreplay.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishsizes/Makefile.am b/bin/varnishsizes/Makefile.am index a99b7cc..cb0c013 100644 --- a/bin/varnishsizes/Makefile.am +++ b/bin/varnishsizes/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include diff --git a/bin/varnishsizes/varnishsizes.c b/bin/varnishsizes/varnishsizes.c index 4531997..8fd15bc 100644 --- a/bin/varnishsizes/varnishsizes.c +++ b/bin/varnishsizes/varnishsizes.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishstat/Makefile.am b/bin/varnishstat/Makefile.am index f6b9d49..ae4da56 100644 --- a/bin/varnishstat/Makefile.am +++ b/bin/varnishstat/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include diff --git a/bin/varnishstat/varnishstat.c b/bin/varnishstat/varnishstat.c index 139b64a..d1c7545 100644 --- a/bin/varnishstat/varnishstat.c +++ b/bin/varnishstat/varnishstat.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c index 8ce1690..2672255 100644 --- a/bin/varnishstat/varnishstat_curses.c +++ b/bin/varnishstat/varnishstat_curses.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishtest/Makefile.am b/bin/varnishtest/Makefile.am index d20f29e..e538120 100644 --- a/bin/varnishtest/Makefile.am +++ b/bin/varnishtest/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# TESTS_PARALLELISM = 3 check: varnishtest diff --git a/bin/varnishtest/tests/README b/bin/varnishtest/tests/README index 48924a2..dc08fc5 100644 --- a/bin/varnishtest/tests/README +++ b/bin/varnishtest/tests/README @@ -1,5 +1,3 @@ -# $Id$ - Test-scripts for varnishtest ============================ diff --git a/bin/varnishtest/tests/a00000.vtc b/bin/varnishtest/tests/a00000.vtc index d53be0f..d368014 100644 --- a/bin/varnishtest/tests/a00000.vtc +++ b/bin/varnishtest/tests/a00000.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "basic default HTTP transactions" +varnishtest "basic default HTTP transactions" server s1 { rxreq diff --git a/bin/varnishtest/tests/a00001.vtc b/bin/varnishtest/tests/a00001.vtc index ec325a3..06b8ae5 100644 --- a/bin/varnishtest/tests/a00001.vtc +++ b/bin/varnishtest/tests/a00001.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "basic default HTTP transactions with expect" +varnishtest "basic default HTTP transactions with expect" server s1 { rxreq diff --git a/bin/varnishtest/tests/a00002.vtc b/bin/varnishtest/tests/a00002.vtc index 4de3238..e0b4759 100644 --- a/bin/varnishtest/tests/a00002.vtc +++ b/bin/varnishtest/tests/a00002.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "basic default HTTP transactions with expect and options" +varnishtest "basic default HTTP transactions with expect and options" server s1 { rxreq diff --git a/bin/varnishtest/tests/a00003.vtc b/bin/varnishtest/tests/a00003.vtc index 365e29f..7462fb1 100644 --- a/bin/varnishtest/tests/a00003.vtc +++ b/bin/varnishtest/tests/a00003.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "dual independent HTTP transactions" +varnishtest "dual independent HTTP transactions" server s1 { rxreq diff --git a/bin/varnishtest/tests/a00004.vtc b/bin/varnishtest/tests/a00004.vtc index d82ff50..01cd868 100644 --- a/bin/varnishtest/tests/a00004.vtc +++ b/bin/varnishtest/tests/a00004.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "dual shared server HTTP transactions" +varnishtest "dual shared server HTTP transactions" server s1 -repeat 2 { rxreq diff --git a/bin/varnishtest/tests/a00005.vtc b/bin/varnishtest/tests/a00005.vtc index 8b0e1c7..e44a7e2 100644 --- a/bin/varnishtest/tests/a00005.vtc +++ b/bin/varnishtest/tests/a00005.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "dual shared client HTTP transactions" +varnishtest "dual shared client HTTP transactions" server s1 { rxreq diff --git a/bin/varnishtest/tests/a00006.vtc b/bin/varnishtest/tests/a00006.vtc index 1b61a7a..5db297b 100644 --- a/bin/varnishtest/tests/a00006.vtc +++ b/bin/varnishtest/tests/a00006.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "bidirectional message bodies" +varnishtest "bidirectional message bodies" server s1 { rxreq diff --git a/bin/varnishtest/tests/a00007.vtc b/bin/varnishtest/tests/a00007.vtc index 8715e8d..81d80af 100644 --- a/bin/varnishtest/tests/a00007.vtc +++ b/bin/varnishtest/tests/a00007.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "TCP reuse" +varnishtest "TCP reuse" server s1 { rxreq diff --git a/bin/varnishtest/tests/a00008.vtc b/bin/varnishtest/tests/a00008.vtc index 0f5a4ef..3a581c8 100644 --- a/bin/varnishtest/tests/a00008.vtc +++ b/bin/varnishtest/tests/a00008.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Sema operations" +varnishtest "Sema operations" server s1 { rxreq diff --git a/bin/varnishtest/tests/a00009.vtc b/bin/varnishtest/tests/a00009.vtc index 0450789..90569cc 100644 --- a/bin/varnishtest/tests/a00009.vtc +++ b/bin/varnishtest/tests/a00009.vtc @@ -1,5 +1,3 @@ -# $Id$ - -test "See that the VCL compiler works" +varnishtest "See that the VCL compiler works" shell "cd ${topbuild}/bin/varnishd && ./varnishd -b 127.0.0.1:80 -C -n ${tmpdir} > /dev/null" diff --git a/bin/varnishtest/tests/a00010.vtc b/bin/varnishtest/tests/a00010.vtc index cb3acf0..1200a69 100644 --- a/bin/varnishtest/tests/a00010.vtc +++ b/bin/varnishtest/tests/a00010.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "simply test that the framework support \0" +varnishtest "simply test that the framework support \0" server s1 { rxreq @@ -20,4 +18,3 @@ client c1 -connect ${s1_sock} { client c1 -run server s1 -wait - diff --git a/bin/varnishtest/tests/a00011.vtc b/bin/varnishtest/tests/a00011.vtc index 79a136f..9e07f83 100644 --- a/bin/varnishtest/tests/a00011.vtc +++ b/bin/varnishtest/tests/a00011.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "test vtc gzip support" +varnishtest "test vtc gzip support" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00000.vtc b/bin/varnishtest/tests/b00000.vtc index 0aa6720..1f4f766 100644 --- a/bin/varnishtest/tests/b00000.vtc +++ b/bin/varnishtest/tests/b00000.vtc @@ -1,8 +1,4 @@ -# Test that we get anything through at all -# -# $Id$ - -test "Does anything get through at all ?" +varnishtest "Does anything get through at all ?" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00001.vtc b/bin/varnishtest/tests/b00001.vtc index 16a3406..41dbe63 100644 --- a/bin/varnishtest/tests/b00001.vtc +++ b/bin/varnishtest/tests/b00001.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that a pipe transaction works" +varnishtest "Check that a pipe transaction works" server s1 -repeat 1 { rxreq diff --git a/bin/varnishtest/tests/b00002.vtc b/bin/varnishtest/tests/b00002.vtc index f1b5f48..243de19 100644 --- a/bin/varnishtest/tests/b00002.vtc +++ b/bin/varnishtest/tests/b00002.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that a pass transaction works" +varnishtest "Check that a pass transaction works" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00003.vtc b/bin/varnishtest/tests/b00003.vtc index 6de3ee4..8b9375d 100644 --- a/bin/varnishtest/tests/b00003.vtc +++ b/bin/varnishtest/tests/b00003.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that a cache fetch + hit transaction works" +varnishtest "Check that a cache fetch + hit transaction works" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00004.vtc b/bin/varnishtest/tests/b00004.vtc index 66a3e74..2a13a84 100644 --- a/bin/varnishtest/tests/b00004.vtc +++ b/bin/varnishtest/tests/b00004.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Torture Varnish with start/stop commands" +varnishtest "Torture Varnish with start/stop commands" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00005.vtc b/bin/varnishtest/tests/b00005.vtc index f6dfc7d..2824fc2 100644 --- a/bin/varnishtest/tests/b00005.vtc +++ b/bin/varnishtest/tests/b00005.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that -s works" +varnishtest "Check that -s works" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00006.vtc b/bin/varnishtest/tests/b00006.vtc index 530a3cd..aea0494 100644 --- a/bin/varnishtest/tests/b00006.vtc +++ b/bin/varnishtest/tests/b00006.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that -s malloc works" +varnishtest "Check that -s malloc works" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00007.vtc b/bin/varnishtest/tests/b00007.vtc index f089108..58740c6 100644 --- a/bin/varnishtest/tests/b00007.vtc +++ b/bin/varnishtest/tests/b00007.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check chunked encoding from backend works" +varnishtest "Check chunked encoding from backend works" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00008.vtc b/bin/varnishtest/tests/b00008.vtc index ed4cf0f..3d0c7e5 100644 --- a/bin/varnishtest/tests/b00008.vtc +++ b/bin/varnishtest/tests/b00008.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test CLI help and parameter functions" +varnishtest "Test CLI help and parameter functions" varnish v1 -arg "-b ${bad_ip}:9080" diff --git a/bin/varnishtest/tests/b00009.vtc b/bin/varnishtest/tests/b00009.vtc index 8afe96f..02a0b57 100644 --- a/bin/varnishtest/tests/b00009.vtc +++ b/bin/varnishtest/tests/b00009.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check poll acceptor" +varnishtest "Check poll acceptor" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00010.vtc b/bin/varnishtest/tests/b00010.vtc index c6be22e..b27dd42 100644 --- a/bin/varnishtest/tests/b00010.vtc +++ b/bin/varnishtest/tests/b00010.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check simple list hasher" +varnishtest "Check simple list hasher" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00011.vtc b/bin/varnishtest/tests/b00011.vtc index ef024b7..9c4e2d3 100644 --- a/bin/varnishtest/tests/b00011.vtc +++ b/bin/varnishtest/tests/b00011.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check HTTP/1.0 EOF transmission" +varnishtest "Check HTTP/1.0 EOF transmission" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00012.vtc b/bin/varnishtest/tests/b00012.vtc index a41294e..967ed85 100644 --- a/bin/varnishtest/tests/b00012.vtc +++ b/bin/varnishtest/tests/b00012.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check pipelining" +varnishtest "Check pipelining" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00013.vtc b/bin/varnishtest/tests/b00013.vtc index eac5436..57250ad 100644 --- a/bin/varnishtest/tests/b00013.vtc +++ b/bin/varnishtest/tests/b00013.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check read-head / partial pipelining" +varnishtest "Check read-head / partial pipelining" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00014.vtc b/bin/varnishtest/tests/b00014.vtc index 1f83bd5..b68c79e 100644 --- a/bin/varnishtest/tests/b00014.vtc +++ b/bin/varnishtest/tests/b00014.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check -f command line arg" +varnishtest "Check -f command line arg" server s1 { diff --git a/bin/varnishtest/tests/b00015.vtc b/bin/varnishtest/tests/b00015.vtc index d5c9aeb..6e9d693 100644 --- a/bin/varnishtest/tests/b00015.vtc +++ b/bin/varnishtest/tests/b00015.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check synthetic error page caching" +varnishtest "Check synthetic error page caching" # First test that an internally generated error is not cached diff --git a/bin/varnishtest/tests/b00016.vtc b/bin/varnishtest/tests/b00016.vtc index 848ae9c..db68663 100644 --- a/bin/varnishtest/tests/b00016.vtc +++ b/bin/varnishtest/tests/b00016.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check naming of backends" +varnishtest "Check naming of backends" varnish v1 -vcl { backend foo { diff --git a/bin/varnishtest/tests/b00017.vtc b/bin/varnishtest/tests/b00017.vtc index c46fa1c..9edcbc5 100644 --- a/bin/varnishtest/tests/b00017.vtc +++ b/bin/varnishtest/tests/b00017.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that we close one error" +varnishtest "Check that we close one error" varnish v1 -vcl { backend foo { diff --git a/bin/varnishtest/tests/b00018.vtc b/bin/varnishtest/tests/b00018.vtc index 24329ef..bbd7c0e 100644 --- a/bin/varnishtest/tests/b00018.vtc +++ b/bin/varnishtest/tests/b00018.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that error in vcl_fetch works" +varnishtest "Check that error in vcl_fetch works" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00019.vtc b/bin/varnishtest/tests/b00019.vtc index 84a1f32..2572a57 100644 --- a/bin/varnishtest/tests/b00019.vtc +++ b/bin/varnishtest/tests/b00019.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that max_restarts works and that we don't fall over" +varnishtest "Check that max_restarts works and that we don't fall over" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00020.vtc b/bin/varnishtest/tests/b00020.vtc index cfb2f69..d937ac0 100644 --- a/bin/varnishtest/tests/b00020.vtc +++ b/bin/varnishtest/tests/b00020.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check the between_bytes_timeout behaves from parameters" +varnishtest "Check the between_bytes_timeout behaves from parameters" feature SO_RCVTIMEO_WORKS diff --git a/bin/varnishtest/tests/b00021.vtc b/bin/varnishtest/tests/b00021.vtc index f0d868d..87d91e3 100644 --- a/bin/varnishtest/tests/b00021.vtc +++ b/bin/varnishtest/tests/b00021.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check the between_bytes_timeout behaves from vcl" +varnishtest "Check the between_bytes_timeout behaves from vcl" feature SO_RCVTIMEO_WORKS diff --git a/bin/varnishtest/tests/b00022.vtc b/bin/varnishtest/tests/b00022.vtc index 51ae65a..aa625b6 100644 --- a/bin/varnishtest/tests/b00022.vtc +++ b/bin/varnishtest/tests/b00022.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check the between_bytes_timeout behaves from backend definition" +varnishtest "Check the between_bytes_timeout behaves from backend definition" feature SO_RCVTIMEO_WORKS diff --git a/bin/varnishtest/tests/b00023.vtc b/bin/varnishtest/tests/b00023.vtc index e780b04..7685f66 100644 --- a/bin/varnishtest/tests/b00023.vtc +++ b/bin/varnishtest/tests/b00023.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that the first_byte_timeout works from parameters" +varnishtest "Check that the first_byte_timeout works from parameters" feature SO_RCVTIMEO_WORKS diff --git a/bin/varnishtest/tests/b00024.vtc b/bin/varnishtest/tests/b00024.vtc index a3e763b..bbca487 100644 --- a/bin/varnishtest/tests/b00024.vtc +++ b/bin/varnishtest/tests/b00024.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that the first_byte_timeout works from vcl" +varnishtest "Check that the first_byte_timeout works from vcl" feature SO_RCVTIMEO_WORKS diff --git a/bin/varnishtest/tests/b00025.vtc b/bin/varnishtest/tests/b00025.vtc index e2c34e9..3ba0e64 100644 --- a/bin/varnishtest/tests/b00025.vtc +++ b/bin/varnishtest/tests/b00025.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that the first_byte_timeout works from backend definition" +varnishtest "Check that the first_byte_timeout works from backend definition" feature SO_RCVTIMEO_WORKS diff --git a/bin/varnishtest/tests/b00026.vtc b/bin/varnishtest/tests/b00026.vtc index d2c281b..1cc1998 100644 --- a/bin/varnishtest/tests/b00026.vtc +++ b/bin/varnishtest/tests/b00026.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check the precedence for timeouts" +varnishtest "Check the precedence for timeouts" feature SO_RCVTIMEO_WORKS diff --git a/bin/varnishtest/tests/b00027.vtc b/bin/varnishtest/tests/b00027.vtc index c016642..4076019 100644 --- a/bin/varnishtest/tests/b00027.vtc +++ b/bin/varnishtest/tests/b00027.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "test backend transmission corner cases" +varnishtest "test backend transmission corner cases" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00028.vtc b/bin/varnishtest/tests/b00028.vtc index 85a8a01..20e30aa 100644 --- a/bin/varnishtest/tests/b00028.vtc +++ b/bin/varnishtest/tests/b00028.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "regexp match and no-match" +varnishtest "regexp match and no-match" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00029.vtc b/bin/varnishtest/tests/b00029.vtc index 1fb570f..8df3997 100644 --- a/bin/varnishtest/tests/b00029.vtc +++ b/bin/varnishtest/tests/b00029.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test orderly connection closure" +varnishtest "Test orderly connection closure" server s1 { diff --git a/bin/varnishtest/tests/b00030.vtc b/bin/varnishtest/tests/b00030.vtc index 8cc5c7f..fcd0356 100644 --- a/bin/varnishtest/tests/b00030.vtc +++ b/bin/varnishtest/tests/b00030.vtc @@ -1,9 +1,8 @@ -# $Id$ +varnishtest "Test formatting of timestamps" + # We can't test the value of x-timestamp, but this should fail # if we can't set the header at all. -test "Test formatting of timestamps" - server s1 { rxreq txresp diff --git a/bin/varnishtest/tests/b00031.vtc b/bin/varnishtest/tests/b00031.vtc index 6719e85..9dcb83e 100644 --- a/bin/varnishtest/tests/b00031.vtc +++ b/bin/varnishtest/tests/b00031.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test X-Forward-For headers" +varnishtest "Test X-Forward-For headers" server s1 { rxreq diff --git a/bin/varnishtest/tests/b00032.vtc b/bin/varnishtest/tests/b00032.vtc index 25e1a62..949bcfa 100644 --- a/bin/varnishtest/tests/b00032.vtc +++ b/bin/varnishtest/tests/b00032.vtc @@ -1,5 +1,3 @@ -# $Id$ - -test "CLI coverage test" +varnishtest "CLI coverage test" varnish v1 -cliok storage.list diff --git a/bin/varnishtest/tests/b00033.vtc b/bin/varnishtest/tests/b00033.vtc index c044f9d..4077047 100644 --- a/bin/varnishtest/tests/b00033.vtc +++ b/bin/varnishtest/tests/b00033.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "classic hash code coverage" +varnishtest "classic hash code coverage" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00001.vtc b/bin/varnishtest/tests/c00001.vtc index 15e5860..d9b6c41 100644 --- a/bin/varnishtest/tests/c00001.vtc +++ b/bin/varnishtest/tests/c00001.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test VCL regsub()" +varnishtest "Test VCL regsub()" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00002.vtc b/bin/varnishtest/tests/c00002.vtc index 696ad67..6e633e0 100644 --- a/bin/varnishtest/tests/c00002.vtc +++ b/bin/varnishtest/tests/c00002.vtc @@ -1,8 +1,4 @@ -# Test that we get anything through at all -# -# $Id$ - -test "Check that all thread pools all get started and get minimum threads" +varnishtest "Check that all thread pools all get started and get minimum threads" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00003.vtc b/bin/varnishtest/tests/c00003.vtc index 8af74dd..598eae9 100644 --- a/bin/varnishtest/tests/c00003.vtc +++ b/bin/varnishtest/tests/c00003.vtc @@ -1,8 +1,4 @@ -# Test that we get anything through at all -# -# $Id$ - -test "Check that we start if at least one listen address works" +varnishtest "Check that we start if at least one listen address works" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00004.vtc b/bin/varnishtest/tests/c00004.vtc index c03c079..6b47ad5 100644 --- a/bin/varnishtest/tests/c00004.vtc +++ b/bin/varnishtest/tests/c00004.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test Vary functionality" +varnishtest "Test Vary functionality" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00005.vtc b/bin/varnishtest/tests/c00005.vtc index f55d190..7a7965c 100644 --- a/bin/varnishtest/tests/c00005.vtc +++ b/bin/varnishtest/tests/c00005.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test simple ACL" +varnishtest "Test simple ACL" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00006.vtc b/bin/varnishtest/tests/c00006.vtc index e3227f5..c2c8ec2 100644 --- a/bin/varnishtest/tests/c00006.vtc +++ b/bin/varnishtest/tests/c00006.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test banning a url" +varnishtest "Test banning a url" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00007.vtc b/bin/varnishtest/tests/c00007.vtc index ab66b10..d9cd46f 100644 --- a/bin/varnishtest/tests/c00007.vtc +++ b/bin/varnishtest/tests/c00007.vtc @@ -1,5 +1,3 @@ -# $Id$ - -test "Test banning a hash" +varnishtest "Test banning a hash" varnish v1 -arg "-b 127.0.0.1:80 -a 127.0.0.1:0" -start -clierr 101 "ban.hash foo" diff --git a/bin/varnishtest/tests/c00008.vtc b/bin/varnishtest/tests/c00008.vtc index 8554bb6..3045a5b 100644 --- a/bin/varnishtest/tests/c00008.vtc +++ b/bin/varnishtest/tests/c00008.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test If-Modified-Since" +varnishtest "Test If-Modified-Since" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00009.vtc b/bin/varnishtest/tests/c00009.vtc index 35e2391..295b092 100644 --- a/bin/varnishtest/tests/c00009.vtc +++ b/bin/varnishtest/tests/c00009.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test restarts" +varnishtest "Test restarts" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00010.vtc b/bin/varnishtest/tests/c00010.vtc index e476c7e..81ed5b6 100644 --- a/bin/varnishtest/tests/c00010.vtc +++ b/bin/varnishtest/tests/c00010.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test pass from hit" +varnishtest "Test pass from hit" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00011.vtc b/bin/varnishtest/tests/c00011.vtc index ab03d6a..1dd34a8 100644 --- a/bin/varnishtest/tests/c00011.vtc +++ b/bin/varnishtest/tests/c00011.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test hit for pass (pass from fetch)" +varnishtest "Test hit for pass (pass from fetch)" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00012.vtc b/bin/varnishtest/tests/c00012.vtc index 967474a..24326d8 100644 --- a/bin/varnishtest/tests/c00012.vtc +++ b/bin/varnishtest/tests/c00012.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test pass from miss" +varnishtest "Test pass from miss" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00013.vtc b/bin/varnishtest/tests/c00013.vtc index 0368897..94c86ca 100644 --- a/bin/varnishtest/tests/c00013.vtc +++ b/bin/varnishtest/tests/c00013.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test parking second request on backend delay" +varnishtest "Test parking second request on backend delay" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00014.vtc b/bin/varnishtest/tests/c00014.vtc index b06d3df..ced8117 100644 --- a/bin/varnishtest/tests/c00014.vtc +++ b/bin/varnishtest/tests/c00014.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test parking second request on backend delay, then pass" +varnishtest "Test parking second request on backend delay, then pass" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00015.vtc b/bin/varnishtest/tests/c00015.vtc index bd2f618..755669b 100644 --- a/bin/varnishtest/tests/c00015.vtc +++ b/bin/varnishtest/tests/c00015.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test switching VCLs" +varnishtest "Test switching VCLs" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00016.vtc b/bin/varnishtest/tests/c00016.vtc index 622e548..d028a64 100644 --- a/bin/varnishtest/tests/c00016.vtc +++ b/bin/varnishtest/tests/c00016.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test Connection header handling" +varnishtest "Test Connection header handling" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00017.vtc b/bin/varnishtest/tests/c00017.vtc index ede7462..7e6f11f 100644 --- a/bin/varnishtest/tests/c00017.vtc +++ b/bin/varnishtest/tests/c00017.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test Backend Polling" +varnishtest "Test Backend Polling" server s1 { # Probes diff --git a/bin/varnishtest/tests/c00018.vtc b/bin/varnishtest/tests/c00018.vtc index 558f550..4351748 100644 --- a/bin/varnishtest/tests/c00018.vtc +++ b/bin/varnishtest/tests/c00018.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check Expect headers" +varnishtest "Check Expect headers" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00019.vtc b/bin/varnishtest/tests/c00019.vtc index a6989fd..a27bb8e 100644 --- a/bin/varnishtest/tests/c00019.vtc +++ b/bin/varnishtest/tests/c00019.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check ban counters and duplicate ban elimination" +varnishtest "Check ban counters and duplicate ban elimination" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00020.vtc b/bin/varnishtest/tests/c00020.vtc index e48b6e3..31875b2 100644 --- a/bin/varnishtest/tests/c00020.vtc +++ b/bin/varnishtest/tests/c00020.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test -h critbit a bit" +varnishtest "Test -h critbit a bit" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00021.vtc b/bin/varnishtest/tests/c00021.vtc index 1615f8c..c8bcbe5 100644 --- a/bin/varnishtest/tests/c00021.vtc +++ b/bin/varnishtest/tests/c00021.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test banning a url with cli:ban" +varnishtest "Test banning a url with cli:ban" server s1 { rxreq @@ -122,5 +120,3 @@ client c1 { expect resp.http.foo == bar8 expect resp.bodylen == 8 } -run - - diff --git a/bin/varnishtest/tests/c00022.vtc b/bin/varnishtest/tests/c00022.vtc index fda0f7c..4097c65 100644 --- a/bin/varnishtest/tests/c00022.vtc +++ b/bin/varnishtest/tests/c00022.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test banning a url with VCL ban" +varnishtest "Test banning a url with VCL ban" server s1 { rxreq @@ -178,5 +176,3 @@ client c1 { expect resp.http.foo == bar8 expect resp.bodylen == 8 } -run - - diff --git a/bin/varnishtest/tests/c00023.vtc b/bin/varnishtest/tests/c00023.vtc index b4d418a..6bed8e3 100644 --- a/bin/varnishtest/tests/c00023.vtc +++ b/bin/varnishtest/tests/c00023.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test -h critbit for digest edges" +varnishtest "Test -h critbit for digest edges" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00024.vtc b/bin/varnishtest/tests/c00024.vtc index 9e502a6..4b1bdac 100644 --- a/bin/varnishtest/tests/c00024.vtc +++ b/bin/varnishtest/tests/c00024.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test restart in vcl_error" +varnishtest "Test restart in vcl_error" server s1 { rxreq @@ -38,4 +36,3 @@ client c1 { rxresp expect resp.status == 200 } -run - diff --git a/bin/varnishtest/tests/c00025.vtc b/bin/varnishtest/tests/c00025.vtc index 8eb7085..668fdc2 100644 --- a/bin/varnishtest/tests/c00025.vtc +++ b/bin/varnishtest/tests/c00025.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test If-None-Match" +varnishtest "Test If-None-Match" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00026.vtc b/bin/varnishtest/tests/c00026.vtc index 16ac1f3..427efe4 100644 --- a/bin/varnishtest/tests/c00026.vtc +++ b/bin/varnishtest/tests/c00026.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test Combination of If-None-Match and If-Modified-Since" +varnishtest "Test Combination of If-None-Match and If-Modified-Since" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00027.vtc b/bin/varnishtest/tests/c00027.vtc index 969d439..5f49fcb 100644 --- a/bin/varnishtest/tests/c00027.vtc +++ b/bin/varnishtest/tests/c00027.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test eviction" +varnishtest "Test eviction" server s1 { rxreq @@ -43,4 +41,3 @@ client c1 { rxresp expect resp.status == 200 } -run - diff --git a/bin/varnishtest/tests/c00028.vtc b/bin/varnishtest/tests/c00028.vtc index 765d017..7e2224f 100644 --- a/bin/varnishtest/tests/c00028.vtc +++ b/bin/varnishtest/tests/c00028.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test that we can't recurse restarts forever" +varnishtest "Test that we can't recurse restarts forever" varnish v1 -vcl { backend bad { @@ -20,4 +18,3 @@ client c1 { rxresp expect resp.status == 503 } -run - diff --git a/bin/varnishtest/tests/c00029.vtc b/bin/varnishtest/tests/c00029.vtc index 8d59f88..7396a2b 100644 --- a/bin/varnishtest/tests/c00029.vtc +++ b/bin/varnishtest/tests/c00029.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test that saintmode_threshold correctly marks a backend as sick" +varnishtest "Test that saintmode_threshold correctly marks a backend as sick" server s1 { rxreq @@ -107,4 +105,3 @@ client c1 { expect resp.http.X-Restarts == "0" } -run - diff --git a/bin/varnishtest/tests/c00030.vtc b/bin/varnishtest/tests/c00030.vtc index d5a6a7a..adb39ee 100644 --- a/bin/varnishtest/tests/c00030.vtc +++ b/bin/varnishtest/tests/c00030.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test that saintmode_threshold in VCL" +varnishtest "Test that saintmode_threshold in VCL" server s1 { rxreq @@ -111,4 +109,3 @@ client c1 { expect resp.http.X-Restarts == "0" } -run - diff --git a/bin/varnishtest/tests/c00031.vtc b/bin/varnishtest/tests/c00031.vtc index 8366154..1dd8213 100644 --- a/bin/varnishtest/tests/c00031.vtc +++ b/bin/varnishtest/tests/c00031.vtc @@ -1,8 +1,4 @@ -# Test that we get anything through at all -# -# $Id$ - -test "Worker thread stack size setting" +varnishtest "Worker thread stack size setting" server s1 { rxreq @@ -16,4 +12,3 @@ client c1 { rxresp expect resp.status == 200 } -run - diff --git a/bin/varnishtest/tests/c00032.vtc b/bin/varnishtest/tests/c00032.vtc index e207ac6..621758f 100644 --- a/bin/varnishtest/tests/c00032.vtc +++ b/bin/varnishtest/tests/c00032.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test Rollback" +varnishtest "Test Rollback" server s1 { diff --git a/bin/varnishtest/tests/c00033.vtc b/bin/varnishtest/tests/c00033.vtc index f9786a3..d93a6d0 100644 --- a/bin/varnishtest/tests/c00033.vtc +++ b/bin/varnishtest/tests/c00033.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Inline C access to purges (could be retired)" +varnishtest "Inline C access to purges (could be retired)" server s1 { rxreq @@ -85,5 +83,3 @@ client c1 { expect resp.bodylen == 6 } -run - - diff --git a/bin/varnishtest/tests/c00034.vtc b/bin/varnishtest/tests/c00034.vtc index 3ec70df..faf60fb 100644 --- a/bin/varnishtest/tests/c00034.vtc +++ b/bin/varnishtest/tests/c00034.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Range headers" +varnishtest "Range headers" server s1 { rxreq @@ -87,4 +85,3 @@ client c1 { expect resp.status == 206 expect resp.bodylen == 100 } -run - diff --git a/bin/varnishtest/tests/c00035.vtc b/bin/varnishtest/tests/c00035.vtc index 4305214..83400f1 100644 --- a/bin/varnishtest/tests/c00035.vtc +++ b/bin/varnishtest/tests/c00035.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Dropping polling of a backend" +varnishtest "Dropping polling of a backend" server s1 -repeat 1 { rxreq diff --git a/bin/varnishtest/tests/c00036.vtc b/bin/varnishtest/tests/c00036.vtc index 148a084..9f2544c 100644 --- a/bin/varnishtest/tests/c00036.vtc +++ b/bin/varnishtest/tests/c00036.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Backend close retry" +varnishtest "Backend close retry" server s1 -repeat 1 { rxreq diff --git a/bin/varnishtest/tests/c00037.vtc b/bin/varnishtest/tests/c00037.vtc index 84736df..e854a3b 100644 --- a/bin/varnishtest/tests/c00037.vtc +++ b/bin/varnishtest/tests/c00037.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test req.hash_always_miss in vcl_recv" +varnishtest "Test req.hash_always_miss in vcl_recv" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00038.vtc b/bin/varnishtest/tests/c00038.vtc index f2b5786..07e2657 100644 --- a/bin/varnishtest/tests/c00038.vtc +++ b/bin/varnishtest/tests/c00038.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test req.hash_ignore_busy in vcl_recv" +varnishtest "Test req.hash_ignore_busy in vcl_recv" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00039.vtc b/bin/varnishtest/tests/c00039.vtc index a53742f..f8bba06 100644 --- a/bin/varnishtest/tests/c00039.vtc +++ b/bin/varnishtest/tests/c00039.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "request req and hdr length limits" +varnishtest "request req and hdr length limits" server s1 { rxreq @@ -51,4 +49,3 @@ client c1 { # XXX: that the backend summarily closes on us. Adding one # XXX: char to the above test, should cause that. } -run - diff --git a/bin/varnishtest/tests/c00040.vtc b/bin/varnishtest/tests/c00040.vtc index 9faf18e..b6af9e2 100644 --- a/bin/varnishtest/tests/c00040.vtc +++ b/bin/varnishtest/tests/c00040.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "request resp and hdr length limits" +varnishtest "request resp and hdr length limits" server s1 { rxreq @@ -81,4 +79,3 @@ client c1 { rxresp expect resp.status == 503 } -run - diff --git a/bin/varnishtest/tests/c00041.vtc b/bin/varnishtest/tests/c00041.vtc index cb7b1cb..78e8af2 100644 --- a/bin/varnishtest/tests/c00041.vtc +++ b/bin/varnishtest/tests/c00041.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "test purging from vcl" +varnishtest "test purging from vcl" server s1 { rxreq diff --git a/bin/varnishtest/tests/c00042.vtc b/bin/varnishtest/tests/c00042.vtc index de94e38..ae39d24 100644 --- a/bin/varnishtest/tests/c00042.vtc +++ b/bin/varnishtest/tests/c00042.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "using req.ttl to force fetch" +varnishtest "using req.ttl to force fetch" server s1 { rxreq diff --git a/bin/varnishtest/tests/e00000.vtc b/bin/varnishtest/tests/e00000.vtc index e929493..9aa9f55 100644 --- a/bin/varnishtest/tests/e00000.vtc +++ b/bin/varnishtest/tests/e00000.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI test with no ESI content" +varnishtest "ESI test with no ESI content" server s1 { diff --git a/bin/varnishtest/tests/e00001.vtc b/bin/varnishtest/tests/e00001.vtc index 3031620..9b6d1de 100644 --- a/bin/varnishtest/tests/e00001.vtc +++ b/bin/varnishtest/tests/e00001.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI:remove" +varnishtest "ESI:remove" server s1 { diff --git a/bin/varnishtest/tests/e00002.vtc b/bin/varnishtest/tests/e00002.vtc index 69d0406..3f755d1 100644 --- a/bin/varnishtest/tests/e00002.vtc +++ b/bin/varnishtest/tests/e00002.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI CDATA" +varnishtest "ESI CDATA" server s1 { diff --git a/bin/varnishtest/tests/e00003.vtc b/bin/varnishtest/tests/e00003.vtc index 29c7f6f..805219f 100644 --- a/bin/varnishtest/tests/e00003.vtc +++ b/bin/varnishtest/tests/e00003.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI include" +varnishtest "ESI include" server s1 { diff --git a/bin/varnishtest/tests/e00004.vtc b/bin/varnishtest/tests/e00004.vtc index 5b12ddd..1643e14 100644 --- a/bin/varnishtest/tests/e00004.vtc +++ b/bin/varnishtest/tests/e00004.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI commented include" +varnishtest "ESI commented include" server s1 { diff --git a/bin/varnishtest/tests/e00005.vtc b/bin/varnishtest/tests/e00005.vtc index 2584a16..a47837d 100644 --- a/bin/varnishtest/tests/e00005.vtc +++ b/bin/varnishtest/tests/e00005.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI relative include" +varnishtest "ESI relative include" server s1 { diff --git a/bin/varnishtest/tests/e00006.vtc b/bin/varnishtest/tests/e00006.vtc index cb621a9..804ee5a 100644 --- a/bin/varnishtest/tests/e00006.vtc +++ b/bin/varnishtest/tests/e00006.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI include with http://" +varnishtest "ESI include with http://" server s1 { diff --git a/bin/varnishtest/tests/e00007.vtc b/bin/varnishtest/tests/e00007.vtc index c2f0cb2..2418f81 100644 --- a/bin/varnishtest/tests/e00007.vtc +++ b/bin/varnishtest/tests/e00007.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI spanning storage bits" +varnishtest "ESI spanning storage bits" # NB! The layout of the body in the response is very carefully # NB! tuned to give the desired code coverage. diff --git a/bin/varnishtest/tests/e00008.vtc b/bin/varnishtest/tests/e00008.vtc index 1fd844b..9c8770f 100644 --- a/bin/varnishtest/tests/e00008.vtc +++ b/bin/varnishtest/tests/e00008.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI parsing errors" +varnishtest "ESI parsing errors" server s1 { rxreq diff --git a/bin/varnishtest/tests/e00009.vtc b/bin/varnishtest/tests/e00009.vtc index 7a70743..8a7927d 100644 --- a/bin/varnishtest/tests/e00009.vtc +++ b/bin/varnishtest/tests/e00009.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI binary detector" +varnishtest "ESI binary detector" server s1 { rxreq diff --git a/bin/varnishtest/tests/e00010.vtc b/bin/varnishtest/tests/e00010.vtc index d2cc2d6..2cc0d78 100644 --- a/bin/varnishtest/tests/e00010.vtc +++ b/bin/varnishtest/tests/e00010.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Ignoring non esi elements" +varnishtest "Ignoring non esi elements" server s1 { rxreq diff --git a/bin/varnishtest/tests/e00011.vtc b/bin/varnishtest/tests/e00011.vtc index 5609ee1..e725498 100644 --- a/bin/varnishtest/tests/e00011.vtc +++ b/bin/varnishtest/tests/e00011.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Make sure that PASS'ed ESI requests use GET for includes" +varnishtest "Make sure that PASS'ed ESI requests use GET for includes" server s1 { rxreq diff --git a/bin/varnishtest/tests/e00012.vtc b/bin/varnishtest/tests/e00012.vtc index 1476b64..97672f1 100644 --- a/bin/varnishtest/tests/e00012.vtc +++ b/bin/varnishtest/tests/e00012.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI includes for pre HTTP/1.1 cannot used chunked encoding" +varnishtest "ESI includes for pre HTTP/1.1 cannot used chunked encoding" server s1 { rxreq diff --git a/bin/varnishtest/tests/e00013.vtc b/bin/varnishtest/tests/e00013.vtc index 3816d99..d3de7a4 100644 --- a/bin/varnishtest/tests/e00013.vtc +++ b/bin/varnishtest/tests/e00013.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "All white-space object, in multiple storage segments" +varnishtest "All white-space object, in multiple storage segments" server s1 { rxreq diff --git a/bin/varnishtest/tests/e00014.vtc b/bin/varnishtest/tests/e00014.vtc index d641e74..0c36700 100644 --- a/bin/varnishtest/tests/e00014.vtc +++ b/bin/varnishtest/tests/e00014.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check "${tmpdir}/m00004_file_one" diff --git a/bin/varnishtest/tests/m00005.vtc b/bin/varnishtest/tests/m00005.vtc index 80dfb74..ec04a3f 100644 --- a/bin/varnishtest/tests/m00005.vtc +++ b/bin/varnishtest/tests/m00005.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "test vmod_std.duration conversion" +varnishtest "test vmod_std.duration conversion" server s1 { rxreq diff --git a/bin/varnishtest/tests/m00006.vtc b/bin/varnishtest/tests/m00006.vtc index cdec1f9..9da650c 100644 --- a/bin/varnishtest/tests/m00006.vtc +++ b/bin/varnishtest/tests/m00006.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "test vmod_std.collect()" +varnishtest "test vmod_std.collect()" server s1 { rxreq diff --git a/bin/varnishtest/tests/p00000.vtc b/bin/varnishtest/tests/p00000.vtc index 6cea757..0a17be2 100644 --- a/bin/varnishtest/tests/p00000.vtc +++ b/bin/varnishtest/tests/p00000.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test Basic persistence" +varnishtest "Test Basic persistence" server s1 { rxreq diff --git a/bin/varnishtest/tests/p00001.vtc b/bin/varnishtest/tests/p00001.vtc index a6e0272..4afccf3 100644 --- a/bin/varnishtest/tests/p00001.vtc +++ b/bin/varnishtest/tests/p00001.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Change TTL on persistent object" +varnishtest "Change TTL on persistent object" shell "rm -f ${tmpdir}/_.per" diff --git a/bin/varnishtest/tests/p00002.vtc b/bin/varnishtest/tests/p00002.vtc index bab409e..cef8f36 100644 --- a/bin/varnishtest/tests/p00002.vtc +++ b/bin/varnishtest/tests/p00002.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Ban a persistent object" +varnishtest "Ban a persistent object" shell "rm -f ${tmpdir}/_.per[12]" diff --git a/bin/varnishtest/tests/p00003.vtc b/bin/varnishtest/tests/p00003.vtc index 60f08fd..f554536 100644 --- a/bin/varnishtest/tests/p00003.vtc +++ b/bin/varnishtest/tests/p00003.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Ban a persistent object" +varnishtest "Ban a persistent object" shell "rm -f ${tmpdir}/_.per" @@ -55,4 +53,3 @@ client c1 { varnish v1 -cliok ban.list varnish v1 -stop - diff --git a/bin/varnishtest/tests/p00004.vtc b/bin/varnishtest/tests/p00004.vtc index 24dab08..e9b08f5 100644 --- a/bin/varnishtest/tests/p00004.vtc +++ b/bin/varnishtest/tests/p00004.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check object references" +varnishtest "Check object references" shell "rm -f ${tmpdir}/_.per" diff --git a/bin/varnishtest/tests/p00005.vtc b/bin/varnishtest/tests/p00005.vtc index 7dcb3e5..b41ded3 100644 --- a/bin/varnishtest/tests/p00005.vtc +++ b/bin/varnishtest/tests/p00005.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check expiry of non-instantiated object" +varnishtest "Check expiry of non-instantiated object" shell "rm -f ${tmpdir}/_.per" diff --git a/bin/varnishtest/tests/p00006.vtc b/bin/varnishtest/tests/p00006.vtc index 9b7f48a..d30c6cb 100644 --- a/bin/varnishtest/tests/p00006.vtc +++ b/bin/varnishtest/tests/p00006.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that Vary headers are stored" +varnishtest "Check that Vary headers are stored" shell "rm -f ${tmpdir}/_.per" @@ -54,4 +52,3 @@ client c1 { expect resp.http.foo == "foo2" } -run - diff --git a/bin/varnishtest/tests/p00007.vtc b/bin/varnishtest/tests/p00007.vtc index 8d0a18c..78aa8fb 100644 --- a/bin/varnishtest/tests/p00007.vtc +++ b/bin/varnishtest/tests/p00007.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "test reload of object spanning incomplete segment" +varnishtest "test reload of object spanning incomplete segment" server s1 { rxreq @@ -69,4 +67,3 @@ client c1 { rxresp expect resp.bodylen == 48 } -run - diff --git a/bin/varnishtest/tests/r00102.vtc b/bin/varnishtest/tests/r00102.vtc index b2f14a0..6cf81cf 100644 --- a/bin/varnishtest/tests/r00102.vtc +++ b/bin/varnishtest/tests/r00102.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test VCL regsub()" +varnishtest "Test VCL regsub()" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00251.vtc b/bin/varnishtest/tests/r00251.vtc index 6f20161..e93eb00 100644 --- a/bin/varnishtest/tests/r00251.vtc +++ b/bin/varnishtest/tests/r00251.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for #251: segfault on regsub on missing http header" +varnishtest "Regression test for #251: segfault on regsub on missing http header" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00255.vtc b/bin/varnishtest/tests/r00255.vtc index e223e74..3a897d7 100644 --- a/bin/varnishtest/tests/r00255.vtc +++ b/bin/varnishtest/tests/r00255.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for #255: Segfault on header token separation" +varnishtest "Regression test for #255: Segfault on header token separation" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00262.vtc b/bin/varnishtest/tests/r00262.vtc index c5ebb24..1ef7255 100644 --- a/bin/varnishtest/tests/r00262.vtc +++ b/bin/varnishtest/tests/r00262.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test that inter-request whitespace trimming works" +varnishtest "Test that inter-request whitespace trimming works" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00263.vtc b/bin/varnishtest/tests/r00263.vtc index 109917c..d97ec70 100644 --- a/bin/varnishtest/tests/r00263.vtc +++ b/bin/varnishtest/tests/r00263.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test refcounting backends from director" +varnishtest "Test refcounting backends from director" varnish v1 -vcl+backend { backend node1 { .host = "10.0.0.1"; .port = "80"; } diff --git a/bin/varnishtest/tests/r00292.vtc b/bin/varnishtest/tests/r00292.vtc index 1df83d0..aaa914c 100644 --- a/bin/varnishtest/tests/r00292.vtc +++ b/bin/varnishtest/tests/r00292.vtc @@ -1,10 +1,8 @@ -# $Id$ -# +varnishtest "Header deletion test" + # This test checks that the ->hdf flag which tracks Connection: header # deletes tracks the headers properly. -test "Header deletion test" - server s1 { rxreq expect req.url == "/foo" @@ -36,4 +34,3 @@ client c1 { -hdr "hdr6: 6" rxresp } -run - diff --git a/bin/varnishtest/tests/r00306.vtc b/bin/varnishtest/tests/r00306.vtc index 01b15aa..ebc1774 100644 --- a/bin/varnishtest/tests/r00306.vtc +++ b/bin/varnishtest/tests/r00306.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for ticket #306, random director ignoring good backend" +varnishtest "Regression test for ticket #306, random director ignoring good backend" server s1 { diff --git a/bin/varnishtest/tests/r00310.vtc b/bin/varnishtest/tests/r00310.vtc index 88a41f1..5a7d98a 100644 --- a/bin/varnishtest/tests/r00310.vtc +++ b/bin/varnishtest/tests/r00310.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test obj.http.x-cache in vcl_hit" +varnishtest "Test obj.http.x-cache in vcl_hit" varnish v1 -badvcl { backend foo { .host = "localhost"; } @@ -9,5 +7,3 @@ varnish v1 -badvcl { set obj.http.x-cache = "hit"; } } - - diff --git a/bin/varnishtest/tests/r00318.vtc b/bin/varnishtest/tests/r00318.vtc index 9cab6af..0170c3d 100644 --- a/bin/varnishtest/tests/r00318.vtc +++ b/bin/varnishtest/tests/r00318.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "ESI with no body in response" +varnishtest "ESI with no body in response" server s1 { rxreq @@ -19,4 +17,3 @@ client c1 { rxresp expect resp.status == 302 } -run - diff --git a/bin/varnishtest/tests/r00325.vtc b/bin/varnishtest/tests/r00325.vtc index e3eabce..fabc001 100644 --- a/bin/varnishtest/tests/r00325.vtc +++ b/bin/varnishtest/tests/r00325.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check lack of response-string" +varnishtest "Check lack of response-string" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00326.vtc b/bin/varnishtest/tests/r00326.vtc index f61128b..0a7aa04 100644 --- a/bin/varnishtest/tests/r00326.vtc +++ b/bin/varnishtest/tests/r00326.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "No zerolength verbatim before " +varnishtest "No zerolength verbatim before " server s1 { rxreq diff --git a/bin/varnishtest/tests/r00345.vtc b/bin/varnishtest/tests/r00345.vtc index da49e4e..712aa98 100644 --- a/bin/varnishtest/tests/r00345.vtc +++ b/bin/varnishtest/tests/r00345.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "#345, ESI waitinglist trouble" +varnishtest "#345, ESI waitinglist trouble" server s1 { rxreq @@ -37,4 +35,3 @@ client c1 { rxresp expect resp.bodylen == 4 } -run - diff --git a/bin/varnishtest/tests/r00365.vtc b/bin/varnishtest/tests/r00365.vtc index 33ad869..dc1d590 100644 --- a/bin/varnishtest/tests/r00365.vtc +++ b/bin/varnishtest/tests/r00365.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test restarts in vcl_hit" +varnishtest "Test restarts in vcl_hit" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00386.vtc b/bin/varnishtest/tests/r00386.vtc index 3216e99..f5f1907 100644 --- a/bin/varnishtest/tests/r00386.vtc +++ b/bin/varnishtest/tests/r00386.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "#386, failure to insert include" +varnishtest "#386, failure to insert include" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00387.vtc b/bin/varnishtest/tests/r00387.vtc index 707446c..fb73e6b 100644 --- a/bin/varnishtest/tests/r00387.vtc +++ b/bin/varnishtest/tests/r00387.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for #387: too long chunk header" +varnishtest "Regression test for #387: too long chunk header" server s1 { rxreq @@ -20,4 +18,3 @@ client c1 { rxresp expect resp.status == 503 } -run - diff --git a/bin/varnishtest/tests/r00400.vtc b/bin/varnishtest/tests/r00400.vtc index 9ba702f..c732e50 100644 --- a/bin/varnishtest/tests/r00400.vtc +++ b/bin/varnishtest/tests/r00400.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for ticket 409" +varnishtest "Regression test for ticket 409" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00409.vtc b/bin/varnishtest/tests/r00409.vtc index 0b0ae08..4857fff 100644 --- a/bin/varnishtest/tests/r00409.vtc +++ b/bin/varnishtest/tests/r00409.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for ticket 409" +varnishtest "Regression test for ticket 409" varnish v1 -badvcl { sub vcl_recv { diff --git a/bin/varnishtest/tests/r00411.vtc b/bin/varnishtest/tests/r00411.vtc index a61e5a9..5677fc3 100644 --- a/bin/varnishtest/tests/r00411.vtc +++ b/bin/varnishtest/tests/r00411.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test restart in vcl_deliver" +varnishtest "Test restart in vcl_deliver" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00412.vtc b/bin/varnishtest/tests/r00412.vtc index 4e04a0b..8e28262 100644 --- a/bin/varnishtest/tests/r00412.vtc +++ b/bin/varnishtest/tests/r00412.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for ticket 412" +varnishtest "Regression test for ticket 412" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00416.vtc b/bin/varnishtest/tests/r00416.vtc index 05f9bd6..3d0ed71 100644 --- a/bin/varnishtest/tests/r00416.vtc +++ b/bin/varnishtest/tests/r00416.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for #416: a surplus of HTTP headers" +varnishtest "Regression test for #416: a surplus of HTTP headers" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00425.vtc b/bin/varnishtest/tests/r00425.vtc index 0a31b63..1c2c19f 100644 --- a/bin/varnishtest/tests/r00425.vtc +++ b/bin/varnishtest/tests/r00425.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "check late pass stalling" +varnishtest "check late pass stalling" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00427.vtc b/bin/varnishtest/tests/r00427.vtc index 0d1341a..963b7fe 100644 --- a/bin/varnishtest/tests/r00427.vtc +++ b/bin/varnishtest/tests/r00427.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "client close in ESI delivery" +varnishtest "client close in ESI delivery" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00433.vtc b/bin/varnishtest/tests/r00433.vtc index 5714ea7..f782f14 100644 --- a/bin/varnishtest/tests/r00433.vtc +++ b/bin/varnishtest/tests/r00433.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "noidx" +varnishtest "noidx" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00444.vtc b/bin/varnishtest/tests/r00444.vtc index c6f3b3b..f71f905 100644 --- a/bin/varnishtest/tests/r00444.vtc +++ b/bin/varnishtest/tests/r00444.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "purging on POST" +varnishtest "purging on POST" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00445.vtc b/bin/varnishtest/tests/r00445.vtc index 9085c36..9d29258 100644 --- a/bin/varnishtest/tests/r00445.vtc +++ b/bin/varnishtest/tests/r00445.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "zero length ESI include segmens with chunked encoding" +varnishtest "zero length ESI include segmens with chunked encoding" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00466.vtc b/bin/varnishtest/tests/r00466.vtc index 6a40a56..acff68a 100644 --- a/bin/varnishtest/tests/r00466.vtc +++ b/bin/varnishtest/tests/r00466.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check Range forwarding to backend" +varnishtest "Check Range forwarding to backend" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00476.vtc b/bin/varnishtest/tests/r00476.vtc index c6cc3f1..abf15e6 100644 --- a/bin/varnishtest/tests/r00476.vtc +++ b/bin/varnishtest/tests/r00476.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "zero length ESI include segments with chunked encoding" +varnishtest "zero length ESI include segments with chunked encoding" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00494.vtc b/bin/varnishtest/tests/r00494.vtc index 328d202..d1dedd1 100644 --- a/bin/varnishtest/tests/r00494.vtc +++ b/bin/varnishtest/tests/r00494.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "HTTP continuation lines" +varnishtest "HTTP continuation lines" #NB: careful about spaces and tabs in this test. @@ -24,4 +22,3 @@ client c1 { expect resp.http.barf == resp.http.barf expect resp.http.foo == resp.http.foo } -run - diff --git a/bin/varnishtest/tests/r00495.vtc b/bin/varnishtest/tests/r00495.vtc index 59d6de1..76ed867 100644 --- a/bin/varnishtest/tests/r00495.vtc +++ b/bin/varnishtest/tests/r00495.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "HTTP 1.0 backend not getting reused" +varnishtest "HTTP 1.0 backend not getting reused" server s1 { diff --git a/bin/varnishtest/tests/r00498.vtc b/bin/varnishtest/tests/r00498.vtc index 6e4e915..efdb93a 100644 --- a/bin/varnishtest/tests/r00498.vtc +++ b/bin/varnishtest/tests/r00498.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "very very very long return header" +varnishtest "very very very long return header" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00502.vtc b/bin/varnishtest/tests/r00502.vtc index b5d44aa..4b9d639 100644 --- a/bin/varnishtest/tests/r00502.vtc +++ b/bin/varnishtest/tests/r00502.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "multi element ban" +varnishtest "multi element ban" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00506.vtc b/bin/varnishtest/tests/r00506.vtc index 8079c5d..49722ef 100644 --- a/bin/varnishtest/tests/r00506.vtc +++ b/bin/varnishtest/tests/r00506.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Illegal HTTP status from backend" +varnishtest "Illegal HTTP status from backend" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00524.vtc b/bin/varnishtest/tests/r00524.vtc index 4b3c2a4..157eebe 100644 --- a/bin/varnishtest/tests/r00524.vtc +++ b/bin/varnishtest/tests/r00524.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for 524: HTTP/1.0 and ESI" +varnishtest "Regression test for 524: HTTP/1.0 and ESI" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00549.vtc b/bin/varnishtest/tests/r00549.vtc index e071c89..89894b0 100644 --- a/bin/varnishtest/tests/r00549.vtc +++ b/bin/varnishtest/tests/r00549.vtc @@ -1,6 +1,4 @@ -# $Id$ - -# Regression test for bad backend reply with ctrl char. +varnishtest "Regression test for bad backend reply with ctrl char." server s1 { rxreq diff --git a/bin/varnishtest/tests/r00558.vtc b/bin/varnishtest/tests/r00558.vtc index c37214d..0efb9e9 100644 --- a/bin/varnishtest/tests/r00558.vtc +++ b/bin/varnishtest/tests/r00558.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "error from vcl_recv{} has no numeric code" +varnishtest "error from vcl_recv{} has no numeric code" server s1 { diff --git a/bin/varnishtest/tests/r00561.vtc b/bin/varnishtest/tests/r00561.vtc index 0c91b51..0a273b0 100644 --- a/bin/varnishtest/tests/r00561.vtc +++ b/bin/varnishtest/tests/r00561.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Junk request should not go to vcl_error" +varnishtest "Junk request should not go to vcl_error" server s1 { rxreq @@ -22,4 +20,3 @@ client c1 { txreq rxresp } -run - diff --git a/bin/varnishtest/tests/r00590.vtc b/bin/varnishtest/tests/r00590.vtc index ef954f9..d865fe9 100644 --- a/bin/varnishtest/tests/r00590.vtc +++ b/bin/varnishtest/tests/r00590.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for 590" +varnishtest "Regression test for 590" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00612.vtc b/bin/varnishtest/tests/r00612.vtc index dc2c3fa..defaeca 100644 --- a/bin/varnishtest/tests/r00612.vtc +++ b/bin/varnishtest/tests/r00612.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Url workspace gets overwritten/reused" +varnishtest "Url workspace gets overwritten/reused" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00641.vtc b/bin/varnishtest/tests/r00641.vtc index be9d0c5..ef825d7 100644 --- a/bin/varnishtest/tests/r00641.vtc +++ b/bin/varnishtest/tests/r00641.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for 524: HTTP/1.0 and ESI" +varnishtest "Regression test for 524: HTTP/1.0 and ESI" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00655.vtc b/bin/varnishtest/tests/r00655.vtc index f6b7f67..c788219 100644 --- a/bin/varnishtest/tests/r00655.vtc +++ b/bin/varnishtest/tests/r00655.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test nested /*...*/ comments " +varnishtest "Test nested /*...*/ comments " varnish v1 -badvcl { diff --git a/bin/varnishtest/tests/r00667.vtc b/bin/varnishtest/tests/r00667.vtc index 19d5cb9..1555df1 100644 --- a/bin/varnishtest/tests/r00667.vtc +++ b/bin/varnishtest/tests/r00667.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "things stuck on busy object" +varnishtest "things stuck on busy object" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00679.vtc b/bin/varnishtest/tests/r00679.vtc index 825df8b..a79b4c9 100644 --- a/bin/varnishtest/tests/r00679.vtc +++ b/bin/varnishtest/tests/r00679.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "pass + HEAD" +varnishtest "pass + HEAD" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00686.vtc b/bin/varnishtest/tests/r00686.vtc index 9e3e4b3..2163ce4 100644 --- a/bin/varnishtest/tests/r00686.vtc +++ b/bin/varnishtest/tests/r00686.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that cache-control headers are collapsed" +varnishtest "Check that cache-control headers are collapsed" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00693.vtc b/bin/varnishtest/tests/r00693.vtc index cc916da..6cf7b30 100644 --- a/bin/varnishtest/tests/r00693.vtc +++ b/bin/varnishtest/tests/r00693.vtc @@ -1,7 +1,4 @@ -# $Id$ -# - -test "check boundary condition on vrt_assemble_string()" +varnishtest "check boundary condition on vrt_assemble_string()" feature 64bit diff --git a/bin/varnishtest/tests/r00694.vtc b/bin/varnishtest/tests/r00694.vtc index 372b823..da2d9a5 100644 --- a/bin/varnishtest/tests/r00694.vtc +++ b/bin/varnishtest/tests/r00694.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Wrong calculation of last storage segment length" +varnishtest "Wrong calculation of last storage segment length" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00700.vtc b/bin/varnishtest/tests/r00700.vtc index eebc7a1..a831430 100644 --- a/bin/varnishtest/tests/r00700.vtc +++ b/bin/varnishtest/tests/r00700.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "check TAB in 3 header field" +varnishtest "check TAB in 3 header field" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00702.vtc b/bin/varnishtest/tests/r00702.vtc index 15ac4fa..a96624e 100644 --- a/bin/varnishtest/tests/r00702.vtc +++ b/bin/varnishtest/tests/r00702.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Range bug" +varnishtest "Range bug" server s1 { rxreq @@ -19,4 +17,3 @@ client c1 { expect resp.status == 206 expect resp.bodylen == 50 } -run - diff --git a/bin/varnishtest/tests/r00704.vtc b/bin/varnishtest/tests/r00704.vtc index 4f3992a..5ee5702 100644 --- a/bin/varnishtest/tests/r00704.vtc +++ b/bin/varnishtest/tests/r00704.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Range bug" +varnishtest "Range bug" server s1 { rxreq @@ -19,4 +17,3 @@ client c1 { expect resp.status == 206 expect resp.bodylen == 20 } -run - diff --git a/bin/varnishtest/tests/r00722.vtc b/bin/varnishtest/tests/r00722.vtc index 4756b0c..8d7dc24 100644 --- a/bin/varnishtest/tests/r00722.vtc +++ b/bin/varnishtest/tests/r00722.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Director cleanup fails on vcl.discard" +varnishtest "Director cleanup fails on vcl.discard" server s1 { rxreq @@ -28,4 +26,3 @@ client c1 { txreq rxresp } -run - diff --git a/bin/varnishtest/tests/r00730.vtc b/bin/varnishtest/tests/r00730.vtc index c61e57f..6ed2847 100644 --- a/bin/varnishtest/tests/r00730.vtc +++ b/bin/varnishtest/tests/r00730.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that HEAD returns Content-Length: if backend provides" +varnishtest "Check that HEAD returns Content-Length: if backend provides" server s1 { rxreq @@ -30,4 +28,3 @@ client c1 { rxresp -no_obj expect resp.http.content-length == 6 } -run - diff --git a/bin/varnishtest/tests/r00733.vtc b/bin/varnishtest/tests/r00733.vtc index 701a72b..4d6dd05 100644 --- a/bin/varnishtest/tests/r00733.vtc +++ b/bin/varnishtest/tests/r00733.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "HTTP/1.1 Backend sends no length hint" +varnishtest "HTTP/1.1 Backend sends no length hint" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00742.vtc b/bin/varnishtest/tests/r00742.vtc index 851dfa2..9005fec 100644 --- a/bin/varnishtest/tests/r00742.vtc +++ b/bin/varnishtest/tests/r00742.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "% escapes in VCL source and vcl.show" +varnishtest "% escapes in VCL source and vcl.show" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00763.vtc b/bin/varnishtest/tests/r00763.vtc index 644b953..24a4d6f 100644 --- a/bin/varnishtest/tests/r00763.vtc +++ b/bin/varnishtest/tests/r00763.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Vary header with extra colon" +varnishtest "Vary header with extra colon" server s1 { rxreq @@ -14,5 +12,3 @@ client c1 { rxresp expect resp.http.vary == ": foo" } -run - - diff --git a/bin/varnishtest/tests/r00769.vtc b/bin/varnishtest/tests/r00769.vtc index 0216d04..b464914 100644 --- a/bin/varnishtest/tests/r00769.vtc +++ b/bin/varnishtest/tests/r00769.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test that set status code is readable again for obj.status and beresp.status" +varnishtest "Test that set status code is readable again for obj.status and beresp.status" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00776.vtc b/bin/varnishtest/tests/r00776.vtc index 897f9e7..776810e 100644 --- a/bin/varnishtest/tests/r00776.vtc +++ b/bin/varnishtest/tests/r00776.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Edge case of chunked encoding, trimming storage to length." +varnishtest "Edge case of chunked encoding, trimming storage to length." server s1 { rxreq diff --git a/bin/varnishtest/tests/r00781.vtc b/bin/varnishtest/tests/r00781.vtc index e0d0af9..94d0132 100644 --- a/bin/varnishtest/tests/r00781.vtc +++ b/bin/varnishtest/tests/r00781.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "NULL assignment to line1 fields." +varnishtest "NULL assignment to line1 fields." server s1 { rxreq diff --git a/bin/varnishtest/tests/r00789.vtc b/bin/varnishtest/tests/r00789.vtc index 60a5e6e..c323af4 100644 --- a/bin/varnishtest/tests/r00789.vtc +++ b/bin/varnishtest/tests/r00789.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "pass should not filter Content-Range header" +varnishtest "pass should not filter Content-Range header" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00795.vtc b/bin/varnishtest/tests/r00795.vtc index c4709d0..2d832aa 100644 --- a/bin/varnishtest/tests/r00795.vtc +++ b/bin/varnishtest/tests/r00795.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Content-Length in pass'ed 304 does not trigger body fetch" +varnishtest "Content-Length in pass'ed 304 does not trigger body fetch" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00801.vtc b/bin/varnishtest/tests/r00801.vtc index a5faa9a..f6fe5bd 100644 --- a/bin/varnishtest/tests/r00801.vtc +++ b/bin/varnishtest/tests/r00801.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for duplicate content-length in pass" +varnishtest "Regression test for duplicate content-length in pass" server s1 { rxreq @@ -20,5 +18,3 @@ client c1 { rxresp expect resp.http.content-length == "10" } -run - - diff --git a/bin/varnishtest/tests/r00803.vtc b/bin/varnishtest/tests/r00803.vtc index cdac1cb..7e47503 100644 --- a/bin/varnishtest/tests/r00803.vtc +++ b/bin/varnishtest/tests/r00803.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "304 response in pass mode" +varnishtest "304 response in pass mode" server s1 { rxreq @@ -20,5 +18,3 @@ client c1 { rxresp expect resp.status == 304 } -run - - diff --git a/bin/varnishtest/tests/r00806.vtc b/bin/varnishtest/tests/r00806.vtc index 92b5e2a..7e8fdbc 100644 --- a/bin/varnishtest/tests/r00806.vtc +++ b/bin/varnishtest/tests/r00806.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Content-Length in pass'ed 304 does not trigger body fetch" +varnishtest "Content-Length in pass'ed 304 does not trigger body fetch" server s1 { rxreq @@ -26,5 +24,3 @@ client c1 { expect resp.status == 304 expect resp.http.cl == 100 } -run - - diff --git a/bin/varnishtest/tests/r00832.vtc b/bin/varnishtest/tests/r00832.vtc index a1df55a..f334fab 100644 --- a/bin/varnishtest/tests/r00832.vtc +++ b/bin/varnishtest/tests/r00832.vtc @@ -1,6 +1,4 @@ -# $Id - -test "Regression #832 IPV6 parse bug" +varnishtest "Regression #832 IPV6 parse bug" varnish v1 -vcl { backend default { diff --git a/bin/varnishtest/tests/r00861.vtc b/bin/varnishtest/tests/r00861.vtc index 6842cbd..165795b 100644 --- a/bin/varnishtest/tests/r00861.vtc +++ b/bin/varnishtest/tests/r00861.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Regression test for ESI/Gzip issues in #861" +varnishtest "Regression test for ESI/Gzip issues in #861" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00873.vtc b/bin/varnishtest/tests/r00873.vtc index 6797559..56afc19 100644 --- a/bin/varnishtest/tests/r00873.vtc +++ b/bin/varnishtest/tests/r00873.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Ticket #873" +varnishtest "Ticket #873" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00878.vtc b/bin/varnishtest/tests/r00878.vtc index c57e511..6997189 100644 --- a/bin/varnishtest/tests/r00878.vtc +++ b/bin/varnishtest/tests/r00878.vtc @@ -1,6 +1,4 @@ -#!/bin/sh - -test "Loading vmods in subsequent VCLs" +varnishtest "Loading vmods in subsequent VCLs" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00887.vtc b/bin/varnishtest/tests/r00887.vtc index 697be6e..fb9843c 100644 --- a/bin/varnishtest/tests/r00887.vtc +++ b/bin/varnishtest/tests/r00887.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Ticket #887" +varnishtest "Ticket #887" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00894.vtc b/bin/varnishtest/tests/r00894.vtc index c22037f..d3b9856 100644 --- a/bin/varnishtest/tests/r00894.vtc +++ b/bin/varnishtest/tests/r00894.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Ticket #894" +varnishtest "Ticket #894" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00896.vtc b/bin/varnishtest/tests/r00896.vtc index 6eb4287..280a176 100644 --- a/bin/varnishtest/tests/r00896.vtc +++ b/bin/varnishtest/tests/r00896.vtc @@ -1,4 +1,4 @@ -test "Ticket #896, strings over 256 bytes" +varnishtest "Ticket #896, strings over 256 bytes" server s1 { rxreq diff --git a/bin/varnishtest/tests/r00902.vtc b/bin/varnishtest/tests/r00902.vtc index e082529..67e4c96 100644 --- a/bin/varnishtest/tests/r00902.vtc +++ b/bin/varnishtest/tests/r00902.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Ticket #902 http_CollectHdr() failure on consequitive headers" +varnishtest "Ticket #902 http_CollectHdr() failure on consequitive headers" server s1 { rxreq diff --git a/bin/varnishtest/tests/s00000.vtc b/bin/varnishtest/tests/s00000.vtc index a0184ce..717dd02 100644 --- a/bin/varnishtest/tests/s00000.vtc +++ b/bin/varnishtest/tests/s00000.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Simple expiry test" +varnishtest "Simple expiry test" server s1 { rxreq diff --git a/bin/varnishtest/tests/s00001.vtc b/bin/varnishtest/tests/s00001.vtc index f907723..1dd34bc 100644 --- a/bin/varnishtest/tests/s00001.vtc +++ b/bin/varnishtest/tests/s00001.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Simple expiry test (fully reaped object)" +varnishtest "Simple expiry test (fully reaped object)" server s1 { rxreq diff --git a/bin/varnishtest/tests/s00002.vtc b/bin/varnishtest/tests/s00002.vtc index b0bc60a..f7b8820 100644 --- a/bin/varnishtest/tests/s00002.vtc +++ b/bin/varnishtest/tests/s00002.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check grace with sick backends" +varnishtest "Check grace with sick backends" server s1 { rxreq diff --git a/bin/varnishtest/tests/s00003.vtc b/bin/varnishtest/tests/s00003.vtc index 4277a97..b7476d7 100644 --- a/bin/varnishtest/tests/s00003.vtc +++ b/bin/varnishtest/tests/s00003.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check saint mode with sick pages" +varnishtest "Check saint mode with sick pages" server s1 { timeout 10 diff --git a/bin/varnishtest/tests/t00000.vtc b/bin/varnishtest/tests/t00000.vtc index 7116b42..57ab7c7 100644 --- a/bin/varnishtest/tests/t00000.vtc +++ b/bin/varnishtest/tests/t00000.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Ticket #873" +varnishtest "Ticket #873" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00000.vtc b/bin/varnishtest/tests/v00000.vtc index ac565cb..697dc53 100644 --- a/bin/varnishtest/tests/v00000.vtc +++ b/bin/varnishtest/tests/v00000.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL/VRT: req.grace, obj.ttl and obj.grace" +varnishtest "VCL/VRT: req.grace, obj.ttl and obj.grace" server s1 { diff --git a/bin/varnishtest/tests/v00001.vtc b/bin/varnishtest/tests/v00001.vtc index ce7d609..644e737 100644 --- a/bin/varnishtest/tests/v00001.vtc +++ b/bin/varnishtest/tests/v00001.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL/VRT: url/request/proto/response/status" +varnishtest "VCL/VRT: url/request/proto/response/status" server s1 { diff --git a/bin/varnishtest/tests/v00002.vtc b/bin/varnishtest/tests/v00002.vtc index d7852e8..586cfac 100644 --- a/bin/varnishtest/tests/v00002.vtc +++ b/bin/varnishtest/tests/v00002.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL: test syntax/semantic checks on backend decls. (vcc_backend.c)" +varnishtest "VCL: test syntax/semantic checks on backend decls. (vcc_backend.c)" # Missing backend varnish v1 -badvcl { @@ -192,4 +190,3 @@ varnish v1 -badvcl { .probe = { .expected_response = 13; } } } - diff --git a/bin/varnishtest/tests/v00003.vtc b/bin/varnishtest/tests/v00003.vtc index 0104584..ec4248d 100644 --- a/bin/varnishtest/tests/v00003.vtc +++ b/bin/varnishtest/tests/v00003.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL: test syntax/semantic checks on director decls." +varnishtest "VCL: test syntax/semantic checks on director decls." # syntax in inline backend varnish v1 -badvcl { diff --git a/bin/varnishtest/tests/v00004.vtc b/bin/varnishtest/tests/v00004.vtc index c2318fd..b5419a1 100644 --- a/bin/varnishtest/tests/v00004.vtc +++ b/bin/varnishtest/tests/v00004.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL: test creation/destruction of backends" +varnishtest "VCL: test creation/destruction of backends" varnish v1 -vcl { backend b1 { diff --git a/bin/varnishtest/tests/v00005.vtc b/bin/varnishtest/tests/v00005.vtc index da673ed..a84d3be 100644 --- a/bin/varnishtest/tests/v00005.vtc +++ b/bin/varnishtest/tests/v00005.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL: test backend probe syntax" +varnishtest "VCL: test backend probe syntax" # Check status definition varnish v1 -vcl { diff --git a/bin/varnishtest/tests/v00006.vtc b/bin/varnishtest/tests/v00006.vtc index 7f88652..f3faace 100644 --- a/bin/varnishtest/tests/v00006.vtc +++ b/bin/varnishtest/tests/v00006.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL: Test backend retirement" +varnishtest "VCL: Test backend retirement" # First do one request to get a work-thread that holds a VCL reference diff --git a/bin/varnishtest/tests/v00007.vtc b/bin/varnishtest/tests/v00007.vtc index 2e1a465..5768c02 100644 --- a/bin/varnishtest/tests/v00007.vtc +++ b/bin/varnishtest/tests/v00007.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test random director" +varnishtest "Test random director" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00008.vtc b/bin/varnishtest/tests/v00008.vtc index 82bfe72..9cd01eb 100644 --- a/bin/varnishtest/tests/v00008.vtc +++ b/bin/varnishtest/tests/v00008.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test host header specification" +varnishtest "Test host header specification" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00009.vtc b/bin/varnishtest/tests/v00009.vtc index f61e6a8..04b8ccb 100644 --- a/bin/varnishtest/tests/v00009.vtc +++ b/bin/varnishtest/tests/v00009.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test round robin director" +varnishtest "Test round robin director" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00010.vtc b/bin/varnishtest/tests/v00010.vtc index 259894f..ec7b947 100644 --- a/bin/varnishtest/tests/v00010.vtc +++ b/bin/varnishtest/tests/v00010.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL: check panic and restart" +varnishtest "VCL: check panic and restart" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00011.vtc b/bin/varnishtest/tests/v00011.vtc index d62cff9..6cce4de 100644 --- a/bin/varnishtest/tests/v00011.vtc +++ b/bin/varnishtest/tests/v00011.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test vcl purging" +varnishtest "Test vcl purging" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00012.vtc b/bin/varnishtest/tests/v00012.vtc index dc7417c..285f2c1 100644 --- a/bin/varnishtest/tests/v00012.vtc +++ b/bin/varnishtest/tests/v00012.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check backend connection limit" +varnishtest "Check backend connection limit" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00013.vtc b/bin/varnishtest/tests/v00013.vtc index 322df74..031e484 100644 --- a/bin/varnishtest/tests/v00013.vtc +++ b/bin/varnishtest/tests/v00013.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check obj.hits" +varnishtest "Check obj.hits" server s1 { rxreq @@ -39,4 +37,3 @@ client c1 { expect resp.status == 200 expect resp.http.foo == 2 } -run - diff --git a/bin/varnishtest/tests/v00014.vtc b/bin/varnishtest/tests/v00014.vtc index eff1f6c..206e8bc 100644 --- a/bin/varnishtest/tests/v00014.vtc +++ b/bin/varnishtest/tests/v00014.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check req.backend.healthy" +varnishtest "Check req.backend.healthy" server s1 { rxreq @@ -58,4 +56,3 @@ client c1 { rxresp expect resp.status == 200 } -run - diff --git a/bin/varnishtest/tests/v00015.vtc b/bin/varnishtest/tests/v00015.vtc index c60bb45..c5441d0 100644 --- a/bin/varnishtest/tests/v00015.vtc +++ b/bin/varnishtest/tests/v00015.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check function calls with no action return" +varnishtest "Check function calls with no action return" server s1 { rxreq @@ -26,4 +24,3 @@ client c1 { rxresp expect resp.status == 200 } -run - diff --git a/bin/varnishtest/tests/v00016.vtc b/bin/varnishtest/tests/v00016.vtc index 7e80e16..691cc56 100644 --- a/bin/varnishtest/tests/v00016.vtc +++ b/bin/varnishtest/tests/v00016.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Various VCL compiler coverage tests" +varnishtest "Various VCL compiler coverage tests" shell "true > ${tmpdir}/_varnishtest_empty_file" diff --git a/bin/varnishtest/tests/v00017.vtc b/bin/varnishtest/tests/v00017.vtc index 1df6225..66d54fb 100644 --- a/bin/varnishtest/tests/v00017.vtc +++ b/bin/varnishtest/tests/v00017.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL compiler coverage test: vcc_acl.c" +varnishtest "VCL compiler coverage test: vcc_acl.c" varnish v1 -badvcl { backend b { .host = "127.0.0.1"; } @@ -92,4 +90,3 @@ varnish v1 -vcl { } sub vcl_recv { if (client.ip ~ a) { return(pass); } } } - diff --git a/bin/varnishtest/tests/v00018.vtc b/bin/varnishtest/tests/v00018.vtc index 13e39e0..2c129d7 100644 --- a/bin/varnishtest/tests/v00018.vtc +++ b/bin/varnishtest/tests/v00018.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL compiler coverage test: vcc_action.c" +varnishtest "VCL compiler coverage test: vcc_action.c" varnish v1 -vcl { backend b { .host = "127.0.0.1"; } diff --git a/bin/varnishtest/tests/v00019.vtc b/bin/varnishtest/tests/v00019.vtc index c09e31a..eabcdd0 100644 --- a/bin/varnishtest/tests/v00019.vtc +++ b/bin/varnishtest/tests/v00019.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL compiler coverage test: vcc_token.c" +varnishtest "VCL compiler coverage test: vcc_token.c" varnish v1 -badvcl " C{ " diff --git a/bin/varnishtest/tests/v00020.vtc b/bin/varnishtest/tests/v00020.vtc index abba9b7..1e36b43 100644 --- a/bin/varnishtest/tests/v00020.vtc +++ b/bin/varnishtest/tests/v00020.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL compiler coverage test: vcc_parse.c & vcc_expr.c" +varnishtest "VCL compiler coverage test: vcc_parse.c & vcc_expr.c" varnish v1 -vcl { backend b { .host = "127.0.0.1"; } diff --git a/bin/varnishtest/tests/v00021.vtc b/bin/varnishtest/tests/v00021.vtc index b20432f..70a3266 100644 --- a/bin/varnishtest/tests/v00021.vtc +++ b/bin/varnishtest/tests/v00021.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "VCL compiler coverage test: vcc_xref.c" +varnishtest "VCL compiler coverage test: vcc_xref.c" varnish v1 -badvcl { backend b { .host = "127.0.0.1"; } diff --git a/bin/varnishtest/tests/v00022.vtc b/bin/varnishtest/tests/v00022.vtc index b785646..15b9a90 100644 --- a/bin/varnishtest/tests/v00022.vtc +++ b/bin/varnishtest/tests/v00022.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Deeper test of random director" +varnishtest "Deeper test of random director" random diff --git a/bin/varnishtest/tests/v00023.vtc b/bin/varnishtest/tests/v00023.vtc index 6b9bccf..ca36194 100644 --- a/bin/varnishtest/tests/v00023.vtc +++ b/bin/varnishtest/tests/v00023.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test that obj.ttl = 0s prevents subsequent hits" +varnishtest "Test that obj.ttl = 0s prevents subsequent hits" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00024.vtc b/bin/varnishtest/tests/v00024.vtc index 4a27cca..9c2040c 100644 --- a/bin/varnishtest/tests/v00024.vtc +++ b/bin/varnishtest/tests/v00024.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Test that headers can be compared" +varnishtest "Test that headers can be compared" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00025.vtc b/bin/varnishtest/tests/v00025.vtc index a8c3c3c..aab2c83 100644 --- a/bin/varnishtest/tests/v00025.vtc +++ b/bin/varnishtest/tests/v00025.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "More VCL coverage" +varnishtest "More VCL coverage" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00026.vtc b/bin/varnishtest/tests/v00026.vtc index 0f09160..e7f4fa4 100644 --- a/bin/varnishtest/tests/v00026.vtc +++ b/bin/varnishtest/tests/v00026.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Hash director" +varnishtest "Hash director" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00027.vtc b/bin/varnishtest/tests/v00027.vtc index e9e32c6..42cb312 100644 --- a/bin/varnishtest/tests/v00027.vtc +++ b/bin/varnishtest/tests/v00027.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Check that backend named 'default' is the default" +varnishtest "Check that backend named 'default' is the default" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00028.vtc b/bin/varnishtest/tests/v00028.vtc index 5c64d23..c956517 100644 --- a/bin/varnishtest/tests/v00028.vtc +++ b/bin/varnishtest/tests/v00028.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Client director" +varnishtest "Client director" server s1 { rxreq @@ -57,5 +55,3 @@ client c1 { expect resp.http.be == s2 expect resp.bodylen == 4 } -run - - diff --git a/bin/varnishtest/tests/v00029.vtc b/bin/varnishtest/tests/v00029.vtc index c1e113c..6da2315 100644 --- a/bin/varnishtest/tests/v00029.vtc +++ b/bin/varnishtest/tests/v00029.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "DNS director" +varnishtest "DNS director" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00030.vtc b/bin/varnishtest/tests/v00030.vtc index 82c3422..a2dff48 100644 --- a/bin/varnishtest/tests/v00030.vtc +++ b/bin/varnishtest/tests/v00030.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "DNS director bad VCL tests" +varnishtest "DNS director bad VCL tests" varnish v1 -badvcl { director directorname dns { diff --git a/bin/varnishtest/tests/v00031.vtc b/bin/varnishtest/tests/v00031.vtc index 5bdfb65..0bae6e0 100644 --- a/bin/varnishtest/tests/v00031.vtc +++ b/bin/varnishtest/tests/v00031.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "param vcc_err_unref" +varnishtest "param vcc_err_unref" varnish v1 -badvcl { backend b { .host = "127.0.0.1"; } @@ -20,4 +18,3 @@ varnish v1 -badvcl { backend b { .host = "127.0.0.1"; } backend c { .host = "127.0.0.1"; } } - diff --git a/bin/varnishtest/tests/v00032.vtc b/bin/varnishtest/tests/v00032.vtc index 2999fdc..8bf4c69 100644 --- a/bin/varnishtest/tests/v00032.vtc +++ b/bin/varnishtest/tests/v00032.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Storage related vcl variables" +varnishtest "Storage related vcl variables" server s1 { rxreq diff --git a/bin/varnishtest/tests/v00033.vtc b/bin/varnishtest/tests/v00033.vtc index 6939855..403931d 100644 --- a/bin/varnishtest/tests/v00033.vtc +++ b/bin/varnishtest/tests/v00033.vtc @@ -1,6 +1,4 @@ -# $Id$ - -test "Stevedore variables and BYTES type test" +varnishtest "Stevedore variables and BYTES type test" server s1 { diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c index 0a33ada..e893be1 100644 --- a/bin/varnishtest/vtc.c +++ b/bin/varnishtest/vtc.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include @@ -326,7 +323,7 @@ reset_cmds(const struct cmds *cmd) */ static void -cmd_test(CMD_ARGS) +cmd_varnishtest(CMD_ARGS) { (void)priv; @@ -335,7 +332,7 @@ cmd_test(CMD_ARGS) if (av == NULL) return; - assert(!strcmp(av[0], "test")); + assert(!strcmp(av[0], "varnishtest")); vtc_log(vl, 1, "TEST %s", av[1]); AZ(av[2]); @@ -465,7 +462,7 @@ static const struct cmds cmds[] = { { "client", cmd_client }, { "varnish", cmd_varnish }, { "delay", cmd_delay }, - { "test", cmd_test }, + { "varnishtest",cmd_varnishtest }, { "shell", cmd_shell }, { "sema", cmd_sema }, { "random", cmd_random }, diff --git a/bin/varnishtest/vtc.h b/bin/varnishtest/vtc.h index 28a5ca3..16e27a9 100644 --- a/bin/varnishtest/vtc.h +++ b/bin/varnishtest/vtc.h @@ -25,7 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #include diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c index b93dcd3..c7a2588 100644 --- a/bin/varnishtest/vtc_client.c +++ b/bin/varnishtest/vtc_client.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c index 3e0fbab..e0d3ef0 100644 --- a/bin/varnishtest/vtc_http.c +++ b/bin/varnishtest/vtc_http.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c index 7e9c84c..3d5a5ac 100644 --- a/bin/varnishtest/vtc_log.c +++ b/bin/varnishtest/vtc_log.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c index d53e991..3f5d518 100644 --- a/bin/varnishtest/vtc_main.c +++ b/bin/varnishtest/vtc_main.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishtest/vtc_sema.c b/bin/varnishtest/vtc_sema.c index 7f60d2c..92b1a7a 100644 --- a/bin/varnishtest/vtc_sema.c +++ b/bin/varnishtest/vtc_sema.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishtest/vtc_server.c b/bin/varnishtest/vtc_server.c index 4d60fe2..a7871bd 100644 --- a/bin/varnishtest/vtc_server.c +++ b/bin/varnishtest/vtc_server.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c index 4f9c668..d416a5b 100644 --- a/bin/varnishtest/vtc_varnish.c +++ b/bin/varnishtest/vtc_varnish.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/bin/varnishtop/Makefile.am b/bin/varnishtop/Makefile.am index ee2ed32..200ed96 100644 --- a/bin/varnishtop/Makefile.am +++ b/bin/varnishtop/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c index 3b834a0..4224bf9 100644 --- a/bin/varnishtop/varnishtop.c +++ b/bin/varnishtop/varnishtop.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/configure.ac b/configure.ac index 1f19044..f401b45 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,3 @@ -# $Id$ - AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2010 Linpro AS]) diff --git a/doc/Makefile.am b/doc/Makefile.am index 177bdf8..8495bf7 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# CHANGELOGS = \ changes-2.1.0.html \ diff --git a/etc/Makefile.am b/etc/Makefile.am index 24faf56..e724822 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# EXTRA_DIST = zope-plone.vcl DISTCLEANFILES = default.vcl diff --git a/include/Makefile.am b/include/Makefile.am index a46ae72..e5b4348 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# pkginclude_HEADERS = \ vsm.h \ @@ -31,7 +31,6 @@ nobase_noinst_HEADERS = \ libvcl.h \ miniobj.h \ persistent.h \ - svnid.h \ vas.h \ vsha256.h \ vqueue.h \ diff --git a/include/argv.h b/include/argv.h index 2548ec5..d2ece25 100644 --- a/include/argv.h +++ b/include/argv.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ void FreeArgv(char **argv); diff --git a/include/ban_vars.h b/include/ban_vars.h index 2420c39..2ba0930 100644 --- a/include/ban_vars.h +++ b/include/ban_vars.h @@ -25,8 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Define which variables we can ban on, and which function does it. * */ diff --git a/include/binary_heap.h b/include/binary_heap.h index d8a4475..fb27169 100644 --- a/include/binary_heap.h +++ b/include/binary_heap.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Binary Heap API (see: http://en.wikipedia.org/wiki/Binary_heap) * * XXX: doesn't scale back the array of pointers when items are deleted. diff --git a/include/cli.h b/include/cli.h index 3734b0b..e5c4f0c 100644 --- a/include/cli.h +++ b/include/cli.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Public definition of the CLI protocol, part of the published Varnish-API. * * The overall structure of the protocol is a command-line like diff --git a/include/cli_common.h b/include/cli_common.h index 98904bb..68e7acd 100644 --- a/include/cli_common.h +++ b/include/cli_common.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ struct vlu; diff --git a/include/cli_priv.h b/include/cli_priv.h index 067c862..9d35181 100644 --- a/include/cli_priv.h +++ b/include/cli_priv.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Varnish process internal CLI stuff. * * XXX: at a latter date we may want to move some to cli.h/libvarnishapi diff --git a/include/cli_serve.h b/include/cli_serve.h index 07db8b6..d834b4d 100644 --- a/include/cli_serve.h +++ b/include/cli_serve.h @@ -25,8 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * */ struct cls; diff --git a/include/compat/daemon.h b/include/compat/daemon.h index 29fa9cd..54ff8d6 100644 --- a/include/compat/daemon.h +++ b/include/compat/daemon.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #ifndef COMPAT_DAEMON_H_INCLUDED diff --git a/include/compat/execinfo.h b/include/compat/execinfo.h index 6dc6e34..7b3b2e3 100644 --- a/include/compat/execinfo.h +++ b/include/compat/execinfo.h @@ -23,7 +23,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: execinfo.h,v 1.2 2004/07/19 05:20:29 sobomax Exp $ */ #ifndef COMPAT_EXECINFO_H_INCLUDED diff --git a/include/compat/setproctitle.h b/include/compat/setproctitle.h index 30eff42..85bb5e8 100644 --- a/include/compat/setproctitle.h +++ b/include/compat/setproctitle.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #ifndef COMPAT_SETPROCTITLE_H_INCLUDED diff --git a/include/compat/srandomdev.h b/include/compat/srandomdev.h index cf1c6c7..2433e49 100644 --- a/include/compat/srandomdev.h +++ b/include/compat/srandomdev.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #ifndef COMPAT_SRANDOMDEV_H_INCLUDED diff --git a/include/compat/strlcat.h b/include/compat/strlcat.h index b50c567..619e648 100644 --- a/include/compat/strlcat.h +++ b/include/compat/strlcat.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #ifndef COMPAT_STRLCAT_H_INCLUDED diff --git a/include/compat/strlcpy.h b/include/compat/strlcpy.h index 54fdf5d..9d2f842 100644 --- a/include/compat/strlcpy.h +++ b/include/compat/strlcpy.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #ifndef COMPAT_STRLCPY_H_INCLUDED diff --git a/include/compat/strndup.h b/include/compat/strndup.h index 3d68fc1..51a43b6 100644 --- a/include/compat/strndup.h +++ b/include/compat/strndup.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #ifndef COMPAT_STRNDUP_H_INCLUDED diff --git a/include/flopen.h b/include/flopen.h index c4b7f75..4bd0209 100644 --- a/include/flopen.h +++ b/include/flopen.h @@ -24,7 +24,6 @@ * 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 $ */ diff --git a/include/http_headers.h b/include/http_headers.h index b27966d..2ded005 100644 --- a/include/http_headers.h +++ b/include/http_headers.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Argument list: * --------------------------------------- * a Http header name diff --git a/include/http_response.h b/include/http_response.h index 9c9dd9e..8477c43 100644 --- a/include/http_response.h +++ b/include/http_response.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ HTTP_RESP(101, "Switching Protocols") diff --git a/include/libvarnish.h b/include/libvarnish.h index fb028d7..e706e55 100644 --- a/include/libvarnish.h +++ b/include/libvarnish.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #include diff --git a/include/libvcl.h b/include/libvcl.h index ac41d8b..9b95ac1 100644 --- a/include/libvcl.h +++ b/include/libvcl.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ struct vcc; diff --git a/include/miniobj.h b/include/miniobj.h index dfe7a59..e1db10d 100644 --- a/include/miniobj.h +++ b/include/miniobj.h @@ -3,7 +3,6 @@ * * This file is in the public domain. * - * $Id$ */ #define ALLOC_OBJ(to, type_magic) \ diff --git a/include/persistent.h b/include/persistent.h index 8a355a7..57ac628 100644 --- a/include/persistent.h +++ b/include/persistent.h @@ -25,7 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ /* diff --git a/include/svnid.h b/include/svnid.h deleted file mode 100644 index cf06a94..0000000 --- a/include/svnid.h +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * Copyright (c) 2009 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. - * - * $Id$ - */ - -#ifndef SVNID_H_INCLUDED -#define SVNID_H_INCLUDED - -#define SVNID(id) \ - static const char * const svnid __attribute__((__unused__)) = id; - -#endif diff --git a/include/varnishapi.h b/include/varnishapi.h index fd1e3b5..7524842 100644 --- a/include/varnishapi.h +++ b/include/varnishapi.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #ifndef VARNISHAPI_H_INCLUDED diff --git a/include/vas.h b/include/vas.h index 7632b16..6a4891f 100644 --- a/include/vas.h +++ b/include/vas.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * assert(), AN() and AZ() are static checks that should not happen. * In general asserts should be cheap, such as checking return * values and similar. diff --git a/include/vbm.h b/include/vbm.h index f01c6ee..4b71b86 100644 --- a/include/vbm.h +++ b/include/vbm.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Self-sizeing bitmap operations */ diff --git a/include/vct.h b/include/vct.h index 6e9f2c7..0ed53a8 100644 --- a/include/vct.h +++ b/include/vct.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #include diff --git a/include/vend.h b/include/vend.h index 5ffe268..d27b533 100644 --- a/include/vend.h +++ b/include/vend.h @@ -26,8 +26,6 @@ * From: * $FreeBSD: head/sys/sys/endian.h 121122 2003-10-15 20:05:57Z obrien $ * - * $Id$ - * * Endian conversion functions */ diff --git a/include/vev.h b/include/vev.h index c9c5444..879fcdc 100644 --- a/include/vev.h +++ b/include/vev.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #include diff --git a/include/vin.h b/include/vin.h index 1fc9cde..f0e0d95 100644 --- a/include/vin.h +++ b/include/vin.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * */ #ifndef VIN_H_INCLUDED diff --git a/include/vlu.h b/include/vlu.h index 60cfa17..e69c6ae 100644 --- a/include/vlu.h +++ b/include/vlu.h @@ -23,8 +23,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Functions for assembling a bytestream into text-lines and calling * a function on each. */ diff --git a/include/vmb.h b/include/vmb.h index e50768b..a10eb5a 100644 --- a/include/vmb.h +++ b/include/vmb.h @@ -25,8 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Memory barriers * * XXX: It is utterly braindamaged, that no standard facility for this diff --git a/include/vpf.h b/include/vpf.h index d9b9505..8845ee7 100644 --- a/include/vpf.h +++ b/include/vpf.h @@ -23,7 +23,6 @@ * 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 $ */ diff --git a/include/vqueue.h b/include/vqueue.h index d5eb32b..8ffd820 100644 --- a/include/vqueue.h +++ b/include/vqueue.h @@ -28,7 +28,6 @@ * * @(#)queue.h 8.5 (Berkeley) 8/20/94 * $FreeBSD: src/sys/sys/queue.h,v 1.68 2006/10/24 11:20:29 ru Exp $ - * $Id$ */ #ifndef VARNISH_QUEUE_H diff --git a/include/vre.h b/include/vre.h index 67afd48..8d3ad55 100644 --- a/include/vre.h +++ b/include/vre.h @@ -25,8 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Regular expression support * */ diff --git a/include/vrt.h b/include/vrt.h index 4ed137e..18ebab7 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Runtime support for compiled VCL programs. * * XXX: When this file is changed, lib/libvcl/generate.py *MUST* be rerun. diff --git a/include/vsc.h b/include/vsc.h index f466542..1e714c7 100644 --- a/include/vsc.h +++ b/include/vsc.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #include diff --git a/include/vsc_all.h b/include/vsc_all.h index cde9c65..1ac9415 100644 --- a/include/vsc_all.h +++ b/include/vsc_all.h @@ -25,7 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ diff --git a/include/vsc_fields.h b/include/vsc_fields.h index ffb56db..a77939c 100644 --- a/include/vsc_fields.h +++ b/include/vsc_fields.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: vsc_fields.h 4857 2010-05-25 10:47:20Z phk $ - * * 3rd argument marks fields for inclusion in the per worker-thread * stats structure. */ diff --git a/include/vsl.h b/include/vsl.h index 8699d68..222167a 100644 --- a/include/vsl.h +++ b/include/vsl.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Define the layout of the shared memory log segment. * * NB: THIS IS NOT A PUBLIC API TO VARNISH! diff --git a/include/vsl_tags.h b/include/vsl_tags.h index 6a28832..088ea93 100644 --- a/include/vsl_tags.h +++ b/include/vsl_tags.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Define the tags in the shared memory in a reusable format. * Whoever includes this get to define what the SLTM macro does. * diff --git a/include/vsm.h b/include/vsm.h index 2beb530..0f67b1e 100644 --- a/include/vsm.h +++ b/include/vsm.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Define the layout of the shared memory log segment. * * NB: THIS IS NOT A PUBLIC API TO VARNISH! diff --git a/include/vss.h b/include/vss.h index 2f21721..5726685 100644 --- a/include/vss.h +++ b/include/vss.h @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ /* vss.c */ diff --git a/lib/Makefile.am b/lib/Makefile.am index 0ff096b..21146dc 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# SUBDIRS = \ libvarnishcompat \ diff --git a/lib/libvarnish/argv.c b/lib/libvarnish/argv.c index 2d5b5e0..b2f4243 100644 --- a/lib/libvarnish/argv.c +++ b/lib/libvarnish/argv.c @@ -38,9 +38,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/assert.c b/lib/libvarnish/assert.c index ed85e46..2b74e80 100644 --- a/lib/libvarnish/assert.c +++ b/lib/libvarnish/assert.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/binary_heap.c b/lib/libvarnish/binary_heap.c index 125f7a2..34ca793 100644 --- a/lib/libvarnish/binary_heap.c +++ b/lib/libvarnish/binary_heap.c @@ -34,9 +34,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnish/cli_auth.c b/lib/libvarnish/cli_auth.c index 36d39eb..b726eba 100644 --- a/lib/libvarnish/cli_auth.c +++ b/lib/libvarnish/cli_auth.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/cli_common.c b/lib/libvarnish/cli_common.c index c0efc27..4fa7429 100644 --- a/lib/libvarnish/cli_common.c +++ b/lib/libvarnish/cli_common.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnish/cli_serve.c b/lib/libvarnish/cli_serve.c index 31bdfe6..a666654 100644 --- a/lib/libvarnish/cli_serve.c +++ b/lib/libvarnish/cli_serve.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/flopen.c b/lib/libvarnish/flopen.c index 5e5d68a..43882fe 100644 --- a/lib/libvarnish/flopen.c +++ b/lib/libvarnish/flopen.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnish/num.c b/lib/libvarnish/num.c index 3c74fa3..7ba587e 100644 --- a/lib/libvarnish/num.c +++ b/lib/libvarnish/num.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/subproc.c b/lib/libvarnish/subproc.c index 5c4aaac..677405e 100644 --- a/lib/libvarnish/subproc.c +++ b/lib/libvarnish/subproc.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/tcp.c b/lib/libvarnish/tcp.c index ac54d57..bed3b99 100644 --- a/lib/libvarnish/tcp.c +++ b/lib/libvarnish/tcp.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnish/time.c b/lib/libvarnish/time.c index 02d4430..4c7abe7 100644 --- a/lib/libvarnish/time.c +++ b/lib/libvarnish/time.c @@ -46,9 +46,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnish/vct.c b/lib/libvarnish/vct.c index 1b49088..b3e2d6f 100644 --- a/lib/libvarnish/vct.c +++ b/lib/libvarnish/vct.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnish/version.c b/lib/libvarnish/version.c index e5472a1..3e1c5ce 100644 --- a/lib/libvarnish/version.c +++ b/lib/libvarnish/version.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include "libvarnish.h" diff --git a/lib/libvarnish/vev.c b/lib/libvarnish/vev.c index 8bf77e9..c44c38c 100644 --- a/lib/libvarnish/vev.c +++ b/lib/libvarnish/vev.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/vin.c b/lib/libvarnish/vin.c index 8bcb4aa..8ebd5fd 100644 --- a/lib/libvarnish/vin.c +++ b/lib/libvarnish/vin.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/vlu.c b/lib/libvarnish/vlu.c index 549b683..db107a1 100644 --- a/lib/libvarnish/vlu.c +++ b/lib/libvarnish/vlu.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/vpf.c b/lib/libvarnish/vpf.c index 6535d84..f0db8e9 100644 --- a/lib/libvarnish/vpf.c +++ b/lib/libvarnish/vpf.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/vsb.3 b/lib/libvarnish/vsb.3 index de3ff09..e0968c7 100644 --- a/lib/libvarnish/vsb.3 +++ b/lib/libvarnish/vsb.3 @@ -23,7 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id$ .\" $FreeBSD: src/share/man/man9/vsb.9,v 1.25 2005/12/23 11:49:52 phk Exp $ .\" .\" XXX diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c index bdc40b1..d3f044d 100644 --- a/lib/libvarnish/vsb.c +++ b/lib/libvarnish/vsb.c @@ -29,9 +29,6 @@ __FBSDID("$FreeBSD: head/sys/kern/subr_vsb.c 212750 2010-09-16 16:13:12Z mdf $ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnish/vsha256.c b/lib/libvarnish/vsha256.c index d074bdb..83dd6a1 100644 --- a/lib/libvarnish/vsha256.c +++ b/lib/libvarnish/vsha256.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnish/vss.c b/lib/libvarnish/vss.c index 29da71b..dfad6f7 100644 --- a/lib/libvarnish/vss.c +++ b/lib/libvarnish/vss.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnish/vtmpfile.c b/lib/libvarnish/vtmpfile.c index 9eddc4a..9b5c1b2 100644 --- a/lib/libvarnish/vtmpfile.c +++ b/lib/libvarnish/vtmpfile.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnishapi/Makefile.am b/lib/libvarnishapi/Makefile.am index 5879f74..d60dd13 100644 --- a/lib/libvarnishapi/Makefile.am +++ b/lib/libvarnishapi/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include @PCRE_CFLAGS@ diff --git a/lib/libvarnishapi/base64.c b/lib/libvarnishapi/base64.c index feb10f1..f55199d 100644 --- a/lib/libvarnishapi/base64.c +++ b/lib/libvarnishapi/base64.c @@ -6,9 +6,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include "varnishapi.h" diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c index f912514..5b870d5 100644 --- a/lib/libvarnishapi/vsc.c +++ b/lib/libvarnishapi/vsc.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c index 5014b38..6d5f4e5 100644 --- a/lib/libvarnishapi/vsl.c +++ b/lib/libvarnishapi/vsl.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnishapi/vsl_api.h b/lib/libvarnishapi/vsl_api.h index 0ae2870..29e0b4b 100644 --- a/lib/libvarnishapi/vsl_api.h +++ b/lib/libvarnishapi/vsl_api.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ struct vsl { diff --git a/lib/libvarnishapi/vsl_arg.c b/lib/libvarnishapi/vsl_arg.c index 0f02355..bc610f2 100644 --- a/lib/libvarnishapi/vsl_arg.c +++ b/lib/libvarnishapi/vsl_arg.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c index d6463ac..b0adc96 100644 --- a/lib/libvarnishapi/vsm.c +++ b/lib/libvarnishapi/vsm.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvarnishapi/vsm_api.h b/lib/libvarnishapi/vsm_api.h index b25f768..f88e0ee 100644 --- a/lib/libvarnishapi/vsm_api.h +++ b/lib/libvarnishapi/vsm_api.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ /* Parameters */ diff --git a/lib/libvarnishcompat/Makefile.am b/lib/libvarnishcompat/Makefile.am index f5b363e..a75daeb 100644 --- a/lib/libvarnishcompat/Makefile.am +++ b/lib/libvarnishcompat/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include diff --git a/lib/libvarnishcompat/daemon.c b/lib/libvarnishcompat/daemon.c index b88c39f..ef14e23 100644 --- a/lib/libvarnishcompat/daemon.c +++ b/lib/libvarnishcompat/daemon.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #ifndef HAVE_DAEMON #include diff --git a/lib/libvarnishcompat/execinfo.c b/lib/libvarnishcompat/execinfo.c index 8636a02..b1a17cf 100644 --- a/lib/libvarnishcompat/execinfo.c +++ b/lib/libvarnishcompat/execinfo.c @@ -26,9 +26,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id: execinfo.c,v 1.3 2004/07/19 05:21:09 sobomax Exp $") - #ifndef HAVE_BACKTRACE #include "compat/execinfo.h" diff --git a/lib/libvarnishcompat/setproctitle.c b/lib/libvarnishcompat/setproctitle.c index 8d15259..a8d46d1 100644 --- a/lib/libvarnishcompat/setproctitle.c +++ b/lib/libvarnishcompat/setproctitle.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #ifndef HAVE_SETPROCTITLE #include diff --git a/lib/libvarnishcompat/srandomdev.c b/lib/libvarnishcompat/srandomdev.c index 8097c13..47ae815 100644 --- a/lib/libvarnishcompat/srandomdev.c +++ b/lib/libvarnishcompat/srandomdev.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #ifndef HAVE_SRANDOMDEV #include diff --git a/lib/libvarnishcompat/strlcat.c b/lib/libvarnishcompat/strlcat.c index 7d0368c..387650d 100644 --- a/lib/libvarnishcompat/strlcat.c +++ b/lib/libvarnishcompat/strlcat.c @@ -1,4 +1,3 @@ -/* $Id$ */ /* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */ /* @@ -19,9 +18,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #ifndef HAVE_STRLCAT #include diff --git a/lib/libvarnishcompat/strlcpy.c b/lib/libvarnishcompat/strlcpy.c index 1aed2f8..aef313a 100644 --- a/lib/libvarnishcompat/strlcpy.c +++ b/lib/libvarnishcompat/strlcpy.c @@ -1,4 +1,3 @@ -/* $Id$ */ /* $OpenBSD: strlcpy.c,v 1.10 2005/08/08 08:05:37 espie Exp $ */ /* @@ -19,9 +18,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #ifndef HAVE_STRLCPY #include diff --git a/lib/libvarnishcompat/strndup.c b/lib/libvarnishcompat/strndup.c index 2de04ff..e39a489 100644 --- a/lib/libvarnishcompat/strndup.c +++ b/lib/libvarnishcompat/strndup.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #ifndef HAVE_STRNDUP #include diff --git a/lib/libvcl/Makefile.am b/lib/libvcl/Makefile.am index c594885..fa61423 100644 --- a/lib/libvcl/Makefile.am +++ b/lib/libvcl/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include diff --git a/lib/libvcl/generate.py b/lib/libvcl/generate.py index 262b25b..06620e5 100755 --- a/lib/libvcl/generate.py +++ b/lib/libvcl/generate.py @@ -29,8 +29,6 @@ # # Generate various .c and .h files for the VCL compiler and the interfaces # for it. -# -# $Id$ ####################################################################### # These are our tokens diff --git a/lib/libvcl/symbol_kind.h b/lib/libvcl/symbol_kind.h index 58b7a18..89422de 100644 --- a/lib/libvcl/symbol_kind.h +++ b/lib/libvcl/symbol_kind.h @@ -25,7 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ /*lint -save -e525 -e539 */ diff --git a/lib/libvcl/vcc_acl.c b/lib/libvcl/vcc_acl.c index 3412097..6d7e629 100644 --- a/lib/libvcl/vcc_acl.c +++ b/lib/libvcl/vcc_acl.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvcl/vcc_action.c b/lib/libvcl/vcc_action.c index dd36d23..fdb2c63 100644 --- a/lib/libvcl/vcc_action.c +++ b/lib/libvcl/vcc_action.c @@ -32,9 +32,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c index e0e7279..e8cd700 100644 --- a/lib/libvcl/vcc_backend.c +++ b/lib/libvcl/vcc_backend.c @@ -50,9 +50,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvcl/vcc_backend_util.c b/lib/libvcl/vcc_backend_util.c index 0c9de3c..2bde38d 100644 --- a/lib/libvcl/vcc_backend_util.c +++ b/lib/libvcl/vcc_backend_util.c @@ -30,9 +30,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvcl/vcc_compile.c b/lib/libvcl/vcc_compile.c index 3a518b8..103c141 100644 --- a/lib/libvcl/vcc_compile.c +++ b/lib/libvcl/vcc_compile.c @@ -52,9 +52,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvcl/vcc_compile.h b/lib/libvcl/vcc_compile.h index 8453f1a..df2c01f 100644 --- a/lib/libvcl/vcc_compile.h +++ b/lib/libvcl/vcc_compile.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ #include "vqueue.h" diff --git a/lib/libvcl/vcc_dir_dns.c b/lib/libvcl/vcc_dir_dns.c index e24dcc4..4fff785 100644 --- a/lib/libvcl/vcc_dir_dns.c +++ b/lib/libvcl/vcc_dir_dns.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvcl/vcc_dir_random.c b/lib/libvcl/vcc_dir_random.c index 1831bed..091d4d7 100644 --- a/lib/libvcl/vcc_dir_random.c +++ b/lib/libvcl/vcc_dir_random.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvcl/vcc_dir_round_robin.c b/lib/libvcl/vcc_dir_round_robin.c index 731e920..5292adf 100644 --- a/lib/libvcl/vcc_dir_round_robin.c +++ b/lib/libvcl/vcc_dir_round_robin.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c index 659b8b9..14ddf0b 100644 --- a/lib/libvcl/vcc_expr.c +++ b/lib/libvcl/vcc_expr.c @@ -31,9 +31,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvcl/vcc_parse.c b/lib/libvcl/vcc_parse.c index 535ecc2..8f694d3 100644 --- a/lib/libvcl/vcc_parse.c +++ b/lib/libvcl/vcc_parse.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvcl/vcc_priv.h b/lib/libvcl/vcc_priv.h index 12c0e04..ae5c712 100644 --- a/lib/libvcl/vcc_priv.h +++ b/lib/libvcl/vcc_priv.h @@ -26,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ - * * Stuff shared between main.c and fixed_token.c */ diff --git a/lib/libvcl/vcc_storage.c b/lib/libvcl/vcc_storage.c index 5263595..1acb2ed 100644 --- a/lib/libvcl/vcc_storage.c +++ b/lib/libvcl/vcc_storage.c @@ -54,9 +54,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvcl/vcc_string.c b/lib/libvcl/vcc_string.c index b7c8ede..ed42fa2 100644 --- a/lib/libvcl/vcc_string.c +++ b/lib/libvcl/vcc_string.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvcl/vcc_symb.c b/lib/libvcl/vcc_symb.c index 5ef4130..6c457b4 100644 --- a/lib/libvcl/vcc_symb.c +++ b/lib/libvcl/vcc_symb.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvcl/vcc_token.c b/lib/libvcl/vcc_token.c index 56c9672..14040b3 100644 --- a/lib/libvcl/vcc_token.c +++ b/lib/libvcl/vcc_token.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvcl/vcc_types.h b/lib/libvcl/vcc_types.h index aeaec90..959fe8e 100644 --- a/lib/libvcl/vcc_types.h +++ b/lib/libvcl/vcc_types.h @@ -25,7 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ */ /*lint -save -e525 -e539 */ diff --git a/lib/libvcl/vcc_var.c b/lib/libvcl/vcc_var.c index 8bec564..cb9054a 100644 --- a/lib/libvcl/vcc_var.c +++ b/lib/libvcl/vcc_var.c @@ -29,9 +29,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include diff --git a/lib/libvcl/vcc_vmod.c b/lib/libvcl/vcc_vmod.c index 45fe1cd..731b26d 100644 --- a/lib/libvcl/vcc_vmod.c +++ b/lib/libvcl/vcc_vmod.c @@ -28,9 +28,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include #include diff --git a/lib/libvcl/vcc_xref.c b/lib/libvcl/vcc_xref.c index a2c76f3..f76d910 100644 --- a/lib/libvcl/vcc_xref.c +++ b/lib/libvcl/vcc_xref.c @@ -39,9 +39,6 @@ #include "config.h" -#include "svnid.h" -SVNID("$Id$") - #include #include "vsb.h" diff --git a/lib/libvgz/Makefile.am b/lib/libvgz/Makefile.am index 20dc86b..c04242c 100644 --- a/lib/libvgz/Makefile.am +++ b/lib/libvgz/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# pkglib_LTLIBRARIES = libvgz.la diff --git a/lib/libvmod_std/Makefile.am b/lib/libvmod_std/Makefile.am index a284b09..7ddd0ac 100644 --- a/lib/libvmod_std/Makefile.am +++ b/lib/libvmod_std/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include diff --git a/lib/libvmod_std/vmod.py b/lib/libvmod_std/vmod.py index 4ad37d0..5ff69f0 100755 --- a/lib/libvmod_std/vmod.py +++ b/lib/libvmod_std/vmod.py @@ -36,8 +36,6 @@ # size of this structure in bytes, and the definition of the structure # as a string, suitable for inclusion in the C-source of the compile VCL # program. -# -# $Id$ import sys import re diff --git a/man/Makefile.am b/man/Makefile.am index 2a1e36c..bc662b6 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# dist_man_MANS = vcl.7 varnish-cli.7 MAINTAINERCLEANFILES = $(dist_man_MANS) diff --git a/redhat/Makefile.am b/redhat/Makefile.am index 22a11bd..86ddfd4 100644 --- a/redhat/Makefile.am +++ b/redhat/Makefile.am @@ -1,4 +1,4 @@ -# $Id$ +# EXTRA_DIST = \ README.redhat \ From phk at varnish-cache.org Wed Apr 20 12:56:14 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Wed, 20 Apr 2011 14:56:14 +0200 Subject: [master] 9f15b01 Only do ESI processing if we find some ESI in the object. Message-ID: commit 9f15b0123e386849e8ce057255c3fa5344c9b744 Author: Poul-Henning Kamp Date: Wed Apr 20 12:55:52 2011 +0000 Only do ESI processing if we find some ESI in the object. diff --git a/bin/varnishd/cache_esi_parse.c b/bin/varnishd/cache_esi_parse.c index 856d63d..6d30619 100644 --- a/bin/varnishd/cache_esi_parse.c +++ b/bin/varnishd/cache_esi_parse.c @@ -70,6 +70,7 @@ struct vep_state { /* parser state */ const char *state; unsigned startup; + unsigned esi_found; unsigned endtag; unsigned emptytag; @@ -655,6 +656,7 @@ VEP_parse(const struct sess *sp, const char *p, size_t l) vep_mark_verbatim(vep, p); p++; if (*++vep->esicmt_p == '\0') { + vep->esi_found = 1; vep->esicmt = NULL; vep->esicmt_p = NULL; /* @@ -727,6 +729,7 @@ VEP_parse(const struct sess *sp, const char *p, size_t l) vep->state = VEP_UNTIL; } else if (vep->state == VEP_ESITAG) { vep->in_esi_tag = 1; + vep->esi_found = 1; vep_mark_skip(vep, p); vep->match = vep_match_esi; vep->state = VEP_MATCH; @@ -1055,7 +1058,7 @@ VEP_Finish(const struct sess *sp) AZ(vsb_finish(vep->vsb)); l = vsb_len(vep->vsb); - if (vep->state != VEP_NOTXML && l > 0) + if (vep->esi_found && l > 0) return (vep->vsb); vsb_delete(vep->vsb); return (NULL); From tfheen at varnish-cache.org Tue Apr 26 08:37:13 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Tue, 26 Apr 2011 10:37:13 +0200 Subject: [master] 0e2be43 Fix up vcl reference Message-ID: commit 0e2be436bf46ed1ecb0b061669a40216b6fc09ef Author: Tollef Fog Heen Date: Thu Apr 21 12:35:29 2011 +0200 Fix up vcl reference diff --git a/doc/sphinx/faq/configuration.rst b/doc/sphinx/faq/configuration.rst index 89360a5..345edd7 100644 --- a/doc/sphinx/faq/configuration.rst +++ b/doc/sphinx/faq/configuration.rst @@ -13,9 +13,8 @@ VCL is an acronym for Varnish Configuration Language. In a VCL file, you config **Where is the documentation on VCL?** -We are working on documenting VCL. The `WIKI `_ contains some examples. - -Please also see ``man 7 vcl``. +Please see ``man 7 vcl``. There are also some real-world examples on +the `wiki `_ **How do I load VCL file while Varnish is running?** From tfheen at varnish-cache.org Tue Apr 26 09:02:10 2011 From: tfheen at varnish-cache.org (Tollef Fog Heen) Date: Tue, 26 Apr 2011 11:02:10 +0200 Subject: [master] a1e8527 Add configtest command to RH init script Message-ID: commit a1e852734dc6969e6b2027423d6f2793f3b0c8ba Author: Tollef Fog Heen Date: Tue Apr 26 11:01:50 2011 +0200 Add configtest command to RH init script diff --git a/redhat/varnish.initrc b/redhat/varnish.initrc index e7815ce..19cc274 100755 --- a/redhat/varnish.initrc +++ b/redhat/varnish.initrc @@ -114,6 +114,14 @@ rh_status_q() { rh_status >/dev/null 2>&1 } +configtest() { + if [ -f "$VARNISH_VCL_CONF" ]; then + $exec -f "$VARNISH_VCL_CONF" -C -n /tmp > /dev/null && echo "Syntax ok" + else + echo "VARNISH_VCL_CONF is unset or does not point to a file" + fi +} + # See how we were called. case "$1" in start) @@ -141,6 +149,9 @@ case "$1" in rh_status_q || exit 0 restart ;; + configtest) + configtest + ;; *) echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" From perbu at varnish-cache.org Thu Apr 28 10:00:44 2011 From: perbu at varnish-cache.org (Per Andreas Buer) Date: Thu, 28 Apr 2011 12:00:44 +0200 Subject: [master] c330395 when starting without a config the child wont run Message-ID: commit c330395a5f9272ad29e7f546ea3e03c1f2f976e4 Author: Per Buer Date: Fri Apr 1 15:52:15 2011 +0200 when starting without a config the child wont run diff --git a/doc/sphinx/reference/varnishd.rst b/doc/sphinx/reference/varnishd.rst index 1d3add5..1a3f2de 100644 --- a/doc/sphinx/reference/varnishd.rst +++ b/doc/sphinx/reference/varnishd.rst @@ -53,8 +53,10 @@ OPTIONS -F Run in the foreground. --f config Use the specified VCL configuration file instead of the builtin default. See vcl(7) for - details on VCL syntax. +-f config Use the specified VCL configuration file instead of the + builtin default. See vcl(7) for details on VCL + syntax. When no configuration is supplied varnishd will + not start the cache process. -g 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 group @@ -95,11 +97,14 @@ OPTIONS -M address:port Connect to this port and offer the command line - interface. Think of it as a reverse shell. + interface. Think of it as a reverse shell. When running with + -M and there is no backend defined the child process (the cache) + will not start initially. -t ttl - Specifies a hard minimum time to live for cached documents. This is a shortcut for - specifying the default_ttl run-time parameter. + Specifies a hard minimum time to live for cached + documents. This is a shortcut for specifying the + default_ttl run-time parameter. -u user Specifies the name of an unprivileged user to which the child process should switch before it starts accepting From perbu at varnish-cache.org Thu Apr 28 10:00:44 2011 From: perbu at varnish-cache.org (Per Andreas Buer) Date: Thu, 28 Apr 2011 12:00:44 +0200 Subject: [master] 0d710a0 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 0d710a0e534cb529d84ee1b8400828bf6ffaffbc Merge: c330395 2eae667 Author: Per Buer Date: Mon Apr 11 11:44:15 2011 +0200 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From perbu at varnish-cache.org Thu Apr 28 10:00:45 2011 From: perbu at varnish-cache.org (Per Andreas Buer) Date: Thu, 28 Apr 2011 12:00:45 +0200 Subject: [master] 2bcd564 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 2bcd564d67ab24b9dd401592ab63a8130355829e Merge: 0d710a0 aa10339 Author: Per Buer Date: Thu Apr 14 14:02:26 2011 +0200 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From perbu at varnish-cache.org Thu Apr 28 10:00:47 2011 From: perbu at varnish-cache.org (Per Andreas Buer) Date: Thu, 28 Apr 2011 12:00:47 +0200 Subject: [master] 0f47fbe Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 0f47fbe4f5fd431aa2f853968ea06f97e9d68345 Merge: 2bcd564 a1e8527 Author: Per Buer Date: Thu Apr 28 10:51:56 2011 +0200 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From perbu at varnish-cache.org Thu Apr 28 10:02:50 2011 From: perbu at varnish-cache.org (Per Andreas Buer) Date: Thu, 28 Apr 2011 12:02:50 +0200 Subject: [master] 446d522 Add varnish-cli to the TOC. Message-ID: commit 446d5226978bf1b7cc7c321f304da0bb4c728d2f Author: Per Buer Date: Thu Apr 28 12:02:27 2011 +0200 Add varnish-cli to the TOC. diff --git a/doc/sphinx/reference/index.rst b/doc/sphinx/reference/index.rst index 38dbd4a..2834983 100644 --- a/doc/sphinx/reference/index.rst +++ b/doc/sphinx/reference/index.rst @@ -7,6 +7,7 @@ The Varnish Reference Manual .. toctree:: vcl.rst + varnish-cli.rst varnishadm.rst varnishd.rst varnishhist.rst From phk at varnish-cache.org Fri Apr 29 09:38:43 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Fri, 29 Apr 2011 11:38:43 +0200 Subject: [master] b8ceaaa Various polishing of the ESI deliver code. Message-ID: commit b8ceaaa8bea843e378d4fe87851e6122c03754ab Author: Poul-Henning Kamp Date: Wed Apr 20 14:21:34 2011 +0000 Various polishing of the ESI deliver code. diff --git a/bin/varnishd/cache_esi_deliver.c b/bin/varnishd/cache_esi_deliver.c index c06679e..33ce9b8 100644 --- a/bin/varnishd/cache_esi_deliver.c +++ b/bin/varnishd/cache_esi_deliver.c @@ -253,7 +253,7 @@ ESI_Deliver(struct sess *sp) if (isgzip && !(sp->wrk->res_mode & RES_GUNZIP)) { assert(sizeof gzip_hdr == 10); /* Send out the gzip header */ - WRW_Write(sp->wrk, gzip_hdr, 10); + (void)WRW_Write(sp->wrk, gzip_hdr, 10); sp->wrk->l_crc = 0; sp->wrk->gzip_resp = 1; sp->wrk->crc = crc32(0L, Z_NULL, 0); @@ -311,7 +311,7 @@ ESI_Deliver(struct sess *sp) * We have a gzip'ed VEC and delivers * a gzip'ed ESI response. */ - WRW_Write(sp->wrk, st->ptr + off, l2); + (void)WRW_Write(sp->wrk, st->ptr + off, l2); } else if (sp->wrk->gzip_resp) { /* * A gzip'ed ESI response, but the VEC @@ -338,7 +338,7 @@ ESI_Deliver(struct sess *sp) /* * Ungzip'ed VEC, ungzip'ed ESI response */ - WRW_Write(sp->wrk, st->ptr + off, l2); + (void)WRW_Write(sp->wrk, st->ptr + off, l2); } off += l2; if (off == st->len) { @@ -377,7 +377,7 @@ ESI_Deliver(struct sess *sp) r = (void*)strchr((const char*)q, '\0'); AN(r); if (obufl > 0) { - WRW_Write(sp->wrk, obuf, obufl); + (void)WRW_Write(sp->wrk, obuf, obufl); obufl = 0; } if (WRW_Flush(sp->wrk)) { @@ -397,7 +397,7 @@ ESI_Deliver(struct sess *sp) } if (vgz != NULL) { if (obufl > 0) - WRW_Write(sp->wrk, obuf, obufl); + (void)WRW_Write(sp->wrk, obuf, obufl); VGZ_Destroy(&vgz); } if (sp->wrk->gzip_resp && sp->esi_level == 0) { @@ -414,7 +414,7 @@ ESI_Deliver(struct sess *sp) /* MOD(2^32) length */ vle32enc(tailbuf + 9, sp->wrk->l_crc); - WRW_Write(sp->wrk, tailbuf, 13); + (void)WRW_Write(sp->wrk, tailbuf, 13); } (void)WRW_Flush(sp->wrk); } @@ -454,7 +454,7 @@ ved_deliver_byterange(const struct sess *sp, ssize_t low, ssize_t high) //printf("[2-] %jd %jd\n", lx, lx + l); assert(lx >= low && lx + l <= high); if (l != 0) - WRW_Write(sp->wrk, p, l); + (void)WRW_Write(sp->wrk, p, l); if (lx + st->len > high) return(p[l]); lx += st->len; @@ -506,7 +506,7 @@ ESI_DeliverChild(const struct sess *sp) */ *dbits = ved_deliver_byterange(sp, start/8, last/8); *dbits &= ~(1U << (last & 7)); - WRW_Write(sp->wrk, dbits, 1); + (void)WRW_Write(sp->wrk, dbits, 1); cc = ved_deliver_byterange(sp, 1 + last/8, stop/8); switch((int)(stop & 7)) { case 0: /* xxxxxxxx */ @@ -550,7 +550,7 @@ ESI_DeliverChild(const struct sess *sp) INCOMPL(); } if (lpad > 0) - WRW_Write(sp->wrk, dbits + 1, lpad); + (void)WRW_Write(sp->wrk, dbits + 1, lpad); st = VTAILQ_LAST(&sp->obj->store, storagehead); assert(st->len > 8); diff --git a/bin/varnishd/cache_gzip.c b/bin/varnishd/cache_gzip.c index 60e296d..0c29293 100644 --- a/bin/varnishd/cache_gzip.c +++ b/bin/varnishd/cache_gzip.c @@ -378,7 +378,7 @@ VGZ_WrwGunzip(struct sess *sp, struct vgz *vg, void *ibuf, ssize_t ibufl, return (-1); } if (obufl == *obufp || i == VGZ_STUCK) { - WRW_Write(sp->wrk, obuf, *obufp); + (void)WRW_Write(sp->wrk, obuf, *obufp); if (WRW_Flush(sp->wrk)) return (VGZ_SOCKET); *obufp = 0; diff --git a/bin/varnishd/cache_wrw.c b/bin/varnishd/cache_wrw.c index 10fe645..688a5a0 100644 --- a/bin/varnishd/cache_wrw.c +++ b/bin/varnishd/cache_wrw.c @@ -203,6 +203,13 @@ WRW_Chunked(struct worker *w) assert(wrw->ciov < wrw->siov); } +/* + * XXX: It is not worth the complexity to attempt to get the + * XXX: end of chunk into the WRW_Flush(), because most of the time + * XXX: if not always, that is a no-op anyway, because the calling + * XXX: code already called WRW_Flush() to release local storage. + */ + void WRW_EndChunk(struct worker *w) { @@ -214,9 +221,9 @@ WRW_EndChunk(struct worker *w) assert(wrw->ciov < wrw->siov); (void)WRW_Flush(w); wrw->ciov = wrw->siov; - (void)WRW_Flush(w); + wrw->niov = 0; wrw->cliov = 0; - WRW_Write(w, "0\r\n\r\n", -1); + (void)WRW_Write(w, "0\r\n\r\n", -1); } From phk at varnish-cache.org Fri Apr 29 09:38:43 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Fri, 29 Apr 2011 11:38:43 +0200 Subject: [master] 7a4538d Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache Message-ID: commit 7a4538d0b4d3061d94fa0987227e0c98dbb4a40b Merge: b8ceaaa 446d522 Author: Poul-Henning Kamp Date: Fri Apr 29 09:21:08 2011 +0000 Merge branch 'master' of ssh://git.varnish-cache.org/git/varnish-cache From phk at varnish-cache.org Fri Apr 29 09:38:44 2011 From: phk at varnish-cache.org (Poul-Henning Kamp) Date: Fri, 29 Apr 2011 11:38:44 +0200 Subject: [master] 5d5c345 Put busy elements at the tail of the objhdr list, move them to the front when unbusy'ing. This should still keep the list roughly sorted in Date: order, but keep the busy objects out of the way for lookups. Message-ID: commit 5d5c3453a97ae9743dec9c8d15b60978b7c9d3e4 Author: Poul-Henning Kamp Date: Fri Apr 29 09:37:22 2011 +0000 Put busy elements at the tail of the objhdr list, move them to the front when unbusy'ing. This should still keep the list roughly sorted in Date: order, but keep the busy objects out of the way for lookups. diff --git a/bin/varnishd/cache_hash.c b/bin/varnishd/cache_hash.c index 249e1a7..bb18642 100644 --- a/bin/varnishd/cache_hash.c +++ b/bin/varnishd/cache_hash.c @@ -281,8 +281,7 @@ HSH_Insert(const struct sess *sp) CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); AZ(oc->flags & OC_F_BUSY); - /* XXX: Should this not be ..._HEAD now ? */ - VTAILQ_INSERT_TAIL(&oh->objcs, oc, list); + VTAILQ_INSERT_HEAD(&oh->objcs, oc, list); /* NB: do not deref objhead the new object inherits our reference */ oc->objhead = oh; Lck_Unlock(&oh->mtx); @@ -446,7 +445,11 @@ HSH_Lookup(struct sess *sp, struct objhead **poh) AN(oc->flags & OC_F_BUSY); oc->refcnt = 1; - VTAILQ_INSERT_HEAD(&oh->objcs, oc, list); + /* + * Busy objects go on the tail, so they will not trip up searches. + * HSH_Unbusy() will move them to the front. + */ + VTAILQ_INSERT_TAIL(&oh->objcs, oc, list); oc->objhead = oh; /* NB: do not deref objhead the new object inherits our reference */ Lck_Unlock(&oh->mtx); @@ -600,8 +603,12 @@ HSH_Unbusy(const struct sess *sp) WSP(sp, SLT_Debug, "Object %u workspace free %u", o->xid, WS_Free(o->ws_o)); + /* XXX: pretouch neighbors on oh->objcs to prevent page-on under mtx */ Lck_Lock(&oh->mtx); assert(oh->refcnt > 0); + /* XXX: strictly speaking, we should sort in Date: order. */ + VTAILQ_REMOVE(&oh->objcs, oc, list); + VTAILQ_INSERT_HEAD(&oh->objcs, oc, list); oc->flags &= ~OC_F_BUSY; hsh_rush(oh); AN(oc->ban);